/* ADMAE: the Midnight Proof Room.
   The app continues the intro's world (midnight, platinum, Bodoni ADMAE). The finished designs are the light in the room;
   everything around them stays quiet. Anek Bangla carries Bangla and English as one family; Bodoni Moda is kept for
   the wordmark and the date numeral. Each page's own colour marks its lane. */
:root {
  --bg: #070B16;          /* midnight canvas */
  --deep: #0C1222;        /* bar, drawer, windows */
  --surface: #131B31;     /* lanes, cards */
  --fill-2: #18213A;      /* wells and fields inside windows */
  --fill: rgba(150, 168, 215, .12);
  --ink: #E8ECF5;         /* platinum */
  --ink-2: #A3ADC6;       /* mist */
  --ink-3: #6E7894;       /* fog */
  --line: rgba(165, 180, 225, .16);
  --hair: rgba(165, 180, 225, .12);
  --plat: linear-gradient(180deg, #FFFFFF 0%, #DDE2EC 48%, #98A2B6 100%);

  --accent: #A5A3FF;      /* periwinkle: focus, selection, links */
  --accent-press: #8C8AF2;
  --accent-soft: rgba(165, 163, 255, .14);
  --accent-ring: rgba(165, 163, 255, .45);
  --on-light: #0A0F1E;    /* text on platinum and periwinkle */

  /* meaning only */
  --green: #5EDBA4;
  --green-soft: rgba(94, 219, 164, .13);
  --red: #FF8577;
  --red-soft: rgba(255, 133, 119, .13);
  --amber: #F5C26B;
  --amber-soft: rgba(245, 194, 107, .13);

  --shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 26px rgba(0, 0, 0, .32);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-3: 0 40px 110px rgba(0, 0, 0, .62), 0 0 0 1px var(--hair);
  --proof-shadow: 0 14px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .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: dark;
}

* { 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% 42% at 50% -8%, rgba(70, 82, 150, .28), 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(165, 163, 255, .35); }
.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(165, 180, 225, .22) 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: var(--fill-2); 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: #202A48; }
.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 8px 24px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(0, 0, 0, .12); }
.btn.primary:hover:not(:disabled) { background: #FFFFFF; }
.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: #1D2744; box-shadow: 0 0 0 3px var(--accent-ring); border-color: var(--accent);
}
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(150, 168, 215, .08); 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: #222C4C; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.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: rgba(7, 11, 22, .72);
  -webkit-backdrop-filter: saturate(160%) blur(22px); backdrop-filter: saturate(160%) blur(22px);
  border-bottom: 1px solid var(--hair);
}
.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: var(--plat); -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(165, 163, 255, .3);
}
.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(165, 163, 255, .6); } 50% { box-shadow: 0 0 0 6px rgba(165, 163, 255, 0); } }
.tools { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(150, 168, 215, .06); 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: rgba(19, 27, 49, .7); 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: var(--surface); color: var(--ink); }
.reel-day[aria-current="true"] {
  background: #1B2445; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(232, 236, 245, .7), 0 12px 30px rgba(0, 0, 0, .45);
}
.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); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 55%, transparent); }
.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: drop-shadow(0 0 28px rgba(140, 170, 255, .16));
}
.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: rgba(19, 27, 49, .6); 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(150, 168, 215, .14); 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(12, 18, 34, .7); box-shadow: inset 0 0 0 1px var(--hair); }
.filters { display: flex; align-items: center; gap: 8px; }
.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 6px 16px rgba(0, 0, 0, .4); }
.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(255, 255, 255, .018); }
.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(150, 168, 215, .05) 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(150, 168, 215, .035) 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: #222C4C; }
.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(94, 219, 164, .2); }
.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(150, 168, 215, .2); }
.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 rgba(232, 236, 245, .5), 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 rgba(232, 236, 245, .5), 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(255, 255, 255, .02); }
.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(255, 255, 255, .07); }
.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: -30px 0 90px rgba(0, 0, 0, .6), inset 1px 0 0 var(--hair);
  transform: translateX(104%); transition: transform .4s var(--ease);
}
.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(3, 5, 12, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.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 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); 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(3, 5, 12, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.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: #050811; color: #C9D1E4; 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: #1D2744; }
.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: #141C33; 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: #39425E; 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: #2FB37A; }
.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 2px rgba(255, 255, 255, .25); }
.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: #5A6378; 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: rgba(12, 18, 34, .9); -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px); 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(#0E1528 0% 25%, #121B32 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 30px 80px rgba(0, 0, 0, .65); 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 #5856D6; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); 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: #5856D6; }
.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(7, 11, 22, .72); 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(7, 11, 22, .8); color: var(--ink); font-size: .75rem; }
.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: #0A0F1D; 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(0, 0, 0, .25); }
.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: #1B2445; color: var(--ink); 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(150, 168, 215, .14); overflow: hidden; }
.plan-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); box-shadow: 0 0 14px rgba(94, 219, 164, .5); }
.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(214, 146, 255, .14); color: #D9A6FF; }
.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: rgba(232, 236, 245, .94); color: var(--on-light); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.toast.bad { background: var(--red); color: var(--on-light); }

/* ======================================================================
   Intro + login: midnight, platinum and one luxury serif
   ====================================================================== */
body.auth { background: #05070C; color: #F5F5F7; 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%, #141B2E 0%, #0A0E19 55%, #05070C 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: .75; }

/* 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: #AEB6C6;
}
.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: #E8ECF4; }
.intro.glow .intro-phrase .ch.ini { color: #FFFFFF; text-shadow: 0 0 14px rgba(170, 200, 255, .65); transition: color .6s ease, text-shadow .6s ease; }
.intro.glow .intro-phrase .ch:not(.ini) { color: #7F8799; 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: #9FD8FF; text-shadow: 0 0 8px rgba(120, 190, 255, .85); }
.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 */
.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 0 30px rgba(140, 170, 255, .18));
}
.intro-word .ltr {
  display: inline-block; margin: 0 .05em; opacity: 0; will-change: transform;
  background: linear-gradient(180deg, #FFFFFF 0%, #E3E7EE 42%, #9FA8B9 100%);
  -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, rgba(220, 228, 245, .7), 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: rgba(235, 238, 245, .72); 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: rgba(235, 238, 245, .5); 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: rgba(235, 238, 245, .38); 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: #05070C; min-height: 100vh; }
.gate-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%;
  filter: saturate(.9) contrast(1.03); transform: scale(1.05); transition: transform 2.2s var(--ease);
}
.gate.shown .gate-photo img { transform: none; }
.gate-photo::before { /* cool grade */
  content: ''; position: absolute; inset: 0; z-index: 1; background: #2A3A6A; mix-blend-mode: soft-light; opacity: .45;
}
.gate-photo::after { /* fade into midnight on the right and at the bottom */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 7, 12, 0) 52%, #05070C 99%),
    linear-gradient(180deg, rgba(5, 7, 12, 0) 58%, rgba(5, 7, 12, .88) 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: rgba(245, 245, 247, .85); }
.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%, #121829 0%, #070A12 70%, #05070C 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, #FFFFFF 0%, #E3E7EE 45%, #9FA8B9 100%); -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: rgba(235, 238, 245, .6); }
.gate-brand p span { white-space: nowrap; }
.gate-brand .sep { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: rgba(235, 238, 245, .45); margin: 0 12px; vertical-align: middle; font-size: 0; }
.gate-card {
  width: min(400px, calc(100vw - 32px)); color: #F5F5F7; border-radius: 24px; padding: 30px 28px;
  background: rgba(44, 44, 50, .55); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 80px rgba(0, 0, 0, .5);
}
.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: rgba(235, 235, 245, .6); }
.gate-card input[type="text"], .gate-card input[type="password"] { background: rgba(118, 118, 128, .24); color: #fff; border-color: transparent; padding: 12px 14px; }
.gate-card input::placeholder { color: rgba(235, 235, 245, .35); }
.gate-card input:focus { background: rgba(118, 118, 128, .32); border-color: rgba(160, 158, 255, .8); box-shadow: 0 0 0 3px rgba(94, 92, 230, .35); }
.gate-card .btn.primary { background: #F5F5F7; color: #0A0A0F; min-height: 48px; font-size: 1rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.gate-card .btn.primary:hover:not(:disabled) { background: #FFFFFF; }
.gate-card .hint { margin-top: 16px; color: rgba(235, 235, 245, .5); }
.gate-card .err { color: #FF6961; }

@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(5, 7, 12, 0) 45%, #05070C 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: 1560px) {
  .tool span { display: none; }
  .tool { padding: 0 10px; }
}
@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: #222C4C; }
.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 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); }
.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(--fill); 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(--fill); color: var(--ink); cursor: pointer; font: inherit; }
.li-tool:hover { background: #222C4C; }
.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(150, 168, 215, .06); 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: var(--fill); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.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(0, 0, 0, .35); }
.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: #000; }
.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(150, 168, 215, .06); 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: var(--fill); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.chat-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; 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: linear-gradient(180deg, rgba(165, 163, 255, .26), rgba(165, 163, 255, .18)); box-shadow: none; }
.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(0, 0, 0, .22); }
.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(3, 5, 12, .94); }
.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(150, 168, 215, .2); }
.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(3, 5, 12, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.menu-sheet { margin: 12px 12px 12px auto; 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: #18213A; }
.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%, #353C7A 0%, rgba(53, 60, 122, 0) 55%), linear-gradient(160deg, #1B2445 0%, #0C1222 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; right: 12px; bottom: 12px; cursor: pointer; background: rgba(7, 11, 22, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.prof-av-edit { position: relative; display: inline-block; border-radius: 50%; cursor: pointer; }
.prof-av-tip { position: absolute; right: -6px; bottom: 4px; padding: 5px 10px; border-radius: 999px; background: var(--plat); color: var(--on-light); font-size: .74rem; font-weight: 700; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.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: #1D2744; box-shadow: 0 0 0 3px var(--accent-ring); border-color: var(--accent); }
.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 30px rgba(0, 0, 0, .4); 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(165, 163, 255, .28); 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(3, 5, 12, .4); -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* the post drawer also stops above the bar */
  .drawer { bottom: var(--tbh); border-radius: 0; }
}
@keyframes page-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: var(--fill); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
@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: rgba(9, 13, 26, .9); -webkit-backdrop-filter: saturate(160%) blur(22px); backdrop-filter: saturate(160%) blur(22px);
    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: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .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(--ink-3); }
  .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; }
}
