
.chat .bar-inner { max-width: none; padding-left: max(var(--s4), env(safe-area-inset-left, 0px)); padding-right: max(var(--s4), env(safe-area-inset-right, 0px)); }
@media (min-width: 901px) and (max-width: 1100px) { .chat .bar-right .search { width: clamp(160px, calc(100vw - 680px), 392px); } }
@media (min-width: 1101px) and (max-width: 1240px) { .chat .bar-right .search { width: clamp(220px, calc(100vw - 840px), 392px); } }

@media (max-width: 760px), (pointer: coarse) { html.chat { --control-height: 44px; } }

html.chat body { -webkit-user-select: none; user-select: none; }
html.chat :is(input, textarea, [contenteditable="true"], [contenteditable=""], [contenteditable="plaintext-only"]) { -webkit-user-select: text; user-select: text; }
@media not (pointer: coarse) {
  html.chat :is(.m-body, .mq-body, .mq-words, .mq-note, .mv-near-body, .mv-note, .pv-title, .pv-author, .pv-desc, .mono, pre, code, .bytes, .disclosure-code, .mq-id, .vn-mono) { -webkit-user-select: text; user-select: text; }
  html.chat .m-body :is(button, .m-edited, .md-spoiler[role="button"], summary, .pv-cap, .pv-site) { -webkit-user-select: none; user-select: none; }
}
html.chat ::selection { background: var(--control); color: var(--text); }

.chat :focus-visible { outline-color: var(--text); }

html.chat, html.chat body { overscroll-behavior: none; }
.chat .ses-live { position: fixed; top: 0; left: 0; }
.rail, .side-body, .people, .msgs, .drawer, .ctx, .ta-strip { overscroll-behavior: none; }

.app {
  --bar: 49px;
  display: grid; grid-template-columns: 72px 240px minmax(0, 1fr) 240px; grid-template-areas: "rail side lead people";
  min-height: calc(100dvh - var(--bar));
}
.app[data-view="channel"] { height: calc(100dvh - var(--bar)); }
.rail, .side { position: sticky; top: var(--bar); height: calc(100dvh - var(--bar)); min-width: 0; }
.lead { grid-area: lead; position: relative; min-width: 0; margin: 0 var(--s2) var(--s2) 0; border-radius: var(--radius-card); background: var(--surface); outline: none; }
.app[data-view="channel"] .lead { display: flex; flex-direction: column; overflow: hidden; height: calc(100dvh - var(--bar) - var(--s2)); }
.app[data-view="channel"] .lead { --pad-x: var(--s4); }
.app:not([data-view="channel"]) .lead { padding: var(--s5) var(--pad-x) var(--s7); }
.people { grid-area: people; position: sticky; top: var(--bar); height: calc(100dvh - var(--bar)); min-width: 0; overflow-y: auto; padding: 0 var(--s2) var(--s4) 0; scrollbar-width: thin; border-left: 1px solid var(--rule); }
.app[data-people="off"] { grid-template-columns: 72px 240px minmax(0, 1fr) 0; }
.app[data-people="off"] .people { display: none; }

.skel-line.w120 { width: 120px; }
.skel-line { display: inline-block; height: 12px; border-radius: var(--radius-small); background: var(--active); vertical-align: middle; }
.rail-skel { width: 48px; height: 48px; margin: 0 auto; border-radius: var(--radius-nested); background: var(--panel); }
.chan-skel { height: 32px; margin: 0 var(--s2); }
.chan-skel::before { content: ""; display: block; width: 60%; height: 12px; margin-top: 10px; margin-left: 32px; border-radius: var(--radius-small); background: var(--panel); }
.view-skel .skel-head { height: 48px; border-bottom: 1px solid var(--rule); }
.app:not([data-view="channel"]) .view-skel .skel-head { display: none; }
.nojs { padding: var(--s5) var(--pad-x); }
.nojs h1 { font-size: var(--fs-title); line-height: var(--lh-title); }
.nojs p { margin-top: var(--s3); color: var(--muted); max-width: 60ch; }

.rail { grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s3) 0; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-list { display: flex; flex-direction: column; gap: var(--s2); width: 100%; margin: 0; padding: 0; list-style: none; }
.rail-item { position: relative; display: grid; place-items: center; width: 72px; height: 48px; flex: none; }
.rail-item::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 2px; height: 24px; border-radius: 0 2px 2px 0; background: var(--text);
  transform: scaleY(0); transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.rail-item.unread::before { transform: scaleY(0.34); background: var(--muted); }
@media (hover: hover) { .rail-item:hover::before { transform: scaleY(0.67); background: var(--muted); } }
.rail-item[aria-current="page"]::before { transform: scaleY(1); background: var(--text); }
.rail-icon {
  display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: var(--radius-nested);
  background: var(--panel); color: var(--muted); font-size: var(--fs-section); font-weight: 600; letter-spacing: 0.01em;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.rail-icon svg { width: 20px; height: 20px; }
.rail-icon img { display: block; width: 48px; height: 48px; object-fit: cover; }
.rail-item[aria-current="page"] .rail-icon { background: var(--active); color: var(--text); }
@media (hover: hover) { .rail-item:hover .rail-icon { background: var(--active); color: var(--text); } }
.rail-item:focus-visible { outline: none; }
.rail-item:focus-visible .rail-icon { outline: 2px solid var(--text); outline-offset: 2px; }
.rail-tool .rail-icon { background: transparent; box-shadow: inset 0 0 0 1px var(--control); }
.rail-sep { flex: none; width: 32px; height: 1px; background: var(--rule); }
.rail-tools { display: flex; flex-direction: column; align-items: center; gap: var(--s2); width: 100%; margin-top: auto; padding-top: var(--s2); }
.need {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; flex: none; border-radius: var(--round);
  background: var(--primary); color: var(--primary-ink); font: 600 var(--fs-small)/18px var(--font); font-variant-numeric: tabular-nums;
}
.rail-item .need { position: absolute; right: 12px; bottom: -4px; outline: 3px solid var(--ground); }
.tip {
  position: fixed; z-index: 30; max-width: 240px; padding: var(--s2) var(--s3); border-radius: var(--radius-small);
  background: var(--surface); color: var(--text); font: 500 var(--fs-body)/var(--lh-body) var(--font); pointer-events: none;
  box-shadow: var(--shadow-float);
}
.tip[hidden] { display: none; }
.tip .tip-sub { display: block; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 400; }

.side { grid-area: side; display: flex; flex-direction: column; }
.side-head { flex: none; display: flex; align-items: center; gap: var(--s2); height: 48px; padding: 0 var(--s2) 0 var(--s4); }
.side-title { flex: 1; min-width: 0; overflow: hidden; font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.side-menu-btn { position: relative; }
.side-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--s2) var(--s4); scrollbar-width: thin; }
.chan {
  position: relative; display: flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s2); border-radius: var(--radius-small);
  color: var(--muted); font-weight: 500; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.chan-row + .chan-row { margin-top: 2px; }
.chan > svg { width: 16px; height: 16px; color: var(--faint); }
.chan:hover { background: var(--panel); color: var(--text); }
.chan[aria-current="page"] { background: var(--active); color: var(--text); }
.chan[aria-current="page"] > svg { color: var(--muted); }
.chan.unread { color: var(--text); font-weight: 600; }
.chan.unread::before { content: ""; position: absolute; left: calc(-1 * var(--s2)); top: 12px; width: 2px; height: 8px; border-radius: 0 2px 2px 0; background: var(--text); }
.chan-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan:focus-visible { outline-offset: -2px; }
.cat { display: flex; align-items: center; gap: var(--s1); flex: 1; min-width: 0; height: 24px; padding: 0 var(--s2) 0 var(--s1); border: 0; background: none; color: var(--muted); font: 500 var(--fs-small)/var(--lh-small) var(--font); cursor: pointer; text-align: left; }
.cat:hover { color: var(--text); }
.cat svg { width: 12px; height: 12px; transition: transform var(--t-fast) var(--ease-out); }
.cat[aria-expanded="false"] svg { transform: rotate(-90deg); }
.cat-list[hidden] { display: none; }
.side-note { padding: var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.side-foot { flex: none; flex-direction: column; align-items: flex-start; gap: var(--s2); margin: 0; padding: var(--s3) var(--s4) var(--s4); }
.side-foot > p:first-child { color: var(--muted); }
.side-foot .foot-u { gap: var(--s1) var(--s3); }
.side-foot > * { max-width: 100%; }
.side-foot .foot-u a[data-canary] { min-width: 0; }

.menu {
  position: absolute; z-index: 22; min-width: 220px; padding: var(--s2); border-radius: var(--radius-card); background: var(--surface);
  box-shadow: var(--shadow-float);
}
.menu[hidden] { display: none; }
.menu [role="menuitem"] {
  display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 36px; padding: 0 var(--s2); border: 0; border-radius: var(--radius-small);
  background: none; color: var(--text); font: 500 var(--fs-body)/var(--lh-body) var(--font); text-align: left; cursor: pointer;
}
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus-visible { background: var(--active); outline: none; }
.menu [role="menuitem"] svg { width: 16px; height: 16px; color: var(--muted); }
.menu .menu-sep { height: 1px; margin: var(--s2) var(--s1); background: var(--rule); }
@media (prefers-reduced-motion: no-preference) {
  .menu, .tip, .hover-card, .ta-strip { transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
  @starting-style { .menu:not([hidden]), .hover-card:not([hidden]) { opacity: 0; transform: translateY(-4px); } }
  @starting-style { .ta-strip:not([hidden]) { opacity: 0; transform: translateY(4px); } }
}

.ch-head { flex: none; display: flex; align-items: center; gap: var(--s3); height: 48px; padding: 0 var(--s2) 0 var(--pad-x); border-bottom: 1px solid var(--rule); }
.ch-head h1 { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }
.ch-head h1 svg { width: 18px; height: 18px; color: var(--faint); }
.ch-head h1 span { overflow: hidden; text-overflow: ellipsis; }
.ch-topic { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.ch-tools { display: flex; gap: var(--s1); margin-left: auto; flex: none; }
.ch-tools .icon-btn, .side-head .icon-btn, .ch-back { width: 32px; height: 32px; }
.ch-tools .icon-btn svg, .side-head .icon-btn svg, .ch-back svg { width: 16px; height: 16px; }
.icon-btn[aria-pressed="true"] { background: var(--active); color: var(--text); }
.ch-back { display: none; }
.ch-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }

.msgs { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; overscroll-behavior: none; outline: none; scrollbar-width: thin; }
.msgs:focus-visible { box-shadow: inset 0 0 0 2px var(--control-hover); }
.feed { padding: 0; }
.feed::after { content: ""; display: block; height: var(--s3); }
.feed > .row { display: flow-root; }
.feed > .sp { height: 0; }
.feed-top { padding: var(--s5) var(--pad-x) var(--s4); }
.feed-top h2 { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; }
.feed-top.quiet { padding-top: var(--s4); padding-bottom: 0; }
.feed-top p { margin-top: var(--s1); color: var(--muted); max-width: 60ch; }
.feed-more { display: flex; align-items: center; justify-content: center; height: 40px; color: var(--muted); font-size: var(--fs-small); }

.m { position: relative; padding: 2px 48px 2px calc(var(--pad-x) + 40px + var(--s4)); outline: none; }
.m.head { margin-top: var(--s2); }
.m:hover, .m:focus-within, .m.open { background: var(--raised); }
.m:focus-visible { box-shadow: inset 2px 0 0 var(--text); }
.m.me-mentioned { background: color-mix(in srgb, var(--warning) 8%, transparent); box-shadow: inset 2px 0 0 var(--warning); }
.m.me-mentioned:hover, .m.me-mentioned:focus-within, .m.me-mentioned.open { background: color-mix(in srgb, var(--warning) 13%, transparent); }
.m.me-mentioned:focus-visible { box-shadow: inset 2px 0 0 var(--text); }
.m-av { position: absolute; left: var(--pad-x); top: 2px; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border: 0; padding: 0; border-radius: 50%; background: var(--person-bg); color: var(--person-ink); font: 600 var(--fs-body)/1 var(--font); cursor: pointer; }
.m-av img { display: block; width: 40px; height: 40px; object-fit: cover; }
.m-av.p1, .pic.p1 { background: var(--p1-bg); color: var(--p1-ink); }
.m-av.p2, .pic.p2 { background: var(--p2-bg); color: var(--p2-ink); }
.m-av.p3, .pic.p3 { background: var(--p3-bg); color: var(--p3-ink); }
.m-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); min-width: 0; min-height: var(--lh-body); white-space: nowrap; }
.m-name { flex: 0 1 auto; min-width: 0; overflow: hidden; padding: 0; border: 0; background: none; color: var(--text); font: 600 var(--fs-body)/var(--lh-body) var(--font); text-overflow: ellipsis; cursor: pointer; transition: color var(--t-slow) var(--ease-out); }
.m-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.m-name.ok { color: var(--accent); }
.m-addr, .m-time { flex: none; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.m-addr:hover { color: var(--text); }
.m-orgs { display: inline-flex; gap: var(--s1); align-self: center; flex: none; }
.m-orgs .org-sq { align-self: center; }
.twin { flex: none; margin-left: 4px; color: var(--faint); font: 400 var(--fs-small)/var(--lh-small) var(--mono); letter-spacing: 0; white-space: nowrap; }
.m-h .twin { margin-left: calc(-1 * var(--s1)); }
.mention .twin { margin-left: 3px; }
.m-verdict { flex: none; color: var(--pill-warning-ink); font-size: var(--fs-small); line-height: var(--lh-small); }
.m-checking { flex: none; width: 0; margin-left: calc(-1 * var(--s2)); overflow: visible; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); }
.m-checking::before { content: ""; display: inline-block; width: var(--s2); }
.m-body { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.m-body p + p { margin-top: var(--s1); }
.m.bad .m-body { color: var(--pill-warning-ink); }
.m.sending .m-body { color: var(--muted); }
.m.failed .m-body { color: var(--pill-negative-ink); }
.m-gut { position: absolute; left: var(--pad-x); top: 2px; width: 40px; color: var(--faint); font-size: 11px; line-height: var(--lh-body); text-align: center; font-variant-numeric: tabular-nums; visibility: hidden; }
.m:hover .m-gut, .m:focus-within .m-gut { visibility: visible; }
.m-state { display: block; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.m.failed .m-state { color: var(--pill-negative-ink); }
.m-state .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); }
.m-body code, .md code { padding: 1px 4px; border-radius: 4px; background: var(--active); font-family: var(--mono); font-size: 12px; }
.m-body pre, .md pre { margin: var(--s1) 0; padding: var(--s2) var(--s3); overflow-x: auto; border-radius: var(--radius-small); background: var(--active); font-family: var(--mono); font-size: 12px; line-height: 18px; white-space: pre; }
.m-body pre code, .md pre code { padding: 0; background: none; }
.m-body blockquote, .md blockquote { margin: 0; padding-left: var(--s3); box-shadow: inset 2px 0 0 var(--control); color: var(--muted); }
.m-body a.ext, .md a.ext { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--control); overflow-wrap: anywhere; }
.m-body a.ext:hover, .md a.ext:hover { text-decoration-color: var(--text); }
.mention {
  display: inline-flex; align-items: baseline; gap: 2px; padding: 0 4px; border-radius: 4px; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink);
  font-weight: 500; white-space: nowrap; transition: background-color var(--t-fast) var(--ease-out);
}
.mention:hover, .mention:focus-visible { background: var(--active-hover); }
.mention .mention-addr { color: var(--muted); font-weight: 400; font-size: var(--fs-small); }
.mention.me { box-shadow: inset 0 0 0 1px var(--control-hover); }

.m-tools { position: absolute; z-index: 3; top: -14px; right: var(--s4); display: none; gap: 2px; padding: 2px; border-radius: var(--radius-small); background: var(--surface); box-shadow: var(--shadow-float); }
.m:hover .m-tools, .m:focus-within .m-tools, .m.open .m-tools { display: flex; }
.m-tools .icon-btn { width: 28px; height: 28px; }
.m-tools .icon-btn svg { width: 15px; height: 15px; }
.m-tools .icon-btn.done { color: var(--positive); }
:root[data-theme="light"] .m-tools { box-shadow: var(--shadow-float), 0 0 0 1px var(--rule); }

.m-proof > .rv-in { padding-top: var(--s2); padding-bottom: var(--s3); }
.m-proof .chain { margin-top: var(--s2); }
.chain.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chain.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step.warn { --line: var(--warning); }
.m-proof .proof-foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline; margin-top: var(--s3); }
.m-proof .proof-foot .text-btn, .m-proof .proof-foot .card-link { font-size: var(--fs-small); line-height: var(--lh-small); }
.m-proof .bytes { margin-top: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--radius-small); background: var(--surface); font-family: var(--mono); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }

.m-day, .m-new { position: relative; margin: var(--s5) var(--pad-x) 0; padding: 0 0 var(--s1) var(--s3); border-bottom: 1px solid var(--rule); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; font-variant-numeric: tabular-nums; }
.m-day::before, .m-new::before { content: ""; position: absolute; left: 0; bottom: -6px; width: 2px; height: 12px; background: var(--control); }
.m-new { margin-top: var(--s4); border-bottom-color: var(--text); color: var(--text); font-weight: 600; }
.m-new::before { background: var(--text); }

.bar-new {
  position: absolute; z-index: 4; top: var(--s2); left: var(--s4); right: var(--s4); display: flex; align-items: center; gap: var(--s3);
  height: 32px; padding: 0 var(--s2) 0 var(--s3); border-radius: var(--radius-nested); background: var(--active); color: var(--text); font-size: var(--fs-small); line-height: var(--lh-small);
}
.bar-new[hidden], .to-present[hidden] { display: none; }
.bar-new .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.bar-new .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text); }
.to-present {
  position: absolute; z-index: 4; right: var(--s4); bottom: var(--s3); display: inline-flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s3);
  border: 0; border-radius: var(--round); background: var(--primary); color: var(--primary-ink); font: 500 var(--fs-small)/var(--lh-small) var(--font); cursor: pointer;
  box-shadow: var(--shadow-float);
}
.to-present svg { width: 14px; height: 14px; }

.composer { --comp-pad: var(--s4); position: relative; flex: none; padding: 0 var(--comp-pad); }
.comp-box { position: relative; display: flex; align-items: flex-end; min-height: 44px; border-radius: var(--radius-nested); background: var(--raised); }
.comp-box:focus-within { box-shadow: inset 0 0 0 1px var(--control); }
.comp-field {
  position: relative; display: block; flex: 1; min-width: 0; min-height: 44px; max-height: 40vh; margin: 0; padding: 12px 0 12px var(--s4); border: 0; overflow-x: hidden; overflow-y: auto;
  background: none; color: var(--text); font: 400 var(--fs-body)/var(--lh-body) var(--font); outline: none; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
  cursor: text; overscroll-behavior: contain; scrollbar-width: thin;
}
.ed.ed-empty::before { content: attr(data-placeholder); float: left; width: 100%; margin-right: -100%; overflow: hidden; color: var(--faint); white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.ed .pill { height: auto; gap: 2px; padding: 0 4px; border-radius: 4px; align-items: baseline; vertical-align: baseline; font-size: inherit; line-height: inherit; cursor: default; }
.ed .pill:hover { background: var(--pill-neutral-bg); }
.ed img.cemo { display: inline-block; width: 22px; height: 22px; margin: -1px 1px; vertical-align: -5px; object-fit: contain; }
.ed img.cemo:not([src]) { visibility: hidden; }
.ed img.cemo.gone { visibility: hidden; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--rule); }
.comp-send { flex: none; width: 36px; height: 36px; margin: 4px; color: var(--faint); }
.comp-emoji { flex: none; width: 36px; height: 36px; margin: 4px 0 4px 4px; color: var(--faint); }
.comp-emoji svg { width: 16px; height: 16px; }
.comp-emoji:hover, .comp-emoji[aria-expanded="true"] { color: var(--text); }
.comp-send svg { width: 16px; height: 16px; }
.comp-box:has(.comp-field:not(.ed-empty)) .comp-send { color: var(--text); }
@media (pointer: fine) { .comp-send { display: none; } .comp-emoji { margin: 4px; } }
.comp-box:has(.comp-field.ed-empty) .comp-send { visibility: hidden; }
.comp-meta { display: flex; align-items: center; gap: var(--s3); height: 32px; padding: 0 var(--s1); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.comp-typing { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-count { flex: none; min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; color: var(--faint); }
.comp-count.near { color: var(--pill-warning-ink); }
.comp-count.over { color: var(--pill-negative-ink); }
.comp-closed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-height: 44px; padding: var(--s2) var(--s4); border-radius: var(--radius-nested); background: var(--raised); color: var(--muted); }
.comp-closed .grow { flex: 1; min-width: 200px; }
.comp-err { color: var(--pill-negative-ink); }

.ta-strip { position: absolute; z-index: 25; left: var(--comp-pad); right: var(--comp-pad); bottom: calc(100% + var(--s2)); max-height: 340px; overflow-y: auto; padding: var(--s2); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-float); scrollbar-width: thin; }
:root[data-theme="light"] .ta-strip { box-shadow: var(--shadow-float), 0 0 0 1px var(--rule); }
.ta-strip[hidden] { display: none; }
.ta-strip .ta-opt { cursor: pointer; }
.ta-strip-h { padding: var(--s1) var(--s2) var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 760px), (pointer: coarse) {
  .ta-strip { display: flex; align-items: center; gap: var(--s1); height: 56px; max-height: none; bottom: calc(100% + var(--s1)); padding: var(--s1); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .ta-strip::-webkit-scrollbar { display: none; }
  .ta-strip-h, .ta-strip .ta-enter { display: none; }
  .ta-strip .ta-opt { flex: none; gap: var(--s2); max-width: 248px; height: 48px; min-height: 0; padding: 0 var(--s3) 0 var(--s2); }
  .ta-strip .ta-av { width: 28px; height: 28px; }
}

.people-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--s2); height: 48px; padding: 0 var(--s2) 0 var(--s4); background: var(--ground); }
.people-head h2 { flex: 1; font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; }
.people-close { display: none; }
.role-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); margin: var(--s4) 0 var(--s1); padding: 0 var(--s3) 0 var(--s4); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; }
.role-h .fig { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.role-h:first-of-type { margin-top: 0; }
.mem {
  display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 44px; padding: var(--s1) var(--s2) var(--s1) var(--s4); border: 0; border-radius: var(--radius-small);
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--t-fast) var(--ease-out);
}
.mem:hover, .mem[aria-expanded="true"] { background: var(--panel); }
.mem:focus-visible { outline-offset: -2px; }
.pic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; overflow: hidden; border-radius: 50%; background: var(--person-bg); color: var(--person-ink); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.01em; }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic.s24 { width: 24px; height: 24px; font-size: 11px; }
.pic.s56 { width: 56px; height: 56px; font-size: 18px; }
.pic.srv { border-radius: var(--radius-nested); background: var(--active); color: var(--text); }
.pic.srv.s56 { border-radius: var(--radius-card); }
.mem-txt { display: grid; min-width: 0; flex: 1; }
.mem-name { display: flex; align-items: center; gap: var(--s1); min-width: 0; font-weight: 500; }
.mem-name > bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-addr { overflow: hidden; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); text-overflow: ellipsis; white-space: nowrap; }
.org-sq { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; overflow: hidden; border-radius: var(--radius-small); background: var(--active); color: var(--text); font-size: 11px; font-weight: 600; }
.org-sq img { display: block; width: 100%; height: 100%; object-fit: contain; }
.org-sq.s24 { width: 24px; height: 24px; border-radius: var(--radius-small); font-size: var(--fs-small); }

.hover-card {
  position: fixed; z-index: 28; width: 320px; max-width: calc(100vw - 32px); padding: var(--s4); border-radius: var(--radius-card); background: var(--surface);
  box-shadow: var(--shadow-float);
}
:root[data-theme="light"] .hover-card { box-shadow: var(--shadow-float), 0 0 0 1px var(--rule); }
.hover-card[hidden] { display: none; }
.cs-top { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.cs-who { display: grid; min-width: 0; }
.cs-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-weight: 600; overflow-wrap: anywhere; }
.cs-addr { margin-top: 2px; color: var(--text); font-size: var(--fs-body); line-height: var(--lh-body); overflow-wrap: anywhere; }
.cs-addr .cs-alias { color: var(--muted); font-size: var(--fs-small); }
.cs-badges { display: inline-flex; align-items: center; gap: var(--s1); height: 24px; padding: 0 var(--s1); border-radius: var(--round); background: var(--panel); }
:root[data-theme="light"] .cs-badges { background: var(--active); }
.cs-badges img { display: block; width: 18px; height: 18px; }
.cs-links { display: grid; gap: var(--s1); margin-top: var(--s3); }
.cs-link { display: flex; align-items: center; gap: var(--s2); min-width: 0; color: var(--text); }
.cs-link svg { width: 16px; height: 16px; color: var(--muted); }
.cs-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-link .how { flex: none; color: var(--faint); font-size: var(--fs-small); }
.cs-none { margin-top: var(--s3); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.cs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s4); }

.drawer {
  position: fixed; z-index: 26; top: var(--bar, 49px); right: 0; bottom: 0; width: 340px; max-width: 100vw; overflow-y: auto; overscroll-behavior: none;
  padding: var(--s4) var(--s4) var(--s5); background: var(--raised); border-left: 1px solid var(--rule); box-shadow: var(--shadow-dialog);
}
.drawer[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .drawer { transition: transform var(--t-slow) var(--ease-out), opacity var(--t-slow) var(--ease-out); }
  @starting-style { .drawer:not([hidden]) { transform: translateX(16px); opacity: 0; } }
  @media (max-width: 760px) { @starting-style { .drawer:not([hidden]) { transform: translateY(24px); opacity: 0; } } }
}
.drawer .pf-status .answer { margin-top: var(--s5); }
.drawer .answer.quiet { color: var(--text); }
.drawer .answer.bad { color: var(--pill-negative-ink); }
ol.chain.mini { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--s4); }
.chain.mini .step { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--s3); align-items: baseline; padding: 2px 0 var(--s2) var(--s4); border-left: 2px solid var(--line); transition: border-color var(--t-slow) var(--ease-out); }
.chain.mini .step:last-child { padding-bottom: 2px; }
.chain.mini .step::before { left: -2px; top: 11px; width: 12px; height: 2px; }
.chain.mini .step .k { grid-row: auto; padding: 0; border: 0; white-space: nowrap; }
.chain.mini .step .v, .chain.mini .step:last-child .v { margin: 0; padding: 0; border: 0; font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 500; font-variant-numeric: tabular-nums; }
.cs-keys { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.pf-line { color: var(--text); }
.pf-line.warn, .reg .r.warn { color: var(--pill-warning-ink); }
.pf-list { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.pf-list li { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.pf-list img { flex: none; }
.pf-sub { color: var(--muted); font-size: var(--fs-small); }
.pf-keys .s.mono { font-family: var(--mono); font-size: 12px; }
.pf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s5); }
.pf-out { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.need-card a.inline { color: var(--text); }
.drawer:focus, .drawer:focus-visible { outline: none; }
.drawer-close { position: absolute; top: var(--s2); right: var(--s2); width: 32px; height: 32px; }
.drawer .cs-top { padding-right: var(--s5); }
.drawer h2 { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; }
.drawer section { margin-top: var(--s5); }
.drawer section > h3 { margin-bottom: var(--s2); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 600; }
.drawer .answer { margin-top: var(--s5); font-size: 26px; line-height: 30px; }
.drawer .answer.warn { color: var(--pill-warning-ink); }
.drawer .finding { margin-top: var(--s1); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.reg { margin: 0; padding: 0; list-style: none; }
.reg > li { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: var(--s2) 0; border-top: 1px solid var(--rule); }
.reg > li:last-child { border-bottom: 1px solid var(--rule); }
.reg .grow { flex: 1; min-width: 0; }
.reg .t { font-weight: 500; overflow-wrap: anywhere; }
.reg .s { color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); overflow-wrap: anywhere; }
.reg > li > svg { width: 16px; height: 16px; color: var(--faint); }
.reg .row-acts { display: flex; flex: none; gap: var(--s4); }
.reg .r { flex: none; color: var(--muted); font-size: var(--fs-small); text-align: right; font-variant-numeric: tabular-nums; }
.reg-h { display: flex; align-items: baseline; gap: var(--s3); padding-bottom: var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.reg-h + .reg > li:first-child { border-top-color: var(--rule); }
.reg-h .r, .vsec > .reg .r { min-width: 72px; text-align: right; }
.reg-h .r, .reg-h .grow { flex: none; }
.reg-h .grow { flex: 1; }
.vsec > .reg .r { color: var(--text); font-size: var(--fs-body); }
.reg .r-date, .reg-h .r-date { min-width: 96px; }
.reg .r-act, .reg-h .r-act { flex: none; display: flex; justify-content: flex-end; width: 64px; }
.reg .r .r-n { color: var(--muted); font-size: var(--fs-small); }
.reg .r .need + .r-n { margin-left: var(--s2); }

.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); }
.page-h h1 { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; letter-spacing: -0.015em; }
.page-h .page-sub { margin-top: var(--s1); color: var(--muted); }
.stamp-row { margin-top: var(--s2); }
.stamp-row .answer.warn { color: var(--pill-warning-ink); }
.stamp-row .answer.bad { color: var(--pill-negative-ink); }
.stamp-row .finding { margin-top: var(--s2); color: var(--muted); max-width: 64ch; }
.vsec { margin-top: var(--sec-gap); }
.vsec > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s3); margin-bottom: var(--s3); }
.vsec h2 { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; letter-spacing: -0.005em; }
.vsec .sub { margin-top: var(--s1); color: var(--muted); max-width: 64ch; }
.vsec .meta { color: var(--muted); font-size: var(--fs-small); }
.row-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s3) var(--s2); }
.row-form .grow { flex: 1 1 260px; min-width: 0; }
.fld { display: grid; gap: var(--s2); }
.fld + .fld { margin-top: var(--s4); }
.fld label, .fld .lbl { font-weight: 500; }
.fld .hint { color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.inp, .fld textarea, .fld select {
  width: 100%; min-height: var(--control-height); padding: 0 var(--s3); border: 1px solid var(--control); border-radius: var(--radius-nested);
  background: var(--field, var(--ground)); color: var(--text); font-size: var(--fs-body); line-height: var(--lh-body);
}
.fld textarea { padding: var(--s2) var(--s3); resize: vertical; min-height: 96px; }
@media (max-width: 760px), (pointer: coarse) { .inp:not(.mono) { font-size: 16px; } }
.inp, .fld textarea { transition: border-color var(--t-fast) var(--ease-out); }
.inp:not(:disabled):hover, .fld textarea:not(:disabled):hover { border-color: var(--control-hover); }
.inp:focus-visible, .fld textarea:focus-visible, .fld select:focus-visible { outline: 2px solid var(--text); outline-offset: 0; border-color: transparent; }
.inp::placeholder, .fld textarea::placeholder { color: var(--faint); }
.inp.mono { font-family: var(--mono); font-size: var(--fs-small); }
.check { display: flex; align-items: flex-start; gap: var(--s2); }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--text); flex: none; }
.check .s { display: block; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.form-err { margin-top: var(--s2); color: var(--pill-negative-ink); font-size: var(--fs-small); line-height: var(--lh-small); min-height: var(--lh-small); }
.form-err:empty { min-height: 0; }
.set-actions .form-err, .row-form .form-err { margin-top: 0; align-self: center; }
.said { color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.rv.slid > .rv-in > .confirm, .rv.slid > .rv-in > form { margin-top: var(--s3); }
.rv.slid > .rv-in > .role-form { padding-bottom: var(--s3); }
.receipt { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); margin-top: var(--s3); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.receipt b { color: var(--text); font-weight: 500; }
.confirm { margin-top: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--radius-nested); background: var(--pill-negative-bg); }
.confirm p { color: var(--text); }
.confirm p b { color: var(--pill-negative-ink); font-weight: 600; }
.confirm .actions { margin-top: var(--s3); flex-wrap: wrap; }
.srv-row .pic { width: 40px; height: 40px; }
.invite-head { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.invite-head .stamp-row { margin-top: 0; min-width: 0; }
.invite-desc { margin-top: var(--s4); max-width: 64ch; }
.invite-head + .invite-desc + *, .invite-head + .receipt, .invite-head + .ways, .invite-head + .set-actions { margin-top: var(--s5); }
.invite-note { margin-top: var(--s5); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.inp:disabled, .fld textarea:disabled { color: var(--muted); background: transparent; border-style: dashed; }
.check input:disabled + span { color: var(--muted); }
.srv-row .need { margin-left: var(--s1); }
.empty { color: var(--muted); padding: var(--s3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.ways { margin-top: var(--s5); }
.ways > li { gap: var(--s4); }
.ways .btn { flex: none; }
.vsec > header + .ways { margin-top: 0; }
.ways > .way-row { flex-wrap: wrap; padding: var(--s3) 0; }
.way-row > .t { flex: none; width: 160px; }
.way-row > .row-form { flex: 1 1 320px; min-width: 0; align-items: center; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--col-gap); align-items: start; }
.cols > * { min-width: 0; }
.aside-card { padding-top: var(--s1); }
.aside-card .cs-foot { margin-top: var(--s3); }
.aside-card .pf-status .answer { margin-top: var(--s5); font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: -0.015em; }
.aside-card .answer.quiet { color: var(--text); }
.aside-card .answer.bad { color: var(--pill-negative-ink); }
.aside-card .finding { margin-top: var(--s1); font-size: var(--fs-small); line-height: var(--lh-small); }
.cs-open { color: inherit; }
.aside-card .cs-name { font-size: var(--fs-section); line-height: var(--lh-section); }
.cs-open:hover { text-decoration: underline; text-underline-offset: 3px; }

.act-stamp { margin-bottom: var(--s2); }
.act-title { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; letter-spacing: -0.015em; }
.act { margin-top: var(--s6); }
.act .reg-h, .act-link { gap: var(--s4); }
.act-c { flex: none; width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-reg > li.act-group { min-height: 0; padding: var(--s5) 0 var(--s2); gap: var(--s2); border-top: 0; color: var(--text); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 600; }
.act-reg > li.act-group:first-child { padding-top: var(--s2); }
.act-reg > li.act-row { padding: 0; }
.act-link { display: flex; align-items: center; flex: 1; min-width: 0; min-height: 44px; color: var(--text); transition: background-color var(--t-fast) var(--ease-out); }
.act-link:hover .act-c { text-decoration: underline; text-underline-offset: 3px; }
.act-link .act-c { font-weight: 500; }
.act-last { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.act-who { color: var(--text); font-weight: 500; }
.act-who.ok { color: var(--accent); }
.act-who.bad { color: var(--pill-warning-ink); }
.act .r, .act .reg-h .r { min-width: 64px; }
.act-n { color: var(--text); font-size: var(--fs-section); font-weight: 600; }
.act-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); margin-top: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--muted); }
.pic.s20 { width: 20px; height: 20px; font-size: 10px; }
.pic.s24.srv, .pic.s20.srv { border-radius: var(--radius-small); }
.ways-end { margin-top: var(--s6); }
.ways-quiet { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.ways-quiet .text-btn[aria-expanded="true"] { color: var(--text); }
.ways-box .rv-in > form { padding-top: var(--s3); }

.reg.one-line > li { min-height: 44px; padding: var(--s1) 0; }
.reg .line { display: flex; align-items: baseline; gap: var(--s3); min-width: 0; }
.reg .line > .t { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg .line > .s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-body); }
.empty-row { justify-content: space-between; color: var(--muted); }

.set-panel .reg > li, .set-panel .reg-h { gap: var(--s4); }
.set-panel .c-main { flex: 1 1 0; display: flex; align-items: center; gap: var(--s2); min-width: 0; overflow: hidden; white-space: nowrap; }
.set-panel .c-main > bdi { overflow: hidden; text-overflow: ellipsis; }
.set-panel .c-main > svg { width: 16px; height: 16px; color: var(--faint); }
.set-panel .c-sub, .set-panel .c-by { flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.set-panel .c-by { flex: 0 1 120px; }
.set-panel .reg .r { min-width: 56px; color: var(--text); font-size: var(--fs-body); }
.set-panel .c-acts, .set-panel .reg .row-acts { flex: none; display: flex; justify-content: flex-end; gap: var(--s4); min-width: var(--acts, 128px); }
#members { --acts: 184px; }
#invites { --acts: 176px; }
#bans { --acts: 140px; }
#roles { --acts: 140px; }
.set-sec.ends > header h2 { color: var(--pill-negative-ink); }
.btn.final { border-color: var(--negative-border); color: var(--pill-negative-ink); }
.btn.final:hover, .btn.final[aria-expanded="true"] { background: var(--pill-negative-bg); border-color: var(--negative); }
.aside-note { margin-top: var(--s3); color: var(--muted); }
.people .side-pad { padding: 0 var(--s3) 0 var(--s4); }
.filter { flex: 0 1 320px; min-width: 240px; }
.narrow { max-width: 560px; }

.settings { max-width: 960px; margin: 0 auto; }
.set-sec { padding-top: var(--s6); margin-top: var(--s6); border-top: 1px solid var(--rule); }
.settings .sec-index + .set-sec { margin-top: 0; border-top: 0; }
.set-panel { min-width: 0; }
.set-sec > header { margin-bottom: var(--s4); }
.set-sec > header h2 { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; }
.set-sec > header p { margin-top: var(--s1); color: var(--muted); }
.set-sec > header .ro { margin-top: var(--s2); color: var(--pill-warning-ink); font-size: var(--fs-small); line-height: var(--lh-small); }
.gen { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.gen-sum { display: grid; justify-items: start; gap: var(--s2); padding-top: 28px; }
.gen-sum p { color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.set-actions.end { justify-content: flex-end; }
.row-form.add-form { align-items: flex-end; }
.row-form.add-form > .text-btn { min-height: var(--control-height); }
.row-form .fld + .fld { margin-top: 0; }
.row-form > .fld.grow { flex: 1 1 260px; }
.row-form > .fld:not(.grow) { flex: 0 1 220px; min-width: 160px; }
.row-form > .btn { margin-left: auto; }
.row-form > .form-err { flex-basis: 100%; }
.row-form select.inp { padding-right: var(--s2); }
.set-sec .add-form { margin-bottom: var(--s4); }
.list-box { min-width: 0; }
.perm-grid { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s5); margin-top: var(--s3); }
.app .sec-index { position: sticky; top: var(--bar); z-index: 4; margin: var(--s4) 0 0; padding: 0; background: var(--surface); }
.danger-row { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--rule); }
.set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }

.post { margin-top: var(--s5); }
.post .m { padding-right: 0; padding-left: calc(40px + var(--s4)); }
.post .m .m-av { left: 0; }
.thread-feed { margin: var(--s5) calc(-1 * var(--pad-x)) 0; }
.thread-feed .feed { padding-top: 0; }
.thread-comp { margin: var(--s4) calc(-1 * var(--s4)) 0; }
.thread-comp .composer { --comp-pad: 0px; }

@media (max-width: 1100px) {
  .app, .app[data-people="off"] { grid-template-columns: 72px 240px minmax(0, 1fr); grid-template-areas: "rail side lead"; }
  .people {
    position: fixed; z-index: 24; top: var(--bar); right: 0; bottom: 0; width: 300px; height: auto; padding: 0 var(--s2) var(--s4); background: var(--surface);
    box-shadow: var(--shadow-dialog);
  }
  .people-head { background: var(--surface); }
  .people-close { display: inline-grid; }
  .app:not([data-people="open"]) .people { display: none; }
  .app[data-people="off"] .people { display: none; }
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app, .app[data-people="off"] { grid-template-columns: 72px 220px minmax(0, 1fr); }
  .set-panel .reg-h { display: none; }
  .set-panel .reg > li { flex-wrap: wrap; row-gap: 2px; }
  .set-panel .c-main { flex: 1 1 50%; }
  .set-panel .c-sub, .set-panel .c-by { order: 5; flex: 1 1 40%; }
  .set-panel .reg .row-acts { order: 6; min-width: 0; }
  .set-panel .c-sub { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .perm-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 761px) and (max-width: 960px) {
  .m-proof ol.chain.c4, .m-proof ol.chain.c3 { grid-template-columns: minmax(0, 1fr); }
  .m-proof .step { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--s3); align-items: baseline; padding: var(--s1) 0 var(--s3) var(--s4); border-left: 2px solid var(--line); }
  .m-proof .step:last-child { padding-bottom: var(--s1); }
  .m-proof .step::before { left: -2px; top: calc(var(--s1) + 9px); width: 12px; height: 2px; }
  .m-proof .step .k { grid-row: 1 / span 2; }
  .m-proof .step .v, .m-proof .step:last-child .v { margin: 0; padding: 0; border: 0; }
  .m-proof .step .s { grid-column: 2; margin-top: 0; }
}

@media (max-width: 760px) {
  .app, .app[data-people="off"] { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "rail side"; }
  .app[data-pane="lead"], .app[data-pane="lead"][data-people="off"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead"; }
  .app[data-pane="lead"] .rail, .app[data-pane="lead"] .side { display: none; }
  .app:not([data-pane="lead"]) .lead { display: none; }
  .lead { margin: 0; border-radius: 0; }
  .app[data-view="channel"] .lead { height: calc(100dvh - var(--bar)); }
  .app:not([data-view="channel"]) .lead { padding: var(--s4) var(--s4) var(--s6); }
  .app, .app[data-people="off"] { height: calc(100dvh - var(--bar)); min-height: 0; }
  .app:not([data-view="channel"]) .lead { height: calc(100dvh - var(--bar)); overflow-y: auto; overscroll-behavior: none; }
  .app .sec-index { top: calc(-1 * var(--s4)); }
  .side { padding-right: 0; }
  .ch-head { padding-left: var(--s2); gap: var(--s2); }
  .ch-back { display: inline-grid; }
  .ch-topic { display: none; }
  .m { padding-left: calc(var(--s4) + 40px + var(--s3)); padding-right: var(--s4); }
  .m-av, .m-gut { left: var(--s4); }
  .m-day, .m-new { margin-left: var(--s4); margin-right: var(--s4); }
  .feed-top { padding-left: var(--s4); padding-right: var(--s4); }
  .composer { --comp-pad: var(--s2); }
  .comp-field { font-size: 16px; line-height: 22px; }
  .m-tools { right: var(--s2); }
  .people { width: 100vw; }
  .act-c { width: 96px; }
  .act .r, .act .reg-h .r { min-width: 36px; }
  .set-panel .reg-h { display: none; }
  .set-panel .reg > li { flex-wrap: wrap; row-gap: 2px; }
  .set-panel .c-main { flex: 1 1 50%; }
  .set-panel .c-sub, .set-panel .c-by { order: 5; flex: 1 1 40%; }
  .set-panel .c-by:empty, .set-panel .c-sub:empty { display: none; }
  .set-panel .c-acts, .set-panel .reg .row-acts { width: auto; }
  .reg .line > .t { max-width: 72%; }
  .m-proof ol.chain.c4, .m-proof ol.chain.c3 { grid-template-columns: minmax(0, 1fr); }
  .chain.mini .step::before { top: 11px; }
  .way-row > .t { width: 100%; }
  .reg .r-date, .reg-h .r-date { min-width: 84px; }
  .drawer { top: auto; width: 100vw; max-height: 85dvh; padding: var(--s4) var(--s4) var(--s6); border-radius: var(--radius-card) var(--radius-card) 0 0; }
  .app .sec-index { gap: var(--s3); }
  .ch-head { height: auto; min-height: 56px; padding-top: var(--s1); padding-bottom: var(--s1); }
  .view-skel .skel-head { height: 56px; }
  .ch-head h1 span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: anywhere; }
  .fld textarea, .fld select { font-size: 16px; }
  .ways > li { flex-wrap: wrap; }
  .thread-feed { margin-left: calc(-1 * var(--s4)); margin-right: calc(-1 * var(--s4)); }
  .thread-comp { margin-left: calc(-1 * var(--s2)); margin-right: calc(-1 * var(--s2)); }
  .tip { display: none; }
}
@media (hover: none) { .m-gut { display: none; } }
@media (prefers-reduced-motion: reduce) { .rail-item::before, .rail-icon, .chan, .m-name, .mem, .mention, .inp, .fld textarea { transition: none; } }

.side-foot .foot-u a.inline { display: inline-block; padding: 4px 0; }
.side-foot .foot-u a[data-canary] { flex-basis: 100%; }
.side-foot .foot-u { row-gap: 0; }
.m-name { padding: 2px 0; margin: -2px 0; }
.set-panel .text-btn { padding: 2px 0; }
.set-panel .icon-btn.small { width: 28px; height: 28px; }
.set-panel .icon-btn.small svg { width: 14px; height: 14px; }
.set-panel .icon-btn.small:disabled { visibility: hidden; }
@media (pointer: coarse) {
  .m-tools .icon-btn { width: 40px; height: 40px; }
  .ch-tools .icon-btn, .ch-back { width: 44px; height: 44px; }
  .m-tools { top: -22px; }
  .comp-box:has(.comp-field.ed-empty) .comp-send { visibility: visible; color: var(--faint); opacity: 0.45; }
  .comp-emoji { margin: 4px 0; }
}
.pf-changed { margin-top: var(--s1); color: var(--pill-warning-ink); }
@media (max-width: 760px) {
  .set-panel .c-sub, .set-panel .c-by { order: 5; flex: 1 1 40%; }
  .set-panel .reg .row-acts { order: 6; }
  .act-link { flex-wrap: wrap; row-gap: 2px; padding: var(--s2) 0; }
  .act-link .act-last { order: 5; flex: 1 1 100%; }
  .act .reg-h .grow { display: none; }
  .act .reg-h .act-c { flex: 1; }
  .act-link .act-c { flex: 1; width: auto; }
  .reg .line { flex-direction: column; align-items: flex-start; gap: 0; }
  .reg .line > .t, .reg .line > .s { max-width: 100%; }
  .reg .line > .s { font-size: var(--fs-small); line-height: var(--lh-small); }
}
.reg > li.rv { display: grid; align-items: stretch; gap: 0; min-height: 0; padding: 0; border-top: 0; }
.row-form .inp.sel { flex: none; width: auto; min-width: 140px; padding-right: var(--s2); }
.pf-homonym { margin-top: var(--s3); color: var(--pill-warning-ink); }
.pf-homonym a.inline { color: inherit; font-variant-numeric: tabular-nums; }

.cs-badges { display: inline-flex; align-items: center; gap: var(--s1); }
.cs-badges .badge { position: relative; display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: var(--radius-small); }
.cs-badges .badge img { display: block; width: 18px; height: 18px; object-fit: contain; }
.cs-badges .badge .tip { display: none; position: absolute; z-index: 30; top: calc(100% + var(--s2)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 240px; padding: var(--s2) var(--s3); border-radius: var(--radius-small); background: var(--raised); border: 1px solid var(--rule); box-shadow: var(--shadow-float); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text); white-space: normal; text-align: left; }
.cs-badges .badge .tip b { display: block; font-weight: 600; }
.cs-badges .badge .tip span { display: block; color: var(--muted); }
.cs-badges .badge:hover .tip, .cs-badges .badge:focus-visible .tip { display: block; }
.cs-badges .badge:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.drawer .cs-badges .badge .tip { left: 0; transform: none; }
.org-sq.org-veil svg { width: 12px; height: 10px; display: block; fill: currentColor; }

.ctx {
  position: fixed; z-index: 40; min-width: 220px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: none;
  padding: 6px; border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--raised); color: var(--text);
  box-shadow: var(--shadow-float);
}
.ctx[hidden] { display: none; }
.ctx-item {
  display: flex; align-items: center; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: var(--radius-small); background: none;
  color: var(--text); font: 500 var(--fs-body)/var(--lh-body) var(--font); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.ctx-item:hover, .ctx-item:focus-visible { background: var(--active); outline: none; }
.ctx-item.danger { color: var(--pill-negative-ink); }
.ctx-item.danger:hover, .ctx-item.danger:focus-visible { background: var(--pill-negative-bg); }
.ctx-sep { height: 1px; margin: 6px 4px; background: var(--rule); }
.ctx.panel { width: 320px; padding: var(--s4); }
.ctx.panel.wide { width: 480px; }
.ctx-h { margin-bottom: var(--s3); font-weight: 600; overflow-wrap: anywhere; }
.ctx .fld + .fld, .ctx .fld + .fld.who { margin-top: var(--s3); }
.ctx .hint { color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.ctx .hint + .fld { margin-top: var(--s3); }
.ctx textarea.inp { min-height: 72px; padding: var(--s2) var(--s3); resize: vertical; }
.ctx select.inp { padding-right: var(--s2); }
.ctx-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s4); }
.ctx .form-err:empty { display: none; }
.ctx .form-err { margin-top: var(--s3); }
.ctx .confirm { margin-top: 0; }
.ctx.panel:has(> .confirm) { padding: 6px; }
.ctx .confirm .actions { justify-content: flex-end; }
.ctx .confirm .fld { margin-top: var(--s3); }
.ctx .who { margin: 0; padding: 0; border: 0; display: grid; gap: var(--s2); }
.ctx .who-roles { display: grid; gap: var(--s2); margin-top: var(--s1); padding-left: var(--s5); }
.ctx .who-roles.flat { padding-left: 0; margin-top: 0; }
.ctx .receipt { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ctx { transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
  @starting-style { .ctx:not([hidden]) { opacity: 0; transform: translateY(-4px); } }
}
@media (pointer: coarse) {
  .ctx-item { min-height: 44px; }
  .chan, .rail-item, .mem, .cat, .feed .m, .mention, .m-name, .m-av { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}

.chan-row { position: relative; }
.chan-row:has(.chan-more) .chan { padding-right: 32px; }
.chan-row.has-gear .chan { padding-right: 56px; }
.chan-more, .chan-gear { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; visibility: hidden; }
.chan-gear { right: 28px; }
.chan-more svg, .chan-gear svg { width: 14px; height: 14px; }
.chan-row:hover :is(.chan-more, .chan-gear), .chan-row:focus-within :is(.chan-more, .chan-gear), .chan[aria-current="page"] ~ :is(.chan-more, .chan-gear), .chan-more[aria-expanded="true"] { visibility: visible; }
.cat-row { display: flex; align-items: center; gap: 2px; margin-top: var(--s4); padding-right: 4px; }
.cat-add, .cat-more { width: 24px; height: 24px; flex: none; visibility: hidden; }
.cat-add svg, .cat-more svg { width: 14px; height: 14px; }
.cat-row:hover .cat-add, .cat-row:hover .cat-more, .cat-row:focus-within .cat-add, .cat-row:focus-within .cat-more { visibility: visible; }
@media (hover: none) { .cat-add, .cat-more { visibility: visible; } }
.side-gear { width: 32px; height: 32px; flex: none; }
.side-gear svg { width: 16px; height: 16px; }

.m.linked { background: var(--raised); box-shadow: inset 2px 0 0 var(--text); }

button.org-sq { padding: 0; border: 0; cursor: pointer; font-family: var(--font); transition: background-color var(--t-fast) var(--ease-out); }
button.org-sq:hover { background: var(--active-hover); }
button.org-sq:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.mem .org-sq[data-org] { cursor: pointer; }
.org-sq.s40 { width: 40px; height: 40px; border-radius: var(--radius-nested); font-size: var(--fs-body); }
.org-sq.s56 { width: 56px; height: 56px; border-radius: var(--radius-card); font-size: 18px; }
.org-sq.s40.org-veil svg { width: 22px; height: 17px; }
.org-sq.s56.org-veil svg { width: 30px; height: 23px; }
.pf-org { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 32px; padding: 2px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.pf-org > span:not(.org-sq):not(.pic) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-org:hover bdi { text-decoration: underline; text-underline-offset: 3px; }
.pf-org .pf-sub { margin-left: auto; flex: none; }
.of-figs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: var(--s5); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.of-fig { padding: var(--s3) 0 var(--s3) var(--s3); min-width: 0; }
.of-fig:first-child { padding-left: 0; }
.of-fig + .of-fig { border-left: 1px solid var(--rule); }
.of-v { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; font-variant-numeric: tabular-nums; }
.of-k { overflow: hidden; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); text-overflow: ellipsis; white-space: nowrap; }

.inv-link { display: flex; flex-wrap: wrap; gap: var(--s2); }
.inv-link .joined { display: flex; flex: 1 1 260px; min-width: 0; gap: var(--s2); }
.inv-link .inp.mono { flex: 1; min-width: 0; font-size: var(--fs-small); }
.inv-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); margin-top: var(--s2); }
.inv-line .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); }
.inv-line .text-btn[aria-expanded="true"] { color: var(--text); }
.inv-choose { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s2); padding-top: var(--s3); }
.inv-choose .fld { flex: 1 1 140px; min-width: 0; }
.inv-choose .fld + .fld { margin-top: 0; }
.inv-choose .form-err { flex-basis: 100%; margin-top: 0; }
.inv-h { margin: var(--s5) 0 var(--s2); font-weight: 600; }
.inv-reg.compact .reg > li { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; column-gap: var(--s3); row-gap: 2px; align-items: center; min-height: 0; padding: var(--s2) 0; }
.inv-reg.compact .c-main { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: var(--fs-small); }
.inv-reg.compact .r { grid-column: 2; grid-row: 1; min-width: 0; color: var(--text); font-size: var(--fs-small); text-align: right; font-variant-numeric: tabular-nums; }
.inv-reg.compact .r.r-date { grid-column: 3; }
.inv-reg.compact .c-sub { grid-column: 1; grid-row: 2; min-width: 0; overflow: hidden; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); text-overflow: ellipsis; white-space: nowrap; }
.inv-reg.compact .row-acts { grid-column: 2 / 4; grid-row: 2; display: flex; justify-content: flex-end; gap: var(--s3); align-items: center; }
.inv-reg.compact .row-acts .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); }
.inv-reg.compact .reg > li.rv { display: grid; grid-template-columns: minmax(0, 1fr); }
.inv-reg .empty { font-size: var(--fs-small); }
.reg .c-main.mono { font-family: var(--mono); }

@media (max-width: 760px) {
  .gen { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .gen-sum { grid-auto-flow: column; justify-content: start; align-items: center; padding-top: 0; }
  .row-form > .fld:not(.grow) { flex: 1 1 140px; }
  .ctx.panel, .ctx.panel.wide { width: calc(100vw - 16px); }
}
.of-facts { display: flex; flex-wrap: wrap; column-gap: 0.3em; }
.of-facts > span { white-space: nowrap; }
.of-facts > span + span::before { content: "· "; }
.set-panel .reg-h .r { min-width: 56px; }
.set-panel .reg > li:last-child { border-bottom: 0; }

.pv { container-type: inline-size; display: flex; flex-direction: column; gap: var(--s1); max-width: 432px; margin: var(--s1) 0 2px; }
.pv-card { position: relative; overflow: hidden; border-radius: var(--radius-nested); background: var(--panel); }
.pv-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.pv-site, .pv-author, .pv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-site { color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); }
.pv-author { color: var(--text); font-size: var(--fs-small); font-weight: 600; line-height: var(--lh-small); }
.pv-title { align-self: flex-start; max-width: 100%; color: var(--text); font: 600 var(--fs-body)/var(--lh-body) var(--font); text-underline-offset: 3px; }
.pv-title:hover { text-decoration: underline; }
.pv-desc { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.pv-desc:empty { display: none; }
.pv-card.l-link { display: flex; align-items: center; gap: var(--s3); height: 114px; padding: var(--s3) var(--s4); }
.pv-card.l-link .pv-text { flex: 1; height: 90px; }
.pv-thumb { position: relative; display: block; flex: none; width: 80px; height: 80px; overflow: hidden; border-radius: var(--radius-small); background: var(--active); }
.pv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-card.l-media { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3) var(--s4) var(--s4); }
.pv-card.l-media .pv-text { height: 56px; }
.pv-media { --h: min(225px, calc((100cqi - 32px) * 0.5625)); position: relative; display: block; flex: none; width: min(100%, calc(var(--h) * var(--ar, 1.7778))); height: var(--h); overflow: hidden; border-radius: var(--radius-small); background: var(--active); }
.pv-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pv-media.video img { object-fit: cover; }
.pv-card.l-image { background: none; }
.pv-card.l-image .pv-media { --h: min(240px, calc(100cqi * 0.5625)); }
.pv-play { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgb(17 18 20 / 0.72); transition: background-color var(--t-fast) ease-out; }
.pv-play::after { content: ""; position: absolute; top: 14px; left: 19px; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #f2f3f5; }
.pv-thumb .pv-play { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.pv-thumb .pv-play::after { top: 9px; left: 12px; border-top-width: 7px; border-bottom-width: 7px; border-left-width: 11px; }
.pv-media:hover .pv-play, .pv-thumb:hover .pv-play { background: rgb(17 18 20 / 0.88); }
.pv-bar { display: block; height: 10px; margin: 3px 0; border-radius: var(--radius-small); background: var(--active); }
.pv-bar.w30 { width: 30%; }
.pv-bar.w40 { width: 40%; }
.pv-bar.w50 { width: 50%; }
.pv-bar.w60 { width: 60%; }
.pv-bar.w70 { width: 70%; }
.pv-bar.w80 { width: 80%; }
.pv-cap { display: flex; align-items: center; gap: var(--s2); height: 24px; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; }
.pv-by { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pv-cap .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); }
.pv-more { flex: none; width: 24px; height: 24px; color: var(--faint); }
.pv-more:hover, .pv-more[aria-expanded="true"] { background: var(--active); color: var(--text); }
.pv-miss { display: flex; align-items: center; height: 24px; overflow: hidden; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; }
.pv-inv { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); border-radius: var(--radius-nested); background: var(--panel); }
.pv-inv-h { height: var(--lh-small); overflow: hidden; color: var(--faint); font-size: var(--fs-small); font-weight: 600; line-height: var(--lh-small); white-space: nowrap; text-overflow: ellipsis; }
.pv-inv-h.warn { color: var(--warning); }
.pv-inv-h .pv-bar { margin: 3px 0; }
.pv-inv-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; column-gap: var(--s3); height: 56px; }
.pv-inv-ic { width: 48px; height: 48px; border-radius: var(--radius-card); font-size: var(--fs-body); }
.pv-inv-t { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; height: 56px; }
.pv-inv-n { display: flex; align-items: center; gap: var(--s1); min-width: 0; overflow: hidden; color: var(--text); font-weight: 600; line-height: var(--lh-body); white-space: nowrap; }
.pv-inv-n bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pv-inv-s, .pv-inv-d { overflow: hidden; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; text-overflow: ellipsis; }
.pv-inv-d { color: var(--faint); }
.pv-on::before, .pv-mem::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--s1); border-radius: 50%; background: var(--positive); }
.pv-mem::before { background: var(--faint); }
.pv-inv-act { display: flex; }
.pv-inv-act .btn { white-space: nowrap; }
.pv-wait { border-color: var(--active); background: var(--active); color: transparent; }
@container (max-width: 359px) {
  .pv-inv-row { grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: 56px 28px; row-gap: var(--s3); height: 96px; }
  .pv-inv-act { grid-column: 1 / -1; }
  .pv-inv-act .btn { flex: 1; justify-content: center; }
}
.pv-who { display: flex; align-items: center; gap: var(--s3); height: 64px; padding: var(--s3) var(--s4); border-radius: var(--radius-nested); background: var(--panel); }
.pv-who-pic, .pv-who .org-sq.pv-who-pic { flex: none; width: 40px; height: 40px; }
.pv-who .org-sq.pv-who-pic { border-radius: var(--radius-nested); }
.pv-who-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-who-l { display: flex; min-width: 0; }
.pv-who-n { min-width: 0; overflow: hidden; color: var(--text); font-weight: 600; line-height: var(--lh-body); white-space: nowrap; text-overflow: ellipsis; text-underline-offset: 3px; }
a.pv-who-n:hover { text-decoration: underline; }
.pv-who-n.ok { color: var(--accent); }
.pv-who-a { overflow: hidden; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; text-overflow: ellipsis; }

.rx { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin: var(--s1) 0 2px; }
.rx[hidden] { display: none; }
.rx-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 24px; padding: 0 8px 0 6px; border: 0; border-radius: var(--round);
  background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); font: 500 var(--fs-small)/1 var(--font); white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 0 0 1px transparent; transition: background-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.rx-chip:hover { background: var(--active-hover); }
.rx-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.rx-chip.mine { box-shadow: inset 0 0 0 1px var(--control-hover); color: var(--text); }
.rx-chip[aria-disabled="true"] { cursor: default; }
.rx-chip[aria-disabled="true"]:hover { background: var(--pill-neutral-bg); }
.rx-e { display: block; max-width: 40px; overflow: hidden; font: 400 16px/1 var(--font); white-space: nowrap; }
.rx-n { min-width: 2ch; font-variant-numeric: tabular-nums; text-align: center; }
.rx-add { display: inline-grid; place-items: center; flex: none; width: 28px; height: 24px; padding: 0; border: 0; border-radius: var(--round); background: none; color: var(--faint); cursor: pointer; visibility: hidden; }
.rx-add svg { width: 16px; height: 16px; }
.m:hover .rx-add, .m:focus-within .rx-add { visibility: visible; }
.rx-add:hover, .rx-add[aria-expanded="true"] { background: var(--active); color: var(--text); visibility: visible; }
.rx-add:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; visibility: visible; }
.rx-tip {
  position: fixed; z-index: 30; display: flex; align-items: center; gap: var(--s2); max-width: 280px; padding: var(--s2) var(--s3); border-radius: var(--radius-small);
  background: var(--surface); color: var(--text); font: 500 var(--fs-small)/var(--lh-small) var(--font); pointer-events: none;
  box-shadow: var(--shadow-float);
}
.rx-tip[hidden] { display: none; }
.rx-tip-e { flex: none; font: 400 24px/1 var(--font); }
:root[data-theme="light"] .rx-tip { box-shadow: var(--shadow-float), 0 0 0 1px var(--rule); }
.ctx.panel:has(> .rxp) { padding: var(--s3) var(--s4); }
.rxp { display: flex; flex-direction: column; gap: var(--s2); }
.rxp-top { display: flex; align-items: center; gap: var(--s2); }
.rxp-search { flex: 1; min-width: 0; height: 32px; }
.rxp-tone { flex: none; width: 32px; height: 32px; font: 400 18px/1 var(--font); }
.rxp-quick, .rxp-nav { display: grid; grid-template-columns: repeat(8, 36px); height: 36px; }
.rxp-quick[hidden] { display: none; }
.rxp-tones { grid-template-columns: repeat(6, 36px); }
.rxp-nav { grid-template-columns: repeat(9, 32px); height: 32px; padding-bottom: var(--s1); border-bottom: 1px solid var(--rule); box-sizing: content-box; }
.rxp-grid { height: clamp(144px, calc(100dvh - 208px), 252px); overflow-y: auto; overscroll-behavior: none; scrollbar-width: thin; outline: none; }
.ctx:focus { outline: none; }
.rxp-h { position: sticky; top: 0; z-index: 1; padding: var(--s1) 0; background: var(--raised); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; }
.rxp-row { display: grid; grid-template-columns: repeat(8, 36px); }
.rxp-e { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-small); background: none; color: var(--text); font: 400 22px/1 var(--font); cursor: pointer; }
.rxp-e[hidden] { display: none; }
.rxp-g { width: 32px; height: 32px; font-size: 18px; filter: grayscale(1); opacity: 0.7; transition: opacity var(--t-fast) var(--ease-out); }
.rxp-g:hover, .rxp-g:focus-visible { filter: none; opacity: 1; }
.rxp-e:hover, .rxp-e[aria-checked="true"] { background: var(--active); }
.rxp-e:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.rxp-wait { padding: var(--s3) 0; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.rxp-name { height: var(--lh-small); overflow: hidden; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); text-overflow: ellipsis; white-space: nowrap; }
.ctx.panel.sheet { left: 0; right: 0; width: auto; max-width: none; max-height: none; padding: 0 max(var(--s4), env(safe-area-inset-right, 0px)) var(--s2) max(var(--s4), env(safe-area-inset-left, 0px)); overflow: hidden; border-width: 1px 0 0; border-radius: var(--radius-card) var(--radius-card) 0 0; }
.ctx.sheet.dragging { transition: none; }
.ctx.sheet > .rxp { height: 100%; }
.rxp-grip { display: grid; flex: none; place-items: center; height: 20px; margin: 0 calc(-1 * var(--s4)); touch-action: none; cursor: grab; }
.rxp-grip::before { content: ""; width: 36px; height: 4px; border-radius: var(--round); background: var(--control); }
.rxp-sheet .rxp-top { gap: var(--s1); }
.rxp-sheet .rxp-search { height: 40px; }
.rxp-sheet .rxp-tone, .rxp-x { flex: none; width: 44px; height: 44px; }
.rxp-x svg { width: 16px; height: 16px; }
.rxp-sheet .rxp-quick { grid-template-columns: repeat(8, minmax(0, 1fr)); height: 44px; }
.rxp-sheet .rxp-tones { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rxp-sheet .rxp-nav, .rxp-sheet .rxp-nav.srv { display: flex; height: 40px; overflow-x: auto; overflow-y: hidden; overscroll-behavior: none; scrollbar-width: none; }
.rxp-sheet .rxp-nav::-webkit-scrollbar { display: none; }
.rxp-sheet .rxp-nav .rxp-g, .rxp-sheet .rxp-nav.srv .rxp-g { flex: none; width: 44px; height: 40px; }
.rxp-sheet .rxp-grid { flex: 1 1 0; height: auto; min-height: 0; }
.rxp-sheet .rxp-row { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.rxp-sheet .rxp-quick .rxp-e, .rxp-sheet .rxp-row .rxp-e { width: 100%; height: 44px; }
@media (prefers-reduced-motion: no-preference) {
  @starting-style { .ctx.sheet:not([hidden]) { opacity: 0; transform: translateY(16px); } }
}
.rxw .hint { margin-bottom: var(--s2); }
.rxw-list { max-height: 320px; overflow-y: auto; overscroll-behavior: none; }
.rxw-list li { display: flex; align-items: baseline; gap: var(--s2); min-height: 32px; padding: 6px 0; border-top: 1px solid var(--rule); }
.rxw-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; transition: color var(--t-slow) var(--ease-out); }
.rxw-name.ok { color: var(--accent); }
.rxw-state { flex: none; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); }
.rxw-state.warn { color: var(--pill-warning-ink); }
@media (pointer: coarse) { .rx-chip { height: 32px; } .rx-add { visibility: visible; height: 32px; width: 36px; } }
@media (hover: none) and (pointer: coarse) {
  .msgs .m .m-tools, .msgs .m:hover .m-tools, .msgs .m:focus-within .m-tools, .msgs .m.open .m-tools { display: none; }
  .rx .rx-add { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rx-chip, .rxw-name { transition: none; } }

.m-reply { display: flex; align-items: center; gap: var(--s1); max-width: 100%; height: 20px; margin: 0 0 2px; padding: 0; border: 0; background: none; color: var(--muted); font: 400 var(--fs-small)/var(--lh-small) var(--font); text-align: left; cursor: pointer; }
.m-reply.gone { cursor: default; }
.m-reply-spine { position: absolute; left: calc(var(--pad-x) + 19px); top: 11px; width: calc(20px + var(--s4) - var(--s1) - 1px); height: 13px; border: 2px solid var(--control); border-right: 0; border-bottom: 0; border-top-left-radius: 6px; pointer-events: none; }
.m:not(.head) > .m-reply > .m-reply-spine { top: 11px; }
.m:has(> .m-reply) > .m-av { top: 24px; }
.m-reply-pic { display: block; flex: none; width: 16px; height: 16px; overflow: hidden; border-radius: 50%; background: var(--person-bg); }
.m-reply-pic.p1 { background: var(--p1-bg); } .m-reply-pic.p2 { background: var(--p2-bg); } .m-reply-pic.p3 { background: var(--p3-bg); }
.m-reply-pic img { display: block; width: 16px; height: 16px; object-fit: cover; }
.m-reply-name { display: inline-flex; flex: none; align-items: baseline; max-width: 40%; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.m-reply-name bdi { overflow: hidden; text-overflow: ellipsis; }
.m-reply-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--t-fast) var(--ease-out); }
.m-reply-text.files, .m-reply.gone .m-reply-text { color: var(--faint); }
.m-reply:hover .m-reply-text, .m-reply:focus-visible .m-reply-text { color: var(--text); }
.m-reply:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; border-radius: 4px; }
.m-edited { color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; cursor: default; }
.reply-bar { display: flex; align-items: center; gap: var(--s3); min-height: 36px; padding: 0 var(--s1) 0 var(--s4); border-radius: var(--radius-nested) var(--radius-nested) 0 0; background: var(--panel); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.reply-bar[hidden] { display: none; }
.reply-bar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar-text b { color: var(--text); font-weight: 600; }
.reply-notify { flex: none; height: 28px; padding: 0 var(--s2); border: 0; border-radius: var(--radius-small); background: none; color: var(--faint); font: 600 var(--fs-small)/var(--lh-small) var(--font); cursor: pointer; transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.reply-notify[aria-pressed="true"] { color: var(--text); }
.reply-notify:hover { background: var(--active); color: var(--text); }
.reply-notify:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.reply-close { width: 28px; height: 28px; }
.reply-close svg { width: 14px; height: 14px; }
.composer.replying .comp-box { border-top-left-radius: 0; border-top-right-radius: 0; }
.m-edit { padding: 2px 0 var(--s1); }
.m-edit-box { border-radius: var(--radius-nested); background: var(--active); }
.m-edit-box:focus-within { box-shadow: inset 0 0 0 1px var(--control); }
.m-edit-field { position: relative; display: block; width: 100%; min-height: 40px; max-height: 40vh; padding: 10px var(--s3); border: 0; background: none; color: var(--text); font: 400 var(--fs-body)/var(--lh-body) var(--font); outline: none; overflow-x: hidden; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; overscroll-behavior: contain; }
.m-edit-files { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-top: var(--s2); }
.m-edit-files[hidden] { display: none; }
.m-edit-file { display: inline-flex; align-items: center; gap: var(--s1); max-width: 100%; height: 28px; padding: 0 2px 0 var(--s2); border-radius: var(--radius-small); background: var(--active); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.m-edit-file > svg { flex: none; width: 14px; height: 14px; }
.m-edit-file bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-edit-file .icon-btn { flex: none; width: 24px; height: 24px; }
.m-edit-file .icon-btn svg { width: 12px; height: 12px; }
.m-edit-hint { margin-top: var(--s1); color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); white-space: normal; }
.m-edit-hint .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--control); }
.m-edit-hint .text-btn:hover { color: var(--text); text-decoration-color: var(--text); }
.m-edit-state { margin-left: var(--s3); color: var(--muted); }
.m-edit-state.err { color: var(--pill-negative-ink); }
.m-edit-state:empty { display: none; }
.m-history .mh-in { padding: var(--s2) 0 var(--s3); }
.mh-head { display: flex; align-items: center; gap: var(--s2); min-height: 28px; }
.mh-head h3 { font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 600; }
.mh-count { color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.mh-head .icon-btn { width: 28px; height: 28px; margin-left: auto; }
.mh-head .icon-btn svg { width: 14px; height: 14px; }
.mh-note { padding: var(--s2) 0; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.mh-note .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); }
.mh-list { margin-top: var(--s1); }
.mh-row { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: var(--s4); padding: var(--s2) 0; border-top: 1px solid var(--rule); }
.mh-meta p { font-size: var(--fs-small); line-height: var(--lh-small); }
.mh-label { color: var(--text); font-weight: 600; }
.mh-now { color: var(--faint); font-weight: 400; }
.mh-time, .mh-mark { color: var(--faint); font-variant-numeric: tabular-nums; }
.mh-mark.ok { color: var(--accent); }
.mh-mark.warn { color: var(--pill-warning-ink); }
.mh-text { min-width: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.mh-text p + p { margin-top: var(--s1); }
.mh-files { color: var(--faint); }
@media (max-width: 760px) {
  .m-reply-spine { left: calc(var(--s4) + 19px); width: calc(20px + var(--s3) - var(--s1) - 1px); }
  .mh-row { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .m-edit-field { font-size: 16px; line-height: 22px; }
}
@media (prefers-reduced-motion: reduce) { .m-reply-text, .reply-notify { transition: none; } }
.m-edit-hint.touch { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.m-edit-hint.touch .m-edit-state { margin: 0 auto 0 0; }
.m-edit-hint.touch .btn { min-height: 40px; }
@media (pointer: coarse) { .reply-close { width: 40px; height: 40px; } .reply-notify { height: 40px; } }
.reply-rv > .rv-in { margin: 0; padding: 0; }

.lead-back { display: none; }
@media (max-width: 760px) {
  .lead-back { display: inline-flex; align-items: center; gap: var(--s1); width: auto; height: 32px; margin: 0 0 var(--s3) calc(-1 * var(--s1)); padding: 0 var(--s2) 0 var(--s1); color: var(--muted); font-size: 14px; }
  .lead-back span { line-height: 1; }
}

.srv-ok { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: var(--s1); vertical-align: -2px; color: var(--accent); }
.srv-ok svg { display: block; width: 14px; height: 14px; color: inherit; }
.srv-ok.veil svg { width: 14px; height: 11px; fill: currentColor; }
.srv-ok.s { width: 14px; height: 14px; }
.srv-ok.s svg { width: 12px; height: 12px; }
.srv-ok.s.veil svg { width: 12px; height: 9px; }
.ch-head h1 .srv-ok { margin-left: 0; }
.ch-head h1 .srv-ok svg { width: 12px; height: 12px; color: var(--accent); }
.ch-head h1 .srv-ok.veil svg { height: 9px; }
.ch-head h1 > span.srv-ok { display: inline-flex; align-self: center; overflow: visible; -webkit-line-clamp: none; white-space: nowrap; }
.answer .srv-ok { width: 20px; height: 20px; margin-left: var(--s2); vertical-align: 2px; }
.answer .srv-ok svg { width: 18px; height: 18px; }
.answer .srv-ok.veil svg { width: 18px; height: 14px; }
.side-title:has(.srv-ok) { display: flex; align-items: center; }
.side-title:has(.srv-ok) > bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.reg .line > .t:has(.srv-ok) { display: inline-flex; align-items: center; }
.reg .line > .t:has(.srv-ok) > bdi, .pf-list .t:has(.srv-ok) > bdi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip .tip-org { display: block; max-width: 260px; margin-top: 2px; color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 400; white-space: normal; }
.tip .tip-org[hidden] { display: none; }
.tip .tip-t .srv-ok { margin-left: 2px; vertical-align: -3px; }
.m-sys { display: flex; justify-content: center; margin: var(--s3) var(--pad-x); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); text-align: center; }
.m-sys span { max-width: 60ch; }
.ctx-form .org-after:empty { display: none; }
.ctx-form .org-after .hint { margin-top: var(--s2); }

.pf-roles { flex-wrap: wrap; overflow: visible; gap: var(--s1) var(--s2); margin: 0; padding: 0; list-style: none; }
.pf-roles .pill.role { height: 24px; gap: var(--s1); padding: 0 var(--s2) 0 6px; }

.rail-folder { position: relative; display: flex; flex-direction: column; gap: var(--s2); }
.rail-folder.open::after { content: ""; position: absolute; z-index: -1; inset: 0 8px; border-radius: var(--radius-nested); background: var(--panel); }
.rail-folder.open { padding-bottom: var(--s1); isolation: isolate; }
.rail-sub { display: flex; flex-direction: column; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.rail-sub[hidden] { display: none; }
.rail-fold { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.rail-fold.here::before { transform: scaleY(1); background: var(--text); }
.fold-tile { display: grid; grid-template-columns: repeat(2, 18px); grid-auto-rows: 18px; place-content: center; gap: 4px; background: var(--active); }
.fold-mini { display: grid; place-items: center; width: 18px; height: 18px; overflow: hidden; border-radius: var(--radius-small); background: var(--panel); color: var(--muted); font-size: 8px; font-weight: 600; line-height: 1; }
.fold-mini img { display: block; width: 18px; height: 18px; object-fit: cover; }
.fold-open { background: transparent; color: var(--muted); }
.fold-open svg { width: 22px; height: 22px; }
.chan-count { flex: none; color: var(--muted); font: 600 var(--fs-small)/var(--lh-small) var(--font); font-variant-numeric: tabular-nums; }
.cat-list > .chan-row[hidden] { display: none; }
.dragging, .dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.drag-src { opacity: 0.4; }
.drag-ghost {
  position: fixed; z-index: 40; top: 0; left: 0; margin: 0; pointer-events: none; list-style: none; opacity: 0.92;
  border-radius: var(--radius-small); background: var(--surface); box-shadow: var(--shadow-float);
}
.drag-ghost.cat-row { margin: 0; padding-right: 0; }
.drag-ghost .chan-more, .drag-ghost .chan-gear, .drag-ghost .cat-add, .drag-ghost .cat-more, .drag-ghost .need, .drag-ghost .chan-count { visibility: hidden; }
.drag-ghost.rail-item, li.drag-ghost { background: none; box-shadow: none; }
.drag-ghost .rail-icon { box-shadow: var(--shadow-float); }
.drop-line { position: fixed; z-index: 41; top: 0; left: 0; height: 2px; border-radius: 1px; background: var(--text); pointer-events: none; }
.drop-line[hidden] { display: none; }
.drop-onto .rail-icon, .rail-fold.drop-onto .rail-icon { outline: 2px solid var(--text); outline-offset: 2px; }
.cat-row.drop-onto .cat { color: var(--text); }
button.ch-topic { padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: text; }
button.ch-topic:hover { color: var(--text); }
button.ch-topic.empty { color: var(--faint); }
.ch-topic-inp { flex: 1; min-width: 0; height: 28px; margin: 0; padding: 0 var(--s2); border: 1px solid var(--control); border-radius: var(--radius-small); background: var(--ground); color: var(--text); font: inherit; }
.ch-topic-inp:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .drop-line { transition: transform var(--t-fast) var(--ease-out), width var(--t-fast) var(--ease-out); }
}
@media (pointer: coarse) { .drag-ghost { opacity: 1; } }
