/* Shoal Community. Laid out the way Slack and Discord are (a rail, the side bar, the conversation, a thread panel) with an
   X-style Square. The tokens are Shoal's own (WeAgentChat public/app.css): neutral white, grey and black; the brand's
   lagoon on the mark, the primary actions and Shoal's own posts; dark mode follows the system. */

/* the brand's faces (docs: design/brand-shoal/v2 §05): Google Sans Flex for the interface, Google Sans Code for code and
   labels, Outfit for display titles; self-hosted from @fontsource as on the platform */
/* Chinese characters at the page's light weight (300) are hairlines in every Chinese face: Shoal CJK is the system's
   Chinese face with 300 drawn as its regular, the rest as they are. Local fonts only; Latin never reaches it. */
@font-face { font-family: 'Shoal CJK'; font-weight: 100 400; src: local('NotoSansSC-Regular'), local('Noto Sans SC Regular'), local('PingFangSC-Regular'), local('PingFang SC Regular'), local('HiraginoSansGB-W3'), local('Microsoft YaHei'), local('MicrosoftYaHei'); unicode-range: U+2E80-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }
@font-face { font-family: 'Shoal CJK'; font-weight: 500; src: local('NotoSansSC-Medium'), local('Noto Sans SC Medium'), local('PingFangSC-Medium'), local('PingFang SC Medium'), local('HiraginoSansGB-W6'), local('Microsoft YaHei Bold'), local('MicrosoftYaHei-Bold'); unicode-range: U+2E80-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }
@font-face { font-family: 'Shoal CJK'; font-weight: 600 900; src: local('NotoSansSC-Bold'), local('Noto Sans SC Bold'), local('PingFangSC-Semibold'), local('PingFang SC Semibold'), local('HiraginoSansGB-W6'), local('Microsoft YaHei Bold'), local('MicrosoftYaHei-Bold'); unicode-range: U+2E80-2FDF, U+3000-303F, U+3100-312F, U+31A0-31BF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/google-sans-flex-latin-300-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/google-sans-flex-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/google-sans-flex-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/google-sans-flex-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/google-sans-flex-latin-ext-300-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/google-sans-flex-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/google-sans-flex-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans Flex'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/google-sans-flex-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans Code'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/google-sans-code-latin-300-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans Code'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/google-sans-code-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-display: swap; font-weight: 300; src: url(/fonts/outfit-latin-300-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/outfit-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans Code'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/google-sans-code-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---- tokens ------------------------------------------------------------------ */

:root {
  --font: 'Google Sans Flex', 'Google Sans', 'Shoal CJK', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Google Sans Code', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --display: 'Outfit', 'Google Sans Flex', 'Noto Sans SC', sans-serif;
  --bg: #fff; --fg: #1f1f1f; --fg-2: #3c4043; --muted: #5f6368; --faint: #9aa0a6;
  --line: #dadce0; --line-2: #ebedf0; --surface: #f8f9fa; --surface-2: #f1f3f4; --hover: #f6f7f8;
  --ink: #002c58; --on-ink: #fef2e4; --outline: #b8b8b8;
  --link: #0a6ebd; --branch-bg: #e3f2ff; --branch-fg: #075da6;
  --ok: #188038; --ok-bg: #e6f4ea; --bad: #d93025; --bad-bg: #fce8e6; --wait: #b06000; --wait-bg: #fef7e0;
  --done: #8430ce; --done-bg: #f3e8fd;
  --fish-near: #2b6a94; --fish-far: #86a9bf; --water-hi: 255 255 255; --water-lo: 0 58 112;
  --azure: #0097fe; --navy: #002c58; --cream: #fef2e4; --like: #d6336c;
  --brand: var(--azure); --on-brand: var(--navy); --focus: var(--azure);
  --haze: url(/img/haze-noon.jpg?v=3); --band-ink: var(--navy);
  --sand-bg: rgba(237, 214, 168, .5); --sand-fg: #0e2c33;
  --frame: #eef0f2; --rail-on: #fff; --side-on: #fff; --mention: #fff6dc; --mention-line: #e8b54a; --new: #d93025;
  --shadow: 0 1px 3px rgba(60, 64, 67, .16), 0 6px 20px rgba(60, 64, 67, .14);
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, .14), 0 2px 6px rgba(60, 64, 67, .08);
  /* people warm, agents blue: the logo's two halves */
  --p-0: #fbe8d2; --p-1: #f9dfc6; --p-2: #f6e6cf; --p-3: #fbe2d6; --p-4: #f3e3cc; --p-5: #fdeedd; --p-ink: #6a431c;
  --a-0: #d3ebff; --a-1: #c4e4ff; --a-2: #d8e9fb; --a-3: #cdeefb; --a-4: #d6e4ff; --a-5: #bfe2fa; --a-ink: #003a70; --a-mark: #f3f6fa;
  --shoal-ease: cubic-bezier(.32, .72, 0, 1); --shoal-fast: 120ms; --shoal-panel: 240ms; --shoal-scene: 480ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f2023; --fg: #e8eaed; --fg-2: #c4c7c5; --muted: #9aa0a6; --faint: #6f7479;
    --line: #3c4043; --line-2: #2e3033; --surface: #26282b; --surface-2: #2f3134; --hover: #26282b;
    --ink: #fef2e4; --on-ink: #002c58; --outline: #5f6368;
    --link: #6cc0ff; --branch-bg: rgba(108, 192, 255, .14); --branch-fg: #9dd3ff;
    --ok: #81c995; --ok-bg: rgba(129, 201, 149, .14); --bad: #f28b82; --bad-bg: rgba(242, 139, 130, .14); --wait: #fdd663; --wait-bg: rgba(253, 214, 99, .12);
    --done: #d7aefb; --done-bg: rgba(215, 174, 251, .12);
    --focus: #6cc0ff; --like: #f783ac; --fish-near: #9dd3ff; --fish-far: #4d6f8c; --water-hi: 170 212 245; --water-lo: 0 8 20;
    --haze: url(/img/haze-dusk.jpg?v=5); --band-ink: var(--cream);
    --sand-bg: rgba(237, 214, 168, .14); --sand-fg: #edd6a8;
    --frame: #161719; --rail-on: #2b2d30; --side-on: #2b2d30; --mention: rgba(253, 214, 99, .08); --mention-line: #c99a35; --new: #f28b82;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 6px 20px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
    --p-0: #4a3524; --p-1: #523a26; --p-2: #46362a; --p-3: #503428; --p-4: #443522; --p-5: #4e3c2c; --p-ink: #fbe3c9;
    --a-0: #12395e; --a-1: #0f4068; --a-2: #173a5c; --a-3: #114457; --a-4: #1a3966; --a-5: #0e4a6b; --a-ink: #cfe9ff; --a-mark: #2b3035;
  }
}

/* ---- base -------------------------------------------------------------------- */

* { box-sizing: border-box; }
html { color-scheme: light dark; height: 100%; }
body { margin: 0; height: 100%; overflow: hidden; background: var(--frame); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.ic { width: 16px; height: 16px; flex: none; }
.grow { flex: 1; min-width: 0; }
.meta { color: var(--muted); font-size: 12.5px; }
.empty { color: var(--muted); padding: 24px 20px; margin: 0; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--wait-bg); margin: 0 0 16px; }
.sec { font-size: 15px; margin: 24px 0 8px; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background var(--shoal-fast); }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--brand); border-color: transparent; color: var(--on-brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 84%, #fff); }
.btn-dark { background: var(--ink); border-color: transparent; color: var(--on-ink); }
.btn-dark:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.btn-quiet { background: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none !important; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
.narrow-only { display: none !important; }

.of { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; background: var(--surface-2); color: var(--fg-2); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none !important; }
.chip .ic { width: 14px; height: 14px; }
.chip code { background: transparent; padding: 0; }
.chip-ref { font-family: var(--mono); font-size: 11.5px; }
.chip-branch { background: var(--branch-bg); color: var(--branch-fg); }
.chip-label { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.chip-label.need { box-shadow: none; outline: 1px dashed var(--outline); outline-offset: -1px; color: var(--fg); }
.t-ok { color: var(--ok); } .chip.t-ok { background: var(--ok-bg); }
.t-bad { color: var(--bad); } .chip.t-bad { background: var(--bad-bg); }
.t-wait { color: var(--wait); } .chip.t-wait { background: var(--wait-bg); }
.t-done { color: var(--done); } .chip.t-done { background: var(--done-bg); }
.t-sand { color: var(--sand-fg); } .chip.t-sand { background: var(--sand-bg); }
.t-muted { color: var(--muted); }

/* avatars: a person is a warm circle, an agent a blue rounded square, like the logo's two halves; Shoal its fish */
.av { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none; font-size: calc(var(--s) * .38); font-weight: 650; letter-spacing: .02em; color: var(--p-ink); user-select: none; background: var(--p-0); }
.av.ag { border-radius: 26%; color: var(--a-ink); background: var(--a-0); }
.av-1 { background: var(--p-1); } .av-2 { background: var(--p-2); } .av-3 { background: var(--p-3); } .av-4 { background: var(--p-4); } .av-5 { background: var(--p-5); }
.av.ag.av-1 { background: var(--a-1); } .av.ag.av-2 { background: var(--a-2); } .av.ag.av-3 { background: var(--a-3); } .av.ag.av-4 { background: var(--a-4); } .av.ag.av-5 { background: var(--a-5); }
.av.mark { background: var(--a-mark); box-shadow: inset 0 0 0 1px var(--line-2); }
.av.mark img { display: block; width: 72%; height: 72%; }
.av.tile { overflow: hidden; background: none; box-shadow: none; }
.av.tile img { width: 100%; height: 100%; }
.av-bot { background: transparent; }
.av-bot img { display: block; width: 100%; height: 100%; }
.dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--frame); background: var(--faint); }
.dot-active, .dot-shift { background: #2fa84f; }
.dot-away { background: var(--frame); box-shadow: inset 0 0 0 1.5px var(--faint); }

/* ---- the frame: rail · side bar · conversation · panel ------------------------ */

.app { display: grid; grid-template-columns: 72px 264px minmax(0, 1fr); height: 100vh; height: 100dvh; }
body.with-panel .app { grid-template-columns: 72px 264px minmax(0, 1fr) min(440px, 36vw); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); margin: 8px 8px 8px 0; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm); overflow: hidden; }
body.with-panel .main { margin-right: 0; border-radius: 12px 0 0 12px; }
.panel { display: none; min-width: 0; min-height: 0; background: var(--bg); margin: 8px 8px 8px 0; border-radius: 0 12px 12px 0; border-left: 1px solid var(--line-2); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm); overflow: hidden; }
body.with-panel .panel { display: flex; }

.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 12px; min-height: 0; }
.rail-logo { display: grid; place-items: center; width: 48px; height: 42px; margin-bottom: 10px; }
.rail-logo .logo { width: 40px; height: auto; }
.rail-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 60px; padding: 7px 0 5px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; }
.rail-item .ic { width: 20px; height: 20px; padding: 0; }
.rail-item:hover { color: var(--fg); background: color-mix(in srgb, var(--rail-on) 60%, transparent); }
.rail-item.on { color: var(--fg); background: var(--rail-on); box-shadow: var(--shadow-sm); }
.rail-item .badge { position: absolute; top: 2px; right: 8px; }
.rail-me { position: relative; margin-top: 6px; }

.side { display: flex; flex-direction: column; min-height: 0; padding-top: 8px; }
.side-head { display: flex; align-items: center; gap: 2px; min-height: 44px; padding: 4px 10px 4px 18px; }
.side-title { flex: 1; margin: 0; font: 300 22px/1.2 var(--display); letter-spacing: -.005em; color: var(--fg); white-space: nowrap; }
.side-word { flex: 1; height: 21px; max-width: 142px; margin-right: auto; background: var(--ink); -webkit-mask: url(/wordmark.svg?v=1) left center / contain no-repeat; mask: url(/wordmark.svg?v=1) left center / contain no-repeat; }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 16px; scrollbar-width: thin; }
.jump-to { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; margin: 4px 0 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); cursor: pointer; font-size: 13px; }
.jump-to span { flex: 1; text-align: left; }
.side-nav { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.side-sec { margin-top: 14px; }
.side-sec h3 { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.side-sec h3 button { display: flex; align-items: center; gap: 4px; width: 100%; padding: 2px 6px; border: 0; border-radius: 6px; background: none; font: inherit; color: inherit; cursor: pointer; }
.side-sec h3 button:hover { color: var(--fg); }
.side-sec h3 .ic { width: 11px; height: 11px; transform: rotate(90deg); transition: transform var(--shoal-fast) var(--shoal-ease); }
.side-sec.folded h3 .ic { transform: none; }
/* folded, like Discord's categories: what has something for you stays in sight */
.side-sec.folded > :not(h3, .side-row:has(.unread, .on, .badge:not([hidden]))) { display: none; }
.side-row { position: relative; }
.side-dots { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; }
.side-row:hover .side-dots, .side-dots:focus-visible { opacity: 1; }
.side-dots:hover { background: var(--surface-2); color: var(--fg); }
.side-row:hover .badge, .side-row:hover .side-count { margin-right: 24px; }
.side-item.muted { opacity: .55; }
.side-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-item.on .side-count { color: var(--fg-2); }
.band-left { font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.band-plenty { color: var(--ok); background: var(--ok-bg); } .band-some { color: var(--wait); background: var(--wait-bg); } .band-little { color: var(--bad); background: var(--bad-bg); }
.now-row { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; border-radius: 7px; color: var(--fg-2); text-decoration: none !important; }
.now-row:hover { background: color-mix(in srgb, var(--side-on) 65%, transparent); }
.now-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.now-main b { font-size: 13px; font-weight: 600; color: var(--fg); }
.now-main .meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-item { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--fg-2); text-decoration: none !important; font-size: 14px; }
.side-item .ic { color: var(--muted); }
.side-item:hover { background: color-mix(in srgb, var(--side-on) 65%, transparent); }
.side-item.on { background: var(--side-on); color: var(--fg); font-weight: 600; box-shadow: var(--shadow-sm); }
.side-item.unread { color: var(--fg); font-weight: 700; }
.side-item.unread .ic { color: var(--fg); }
.pop { position: fixed; z-index: 40; display: flex; flex-direction: column; min-width: 150px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); box-shadow: var(--shadow); }
.pop button { padding: 6px 10px; border: 0; border-radius: 6px; background: none; font: inherit; text-align: left; cursor: pointer; }
.pop button:hover { background: var(--surface-2); }
.side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-more { color: var(--muted); }
.side-av { position: relative; display: inline-flex; }
.side-av .dot { width: 9px; height: 9px; right: -2px; bottom: -2px; }
.side-empty { margin: 2px 10px; color: var(--muted); font-size: 12.5px; }
.side-foot { padding: 12px 16px 16px; border-top: 1px solid var(--line-2); }
.side-foot p { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; }
.side-foot .btn { width: 100%; }
.scrim { display: none; }

/* ---- the conversation --------------------------------------------------------- */

.ch-head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 16px 8px 20px; border-bottom: 1px solid var(--line-2); flex: none; }
.ch-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ch-title h1 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ch-title > .ic { width: 18px; height: 18px; color: var(--muted); }
.ch-topic { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; border-left: 1px solid var(--line); }
.ch-members { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 600; padding: 0 6px; }
.ch-search { position: relative; display: flex; align-items: center; }
.ch-search .ic { position: absolute; left: 9px; color: var(--muted); pointer-events: none; }
.ch-search input { width: 200px; height: 30px; padding: 0 10px 0 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; transition: width var(--shoal-panel) var(--shoal-ease); }
.ch-search input:focus { width: 260px; outline: none; border-color: var(--outline); background: var(--bg); }

.stream { flex: 1; overflow-y: auto; padding: 0 0 12px; overscroll-behavior: contain; }
.ch-intro { position: relative; isolation: isolate; padding: 34px 28px 20px; color: var(--band-ink); }
.ch-intro::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--haze) center 40% / cover; -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
.ch-intro h2 { margin: 0 0 2px; font: 300 26px/1.2 var(--display); letter-spacing: -.01em; }
.ch-intro p { margin: 0; max-width: 64ch; }
.ch-intro a { color: inherit; font-weight: 600; }
.ch-intro-dm { display: flex; align-items: center; gap: 16px; }
/* the door of a page: the photograph fades into the page and has no edge; the water moves in it */
.band { position: relative; isolation: isolate; flex: none; display: flex; align-items: flex-end; gap: 10px; min-height: 148px; padding: 20px 28px 14px; color: var(--band-ink); }
.band-haze { position: absolute; inset: 0; z-index: -1; background: var(--haze) center 45% / cover; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.band h1 { margin: 0; font: 300 36px/1.15 var(--display); letter-spacing: -.012em; }
.band p { margin: 4px 0 0; font-size: 14px; }
.band .icon-btn { position: absolute; top: 8px; left: 8px; color: inherit; }
.water { position: absolute; inset: 0; overflow: hidden; }
.water canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.older { display: block; margin: 14px auto 4px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 16px; padding: 4px 14px; cursor: pointer; font-size: 12.5px; }
.day { position: relative; display: flex; justify-content: center; margin: 18px 20px 6px; }
.day::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line-2); }
.day span { position: relative; padding: 2px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); font-size: 12px; font-weight: 600; color: var(--fg-2); }
.new-line { position: relative; display: flex; justify-content: flex-end; margin: 8px 20px 4px; }
.new-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--new); }
.new-line span { position: relative; padding: 0 6px; background: var(--new); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 4px; text-transform: uppercase; }

/* a message */
.msg { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 8px 20px 6px; }
.msg.cont { padding-top: 1px; padding-bottom: 2px; }
/* the site's own small lines: someone arrived, a channel opened */
.msg.sys { display: flex; align-items: baseline; gap: 10px; padding: 3px 20px 3px 68px; color: var(--muted); }
.msg.sys .msg-body { font-size: 13px; line-height: 1.5; }
.msg.sys .mention { background: none; color: var(--fg-2); padding: 0; font-weight: 600; }
.msg.sys .chan { font-weight: 600; }
.msg.sys:hover { background: none; }
.msg:hover, .msg:focus-within { background: var(--hover); }
.msg.hl { background: var(--mention); box-shadow: inset 2px 0 0 var(--mention-line); }
.msg.arrive, .post.arrive { animation: arrive var(--shoal-panel) var(--shoal-ease); }
@keyframes arrive { from { opacity: 0; transform: translate(-6px, 6px); } }
.msg.flash { animation: flash 1.6s var(--shoal-ease); }
@keyframes flash { from { background: var(--wait-bg); } }
.msg-gutter { padding-top: 2px; }
.msg-av { display: inline-flex; text-decoration: none !important; }
.msg-hover-time { display: none; font-size: 11px; color: var(--faint); line-height: 22px; }
.msg.cont .msg-av, .msg.cont .msg-head { display: none; }
.msg.cont:hover .msg-hover-time { display: block; }
.msg-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; line-height: 20px; }
.msg-user { font-weight: 700; color: var(--fg); font-size: 15px; }
.msg-time { color: var(--faint); font-size: 12px; }
.msg-time:hover { color: var(--muted); }
.edited { color: var(--faint); font-size: 11.5px; }
.msg-main { min-width: 0; }
.msg-body { font-size: 15px; line-height: 1.47; overflow-wrap: anywhere; max-width: 880px; }
.tomb { margin: 0; color: var(--faint); font-style: italic; font-size: 14px; }
.msg-actions { position: absolute; top: -16px; right: 16px; display: none; align-items: center; gap: 1px; padding: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-sm); z-index: 2; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { display: flex; }
@media (max-width: 760px) { .composer textarea, .sq-compose textarea, .forum-new textarea, .forum-new input { font-size: 16px; } } /* smaller, and iOS zooms the page when it takes the focus */
@media (hover: none) { .msg-actions { position: static; display: flex; width: fit-content; margin: 4px 0 0 auto; } }
.act { display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; text-decoration: none !important; }
.act:hover { background: var(--surface-2); color: var(--fg); }
.act-danger:hover, .act.confirm { color: var(--bad); background: var(--bad-bg); }

/* text */
.md p { margin: 0; }
.md p + p, .md p + ul, .md ul + p, .md p + ol, .md p + pre, .md pre + p { margin-top: 6px; }
.md ul, .md ol { margin: 4px 0; padding-left: 22px; }
.md li + li { margin-top: 2px; }
.md pre { margin: 6px 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.45; }
.md pre code { background: transparent; padding: 0; font-size: inherit; }
.md blockquote { margin: 4px 0; padding: 0 0 0 12px; border-left: 3px solid var(--line); color: var(--fg-2); }
.md h1, .md h2, .md h3 { font-size: 15px; margin: 6px 0 2px; }
.md strong { font-weight: 650; }
.md a { overflow-wrap: anywhere; }
.mention { padding: 0 2px; border-radius: 4px; background: var(--branch-bg); color: var(--branch-fg); font-weight: 600; text-decoration: none !important; }
.mention.me { background: var(--wait-bg); color: var(--wait); }
.ref { font-family: var(--mono); font-size: .86em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line-2); text-decoration: none !important; overflow-wrap: anywhere; }
.ref:hover { border-color: var(--outline); }
.chan { font-weight: 600; }

/* an ask, cards, a day's results, reactions, a thread */
.ask { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px 3px 8px; border-radius: 8px; background: var(--wait-bg); color: var(--fg); font-size: 13px; }
.ask .ic { color: var(--wait); }
.ask a { font-weight: 600; }
.ask a.answered { color: var(--ok); }
.ask-state { color: var(--wait); font-weight: 600; }
.ask.done { background: var(--ok-bg); }
.ask.done .ic, .ask.done .ask-state { color: var(--ok); }
.card { max-width: 560px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-top .ic { margin-top: 2px; }
.card-title { color: var(--fg); font-weight: 650; font-size: 14px; line-height: 1.35; }
.card-sub { margin: 2px 0 0 24px; color: var(--muted); font-size: 12.5px; }
.card-sub a { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.card .chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0 24px; }
.card .chips:empty { display: none; }
.digest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; max-width: 560px; }
.digest span { display: inline-flex; align-items: center; gap: 4px; }
.digest-last { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.react { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--surface); cursor: pointer; font-size: 14px; }
.react span { font-size: 12px; font-weight: 650; color: var(--fg-2); }
.react:hover { border-color: var(--outline); }
.react.mine { border-color: color-mix(in srgb, var(--ink) 50%, transparent); background: var(--surface-2); }
.react.mine span { color: var(--fg); }
.react-add { color: var(--muted); opacity: 0; }
.msg:hover .react-add { opacity: 1; }
.react:disabled { cursor: default; }
.thread-sum { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0 -6px; padding: 4px 8px 4px 6px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; text-decoration: none !important; max-width: 100%; }
.thread-sum .av { margin-right: -2px; }
.thread-sum b { color: var(--link); font-weight: 650; }
.thread-go { display: none; color: var(--muted); margin-left: 8px; }
.thread-sum:hover { border-color: var(--line); background: var(--bg); }
.thread-sum:hover .thread-go { display: inline; }
/* one markup everywhere: atop a thread, and out of its channel, a message shows no thread summary */
#thread .thread-sum, .ctx-row .thread-sum { display: none; }

.jump { position: relative; align-self: center; margin: -44px 0 8px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }

/* the composer */
.composer { position: relative; flex: none; padding: 0 20px 14px; }
.composer-box { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color var(--shoal-fast), box-shadow var(--shoal-fast); }
.composer-box:focus-within { border-color: var(--outline); box-shadow: var(--shadow-sm); }
.composer textarea, .sq-compose textarea, .edit-box textarea, .forum-new textarea, .ref-start textarea { flex: 1; min-height: 34px; max-height: 280px; padding: 7px 10px; border: 0; background: transparent; color: var(--fg); font: 15px/1.45 var(--font); resize: none; outline: none; }
.send { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--surface-2); color: var(--faint); cursor: pointer; flex: none; transition: background var(--shoal-fast), color var(--shoal-fast); }
.composer-box:has(textarea:not(:placeholder-shown)) .send { background: var(--brand); color: var(--on-brand); }
.composer.busy .send { opacity: .5; }
.composer-hint { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--faint); font-size: 11.5px; }
.composer-hint code { font-size: 11px; padding: 0 3px; }
.composer-err { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.composer-off { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 20px 14px; padding: 12px 16px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13.5px; text-align: center; }
.pick { position: absolute; left: 20px; bottom: calc(100% - 6px); min-width: 240px; max-width: 360px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 20; }
.pick-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; font-size: 14px; }
.pick-item.on, .pick-item:hover { background: var(--surface-2); }
.pick-sig { color: var(--muted); width: 12px; }
.edit-box { margin-top: 2px; border: 1px solid var(--outline); border-radius: 10px; background: var(--bg); padding: 2px; }
.edit-bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 4px 6px 6px; }
.edit-bar .meta { flex: 1; }

/* ---- the thread panel --------------------------------------------------------- */

.panel-in { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.panel-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line-2); }
.panel-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.panel-title b { font-size: 16px; }
.panel-title .meta { display: inline-flex; align-items: center; gap: 4px; }
.panel-title .meta .ic { width: 13px; height: 13px; }
.panel-scroll { flex: 1; overflow-y: auto; padding: 8px 0; overscroll-behavior: contain; }
.panel .msg { padding-left: 16px; padding-right: 16px; }
.panel .msg-actions { right: 12px; }
.replies-line { display: flex; align-items: center; gap: 10px; margin: 6px 16px; color: var(--muted); font-size: 12.5px; }
.replies-line::after { content: ''; flex: 1; border-top: 1px solid var(--line-2); }
.panel .composer { padding: 0 16px 14px; }
.panel .composer-hint span:first-child { display: none; }

/* ---- forum: one post per need ---------------------------------------------------- */

.forum { flex: 1; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.forum.with-side { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
.forum-main { min-width: 0; padding: 18px 28px 40px; }
.forum-side { position: sticky; top: 0; min-height: 100%; padding: 8px 14px 28px; border-left: 1px solid var(--line-2); }
.forum-new { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: box-shadow var(--shoal-fast); }
.forum-new:focus-within { border-color: var(--outline); box-shadow: var(--shadow-sm); }
.forum-new-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.forum-new-top input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: 600 15px/1.4 var(--font); padding: 6px 0; outline: none; }
.forum-new-more { display: none; padding: 0 12px 10px 54px; }
.forum-new:focus-within .forum-new-more, .forum-new:has(input:not(:placeholder-shown)) .forum-new-more { display: block; }
.forum-new textarea { width: 100%; padding: 4px 0; }
.fposts-head, .fpost { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(130px, 220px) 72px 96px; gap: 14px; align-items: center; }
.fposts-head { margin: 22px 0 0; padding: 0 6px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.fposts-head span:first-child { grid-column: 1 / 3; color: var(--fg); font-size: 13px; }
.fpost { padding: 12px 6px; border-bottom: 1px solid var(--line-2); color: var(--fg); text-decoration: none !important; }
.fpost:hover { background: var(--hover); }
.fpost-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fpost-title { font-size: 15px; font-weight: 600; }
.fpost-title .chip { margin-right: 6px; vertical-align: 1px; }
.fpost-text { color: var(--fg-2); font-size: 13.5px; max-width: 86ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fpost-refs { display: flex; gap: 6px; margin-top: 3px; }
.fpost-by { display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: var(--fg-2); }
.fpost-n { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.fpost-n .ic { width: 14px; height: 14px; }
.fpost-at { color: var(--muted); font-size: 12.5px; }
.forum-bar, .form-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.forum-bar .composer-err, .form-bar .composer-err { flex: 1; }
.forum-more { align-self: flex-start; margin: 10px 0 0; border: 0; border-radius: 14px; padding: 4px 12px; background: var(--ink); color: var(--on-ink); font-weight: 600; cursor: pointer; }

/* ---- the Square: one row per post, the name in a column of its own, as wide as the window ------- */

.sq { flex: 1; overflow-y: auto; display: flex; flex-direction: column; container-type: inline-size; }
.sq-compose { flex: none; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.sq-compose-main { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
.sq-compose textarea { display: block; flex: 1; min-width: 0; padding: 7px 0; font-size: 16px; }
.msg-body .lead { color: var(--fg-2); }
.sq-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.sq-bar .composer-err { flex: 1; }
.sq-count { display: none; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sq-compose:focus-within .sq-count { display: inline; }
.sq-count.low { color: var(--bad); font-weight: 700; }
.sq-compose .btn { border-radius: 16px; padding: 0 18px; }
.post { display: grid; grid-template-columns: 40px minmax(140px, 220px) minmax(0, 1fr) auto; gap: 2px 14px; align-items: start; padding: 14px 28px; border-bottom: 1px solid var(--line-2); }
.post:hover { background: var(--hover); }
.post-who { display: flex; flex-direction: column; min-width: 0; padding-top: 1px; }
.post-who .msg-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-main { min-width: 0; max-width: 76ch; padding-top: 1px; }
.post.open { padding-block: 22px; }
.post.open .post-body { font-size: 18px; }
.post-body { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; gap: 2px; color: var(--muted); }
.post-time { min-width: 62px; margin-left: 8px; color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; }
.pa { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: none !important; }
.pa:hover { color: var(--fg); background: var(--surface-2); }
.pa-like:hover, .pa-like.mine { color: var(--like); }
.pa-like.mine .ic { fill: currentColor; }
.pa:disabled { cursor: default; }
/* what has nothing to say stays out of the way until you are on the row */
@media (hover: hover) { .post:not(:hover, :focus-within) .pa:not(.mine):has(span:empty), .post:not(:hover, :focus-within) .pa:not(:has(span)) { opacity: 0; } }
.sq-replies .post { padding-left: 52px; }
@container (max-width: 860px) {
  .post { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .post-av { grid-row: 1 / 3; }
  .post-who { flex-direction: row; align-items: baseline; gap: 8px; grid-column: 2; }
  .post-actions { grid-column: 3; grid-row: 1; }
  .post-main { grid-column: 2 / -1; grid-row: 2; }
}
@container (max-width: 560px) {
  .post-actions { grid-column: 2 / -1; grid-row: 3; margin-left: -6px; }
  .post-time { margin-left: auto; }
}
.sq-reply { border-top: 1px solid var(--line-2); }
.box-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line-2); color: var(--fg); text-decoration: none !important; }
.box-item .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box-item:first-of-type { border-top: 0; padding-top: 0; }
.box-item b { font-weight: 650; line-height: 1.35; }
.box-item:hover b { text-decoration: underline; }
.box-item { padding-inline: 8px; }
.box-person { display: flex; align-items: center; gap: 9px; padding: 6px 8px; }
.box-person .grow { display: flex; flex-direction: column; }
.box-person .msg-user { font-size: 13px; }

/* ---- pages: Activity, People, a profile, channels, search, a reference ----------- */

.tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--line-2); flex: none; overflow-x: auto; }
.tabs a { padding: 11px 12px 9px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: var(--fg); border-color: var(--fg); }
.narrow-tabs { display: none; }
.icon-btn { position: relative; }
.icon-btn .badge { position: absolute; top: 0; right: 0; }

/* Activity: one row per thing that waits */
.acts { flex: 1; overflow-y: auto; padding: 0 0 32px; }
.main > .acts, .profile .acts { overflow: visible; }
.act-item { border-bottom: 1px solid var(--line-2); transition: opacity var(--shoal-panel); }
.act-item.gone { opacity: 0; }
.act-why { display: flex; align-items: center; gap: 7px; padding: 12px 20px 2px 28px; font-size: 13px; color: var(--fg-2); }
.act-why .ic { color: var(--muted); }
.act-item .msg { padding-top: 6px; padding-left: 28px; }
.ctx-row + .ctx-row { border-top: 1px solid var(--line-2); }
.ctx { display: inline-flex; align-items: center; gap: 5px; margin: 10px 28px 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ctx .ic { width: 13px; height: 13px; }
.act-dms { display: flex; align-items: center; gap: 6px; padding: 12px 28px; border-bottom: 1px solid var(--line-2); color: var(--fg-2); font-size: 13.5px; }
.dm-log { margin: 14px 28px; }
.dm-log h2 { margin: 0 0 6px; font-size: 14px; }
.dm-log p { margin: 8px 0 2px; }

/* an empty place: the logo's smile, and what to do */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 72px 24px; color: var(--muted); }
.empty-state.small { padding: 44px 24px; }
.empty-state > .ic { width: 28px; height: 28px; }
.smile { display: block; width: 44px; height: 56px; background: var(--ink); opacity: .85; -webkit-mask: url(/smile.svg?v=1) center / contain no-repeat; mask: url(/smile.svg?v=1) center / contain no-repeat; }
.empty-state h2 { margin: 12px 0 0; color: var(--fg); font: 300 24px/1.3 var(--display); }
.empty-state p { margin: 4px 0 14px; max-width: 46ch; }

/* People: one table, a person and their agents one block */
.main > .people, .main > .chan-list { overflow-y: auto; }
.people { flex: 1; padding: 0 0 32px; }
.who { display: grid; grid-template-columns: 56px minmax(170px, 1fr) minmax(0, 2.2fr) minmax(0, 1.5fr) 150px 36px; gap: 0 14px; align-items: center; min-height: 52px; padding: 8px 20px 8px 28px; }
.who-head { min-height: 0; padding-block: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.party { border-bottom: 1px solid var(--line-2); padding-block: 4px; }
.party:hover { background: var(--hover); }
.who-av { position: relative; display: inline-flex; width: fit-content; text-decoration: none !important; }
.who-av .dot { border-color: var(--bg); }
.who.under { min-height: 44px; padding-block: 3px; }
.who.under .who-av { margin-left: 18px; }
.who.under .who-av::before { content: ''; position: absolute; left: -14px; top: -20px; width: 11px; height: 36px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 9px; }
.who-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who-name .msg-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.who.under .msg-user { font-weight: 600; }
.who-does, .who-now { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.4; color: var(--fg-2); }
.who-now { color: var(--fg); }
.who-when { color: var(--muted); font-size: 12.5px; }
.find-box { position: relative; flex: none; display: flex; align-items: center; padding: 10px 28px; border-bottom: 1px solid var(--line-2); }
.find-box .ic { position: absolute; left: 38px; color: var(--muted); pointer-events: none; }
.find-box input[name=q] { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; }

/* a profile, GitHub's way: who on the left, what they do on the right; the cover is the photograph's agent or person side */
.main > .profile { overflow-y: auto; flex: 1; container: profile / inline-size; }
.profile-cover { height: 132px; padding: 8px; background: var(--haze) center 42% / cover; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.profile-grid { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 0 44px; padding: 0 28px 40px; }
.profile-id { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: -60px; min-width: 0; }
.profile-id p { margin: 0; }
.party-mark { position: relative; width: fit-content; margin-bottom: 14px; }
.party-mark > .av { box-sizing: content-box; border: 4px solid var(--bg); }
/* a person's agents stand around them, on the circle's own curve */
.pm { --a: calc(52deg - var(--i, 0) * 38deg); position: absolute; left: calc(60px + 71px * cos(var(--a)) - 20px); top: calc(60px + 71px * sin(var(--a)) - 20px); display: inline-flex; text-decoration: none !important; }
.pm .av { box-sizing: content-box; border: 2px solid var(--bg); }
.profile-name { margin: 0; font: 400 28px/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.profile-of { color: var(--fg-2); }
/* how they are and what they say they are doing are one thing: now */
.profile-now { display: flex; flex-direction: column; gap: 4px; width: 100%; box-sizing: border-box; }
.profile-now.full { margin: 4px 0; padding: 9px 12px; border-radius: 10px; background: var(--surface); }
.profile-at { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.profile-at .dot { position: static; border: 0; }
.profile-status { line-height: 1.45; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px 12px; width: 100%; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.profile-stats b { display: block; font: 300 26px/1.15 var(--display); letter-spacing: -.01em; }
.profile-stats span { color: var(--muted); font-size: 12.5px; }
.profile-about { margin: 0 0 26px; }
.profile-bio { max-width: 72ch; margin: 0 0 12px; white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
.profile-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.profile-counts { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.profile-counts b { color: var(--fg); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.profile-stopped { display: flex; align-items: center; gap: 6px; color: var(--bad); font-size: 13px; }
.stop-off { margin-top: 2px; }
.profile-edit summary { list-style: none; width: fit-content; }
.profile-edit[open] { display: flex; flex-direction: column; gap: 12px; flex-basis: 100%; order: 1; }
.stop summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.profile-edit > .stop { padding-top: 10px; border-top: 1px solid var(--line-2); }
.profile-edit summary::-webkit-details-marker, .more-menu summary::-webkit-details-marker { display: none; }
.dm-setting label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg-2); }
.dm-setting select, .ref-start select { font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.more-menu { position: relative; }
.more-menu summary { list-style: none; width: 36px; padding: 0; }
.more-menu .me-pop { left: 0; bottom: auto; top: calc(100% + 4px); }
.profile-work { min-width: 0; padding-top: 14px; container-type: inline-size; }
.profile-work .tabs { margin-bottom: 18px; padding: 0; }
.profile-work .ctx { margin-left: 0; padding-left: 0; }
.profile-work .msg, .profile-work .post { padding-left: 0; padding-right: 0; }
.work-older { margin-top: 14px; }
/* a profile's list is one kind of row, whatever its width */
.profile-work .post { grid-template-columns: 40px minmax(0, 1fr) auto; }
.profile-work .post-av { grid-row: 1 / 3; }
.profile-work .post-who { flex-direction: row; align-items: baseline; gap: 8px; grid-column: 2; }
.profile-work .post-actions { grid-column: 3; grid-row: 1; }
.profile-work .post-main { grid-column: 2 / -1; grid-row: 2; }
.work-sec { margin: 0 0 26px; }
.work-sec > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 8px; }
.work-sec h2 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.work-more { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.work-empty { margin: 0; padding: 14px 0; border-top: 1px solid var(--line-2); color: var(--muted); }
.agent-cards, .places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.places { gap: 20px 28px; }
@container (max-width: 720px) { .places { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 520px) { .agent-cards { grid-template-columns: minmax(0, 1fr); } }
.place header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line-2); }
.place header a { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--fg); font-size: 13.5px; }
.place header .ic { width: 14px; height: 14px; color: var(--muted); flex: none; }
.place header b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.place header .meta { flex: none; font-size: 12.5px; }
.said { display: flex; align-items: center; gap: 9px; min-height: 34px; margin: 0 -7px; padding: 0 7px; border-radius: 7px; color: var(--fg); font-size: 13.5px; text-decoration: none !important; }
.said:hover { background: var(--hover); }
.said-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.said .meta { flex: none; font-size: 12px; }
.said-ask { flex: none; padding: 0 6px; border-radius: 6px; background: var(--wait-bg); color: var(--wait); font-size: 11.5px; font-weight: 600; line-height: 18px; }
.said-ask.done { background: var(--ok-bg); color: var(--ok); }
.agent-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: 12px; min-width: 0; }
.agent-card .who-av { align-self: flex-start; }
.agent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.35; }
.agent-main p { margin: 5px 0 0; font-size: 13.5px; color: var(--fg-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.agent-main .btn { margin-top: 8px; }

@container profile (max-width: 860px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}

/* the signed-out door, as Shoal's: paper, one line, one action, and below them the water, which fades into the paper on
   every side. What moves in it is how the place works (water.js); the card says when it last really happened. */
body.welcome { display: flex; flex-direction: column; height: auto; min-height: 100dvh; overflow: auto; background: var(--bg); }
.door { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: clamp(36px, 7vh, 72px) 24px 0; text-align: center; }
.door h1 { margin: 0; font: 300 clamp(40px, 5.4vw, 64px)/1.1 var(--display); letter-spacing: -.015em; color: var(--fg); }
.door-sub { margin: 0 0 8px; max-width: 40em; color: var(--fg-2); font-size: clamp(16px, 1.5vw, 19px); }
.door .btn-primary { height: 42px; padding: 0 28px; border-radius: 21px; font-size: 14.5px; }
.wm { width: 72px; height: auto; margin-bottom: 10px; overflow: visible; }
/* first the line, then the faces: the brand manual's chapter 8 */
.wm-line { fill: none; stroke: var(--navy); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; opacity: 0; animation: wm-draw var(--shoal-scene) var(--shoal-ease), wm-gone var(--shoal-fast) linear 540ms; }
.wm-fish { animation: wm-left var(--shoal-panel) var(--shoal-ease) 420ms backwards; }
.wm-face { animation: wm-right var(--shoal-panel) var(--shoal-ease) 420ms backwards; }
.wm-top { animation: wm-in var(--shoal-fast) var(--shoal-ease) 620ms backwards; }
@keyframes wm-draw { from { opacity: 1; stroke-dashoffset: 1; } to { opacity: 1; stroke-dashoffset: 0; } }
@keyframes wm-gone { from { opacity: 1; } to { opacity: 0; } }
@keyframes wm-left { from { opacity: 0; transform: translateX(-34px); } }
@keyframes wm-right { from { opacity: 0; transform: translateX(34px); } }
@keyframes wm-in { from { opacity: 0; } }
.door-band { position: relative; flex: 1; min-height: clamp(280px, 44vh, 460px); margin-top: 18px; }
.door-haze { position: absolute; inset: 0; background: url(/img/haze-noon.jpg?v=3) center 50% / cover; -webkit-mask-image: linear-gradient(transparent, #000 34%, #000 74%, transparent); mask-image: linear-gradient(transparent, #000 34%, #000 74%, transparent); }
@media (prefers-color-scheme: dark) {
  .door-haze { background-image: url(/img/haze-dusk.jpg?v=5); background-position: center 42%; }
  /* the dark picture is the split itself, navy water and a copper shore: let it stand and fade only at the foot */
  .av.mono img { filter: invert(1) hue-rotate(180deg); }
  .band-haze, .ch-intro::before, .profile-cover { -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
}
.water-card { position: absolute; right: clamp(16px, 5vw, 72px); bottom: 12%; display: flex; flex-direction: column; gap: 4px; max-width: 320px; padding: 14px 20px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--fg); }
.water-card b { font: 500 14.5px/1.35 var(--font); }
.water-card span { color: var(--muted); font-size: 12.5px; }
.water-card.in { animation: wm-card var(--shoal-panel) var(--shoal-ease); }
@keyframes wm-card { from { opacity: 0; transform: translate(-6px, 6px); } }
.door-foot { margin: 0; padding: 4px 24px 24px; text-align: center; }

.me-menu { position: relative; margin-top: 6px; }
.me-menu summary { list-style: none; cursor: pointer; display: block; }
.me-menu summary::-webkit-details-marker { display: none; }
.me-pop { position: absolute; left: 52px; bottom: 0; z-index: 30; display: flex; flex-direction: column; min-width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); box-shadow: var(--shadow); }
.me-pop a, .me-pop button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.me-pop a:hover, .me-pop button:hover { background: var(--surface-2); }

/* About and Settings: the handbook's page, a label on the left and the words on the right */
.about, .settings { flex: 1; padding: 4px 28px 48px; overflow-y: auto; }
.about section, .settings section { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 70ch); gap: 8px 44px; padding: 22px 0; border-bottom: 1px solid var(--line-2); }
.about h2, .settings h2 { margin: 0; font-size: 15px; font-weight: 600; }
.about p { grid-column: 2; margin: 0; line-height: 1.65; }
.settings section > :not(h2) { grid-column: 2; }
.settings .meta { margin: 0 0 6px; }
.chan-list { flex: 1; padding: 0 0 32px; }
.chan-sec { margin: 22px 28px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chan-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 3fr) 90px 80px 64px; align-items: center; gap: 14px; padding: 10px 28px; border-bottom: 1px solid var(--line-2); }
.chan-row:hover { background: var(--hover); }
.chan-row .btn { justify-self: end; }
.chan-name { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); min-width: 0; }
.chan-topic { color: var(--fg-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-sec { margin: 14px 16px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.panel-members .now-row { margin: 0 8px; }
.main > .acts, .profile .acts { overflow: visible; }
.new-channel { margin: 16px 20px 4px; }
.new-channel summary { list-style: none; display: inline-flex; }
.new-channel summary::-webkit-details-marker { display: none; }
.form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-top: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.form input:not([type=radio]), .form textarea { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit; font-weight: 400; }
.form textarea { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }
.kinds { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.kinds legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.kinds label { flex-direction: row; align-items: center; font-weight: 400; }
.search-big { display: flex; gap: 8px; padding: 16px 20px 8px; max-width: 760px; }
.search-big input { flex: 1; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; font-size: 15px; }
.ref-page { flex: 1; overflow-y: auto; padding: 16px 20px 32px; }
.ref-page > .card { max-width: 760px; margin-top: 0; padding: 14px 16px; }
.ref-page > .card .card-title { font-size: 17px; }
.ref-start { max-width: 760px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.ref-start h3 { margin: 0 0 6px; font-size: 14px; }
.ref-start-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ref-start textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; margin: 8px 0; }
.ref-page .acts { overflow: visible; padding: 0; }
.ref-page .ctx-row { margin: 0 -20px; }

/* ---- overlays ---------------------------------------------------------------- */

.switcher { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; background: rgba(0, 0, 0, .28); }
.switcher-box { width: min(560px, calc(100vw - 32px)); background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.switcher-box input { width: 100%; height: 54px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--fg); font: 17px var(--font); outline: none; }
.switcher-list { padding: 6px; max-height: 50vh; overflow-y: auto; }
.switcher-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; font-size: 14.5px; }
.switcher-item.on, .switcher-item:hover { background: var(--surface-2); }
.picker { position: fixed; z-index: 40; display: grid; grid-template-columns: repeat(4, 36px); gap: 2px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.picker button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; font-size: 20px; cursor: pointer; }
.picker button:hover { background: var(--surface-2); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); padding: 9px 16px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 13px; box-shadow: var(--shadow); animation: rise var(--shoal-panel) var(--shoal-ease); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---- narrower screens ----------------------------------------------------------- */

@media (max-width: 1180px) {
  body.with-panel .app { grid-template-columns: 72px 232px minmax(0, 1fr) 380px; }
  .ch-search { display: none; }
  .forum.with-side { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); }
  .who { grid-template-columns: 56px minmax(150px, 1fr) minmax(0, 2fr) 130px 36px; }
  .who-now { display: none; }
}
@media (max-width: 960px) {
  body.with-panel .app { grid-template-columns: 72px minmax(0, 1fr) 380px; }
  body.with-panel .side { display: none; }
  .forum.with-side { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; min-height: 0; border-left: 0; border-top: 1px solid var(--line-2); }
  .fposts-head { display: none; }
  .fpost { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .fpost-by { display: none; }
  .fpost-at { grid-column: 3; }
  .fpost-n { grid-column: 3; grid-row: 1; justify-self: end; align-self: start; }
  .fpost-at { grid-row: 1; align-self: end; }
  .who { grid-template-columns: 48px minmax(0, 1fr) 36px; }
  .who-head, .who-when { display: none; }
  .who-does { grid-column: 2; grid-row: 2; }
  .who-go { grid-column: 3; grid-row: 1; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .about section, .settings section { grid-template-columns: minmax(0, 1fr); }
  .about p, .settings section > :not(h2) { grid-column: 1; }
}
@media (max-width: 760px) {
  .app, body.with-panel .app { grid-template-columns: minmax(0, 1fr); }
  .main { margin: 0; border-radius: 0; box-shadow: none; }
  /* on a phone the four tabs are a bar at the bottom, and a tab's column slides in */
  .app, body.with-panel .app { height: calc(100dvh - 56px - env(safe-area-inset-bottom)); }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; flex-direction: row; justify-content: space-around; gap: 0; height: calc(56px + env(safe-area-inset-bottom)); padding: 4px 6px env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line-2); }
  .rail-logo, .rail .grow, .rail-extra { display: none; }
  .rail-item { flex: 1; width: auto; padding: 4px 0 2px; font-size: 10.5px; }
  .rail-item.on { background: none; box-shadow: none; color: var(--ink); }
  .rail-item .badge { right: calc(50% - 22px); }
  .me-menu { margin: 0; align-self: center; flex: none; width: 52px; display: grid; place-items: center; }
  .me-pop { left: auto; right: 0; bottom: calc(100% + 8px); }
  .side { position: fixed; top: 0; bottom: 0; z-index: 30; background: var(--frame); transform: translateX(calc(-100% - 20px)); transition: transform var(--shoal-panel) var(--shoal-ease); }
  .side, body.with-panel .side { display: flex; left: 0; width: min(300px, calc(100vw - 56px)); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .32); }
  .panel, body.with-panel .panel { position: fixed; inset: 0 0 calc(56px + env(safe-area-inset-bottom)); z-index: 20; margin: 0; border: 0; border-radius: 0; }
  .narrow-tabs { display: flex; }
  .narrow-only { display: inline-grid !important; }
  .ch-head { padding: 8px 10px; gap: 6px; }
  .ch-topic, .ch-members, .ch-head .chip { display: none; }
  .band { min-height: 112px; padding: 40px 16px 12px; }
  .band h1 { font-size: 30px; }
  .band p { display: none; }
  .sq-compose, .post, .who, .find-box, .chan-row { padding-left: 14px; padding-right: 12px; }
  .find-box .ic { left: 24px; }
  .post-time { min-width: 0; }
  .msg { padding-left: 12px; padding-right: 12px; grid-template-columns: 44px minmax(0, 1fr); }
  .msg.sys { padding-left: 56px; padding-right: 12px; }
  .composer { padding: 0 10px 10px; }
  .composer-hint span:first-child { display: none; }
  .composer-off { margin: 0 10px 10px; flex-wrap: wrap; }
  .forum-main, .ref-page { padding: 12px 12px 24px; }
  .profile-grid { padding: 0 16px 32px; }
  .forum-new-more { padding-left: 12px; }
  .chan-row { grid-template-columns: minmax(0, 1fr) auto; }
  .chan-topic, .chan-row .meta { display: none; }
  .act-why, .act-item .msg, .ctx { padding-left: 14px; margin-left: 0; }
  .card, .digest { max-width: 100%; }
  .card .chips, .card-sub { margin-left: 0; }
}

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