/* Fonts: the same self-hosted files as the app (see /fonts/OFL-*.txt) */
/* latin-ext */ @font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-400-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-400-latin.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; }
/* latin-ext */ @font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-500-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-500-latin.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; }
/* latin-ext */ @font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-italic-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-italic-latin.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; }
/* latin-ext */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin.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; }
/* latin-ext */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin.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; }
/* latin-ext */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin.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; }
/* latin-ext */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-stretch: 100%; font-display: swap; src: url(/fonts/ibm-plex-sans-latin.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; }
/* latin-ext */ @font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/schibsted-grotesk-latin.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; }
/* latin-ext */ @font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/schibsted-grotesk-latin.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; }
/* latin-ext */ @font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin */ @font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/schibsted-grotesk-latin.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; }

/* Layout: the OpenFeed shell. Sidebar (248px → 76px icon rail below 1180px → bottom tab bar below 700px)
   next to a wide surface column that holds the route list and the workspace side by side, like Messages. */
:root {
  --bg: #edf0f5; --surface: #ffffff; --surface-2: #e2e7ef; --hover: #f4f6fa;
  --ink: #0f1b2d; --muted: #536075; --line: #d6dce6;
  --accent: #2341d6; --accent-ink: #ffffff; --accent-soft: #dce2ff;
  --gold: #8f6200; --gold-soft: #f6ebcb;
  --like: #c8264f; --repost: #1c7a52;
  --danger: #b42318; --danger-ink: #ffffff; --danger-soft: #fbe4e1;
  --scrim: rgba(8, 14, 24, 0.5); --shadow: rgba(15, 27, 45, 0.18);
  --font-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1019; --surface: #111a27; --surface-2: #1b2638; --hover: #152131;
    --ink: #e6ebf3; --muted: #9aa6ba; --line: #243146;
    --accent: #8399ff; --accent-ink: #0a1019; --accent-soft: #1c2750;
    --gold: #f0c54a; --gold-soft: #3a2f12;
    --like: #ff7a9a; --repost: #4cc593;
    --danger: #ff8a7a; --danger-ink: #0a1019; --danger-soft: #3a1a17;
    --scrim: rgba(0, 0, 0, 0.62); --shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1019; --surface: #111a27; --surface-2: #1b2638; --hover: #152131;
  --ink: #e6ebf3; --muted: #9aa6ba; --line: #243146;
  --accent: #8399ff; --accent-ink: #0a1019; --accent-soft: #1c2750;
  --gold: #f0c54a; --gold-soft: #3a2f12;
  --like: #ff7a9a; --repost: #4cc593;
  --danger: #ff8a7a; --danger-ink: #0a1019; --danger-soft: #3a1a17;
  --scrim: rgba(0, 0, 0, 0.62); --shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.dialog-open { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--top); z-index: 40; background: var(--surface); }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
code, .mono { font-family: var(--font-mono); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo { width: 26px; height: 26px; flex: none; }
.logo .bar { fill: var(--ink); }
.logo .bar-accent { fill: var(--accent); }

/* ---------- Shell ---------- */
.shell {
  display: grid; grid-template-columns: 248px minmax(0, 1fr); column-gap: 24px;
  padding-left: var(--gutter-l); padding-right: 0;
}
.main {
  min-width: 0; min-height: 100vh; min-height: 100svh;
  background: var(--surface); border-left: 1px solid var(--line);
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: clamp(280px, 22vw, 380px) minmax(0, 1fr); align-items: start;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); height: calc(100dvh - var(--top));
  display: flex; flex-direction: column; gap: 4px; padding-block: 14px; min-width: 0;
  overflow-y: auto;
}
.side-brand { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 4px; font: 800 1.25rem/1 var(--font-display); letter-spacing: -0.03em; color: var(--ink); }
.side-brand:hover { text-decoration: none; }
.side-brand .tld { color: var(--muted); font-weight: 500; }
.side-tag { align-self: flex-start; margin: 6px 12px 14px; font: 500 0.6875rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 11px 14px; border: 0; border-radius: 999px; background: none;
  font: 500 1.0625rem/1.2 var(--font-body); color: var(--ink); text-align: left; cursor: pointer;
  transition: background-color .15s ease;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item .ic { width: 24px; height: 24px; transition: stroke-width .15s ease, color .15s ease; }
.nav-item[aria-current="page"] { font-weight: 700; }
.nav-item[aria-current="page"] .ic { stroke-width: 2.4; color: var(--accent); }
.nav-item .ext { width: 14px; height: 14px; margin-left: auto; color: var(--muted); }
.nbadge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 0.75rem/20px var(--font-body); text-align: center; margin-left: auto; font-variant-numeric: tabular-nums; }
.nbadge.bump { animation: bump .4s var(--ease-spring); }
@keyframes bump { 40% { transform: translateY(-3px) scale(1.12); } }
.side-env { margin: 14px 12px 0; display: grid; gap: 8px; }
.overline { font: 500 0.75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.side-env .view-switch { padding: 0; }
.side-post {
  margin-top: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 18px; background: var(--accent); color: var(--accent-ink);
  font: 700 1rem/1 var(--font-body); cursor: pointer; transition: transform .15s var(--ease-out), box-shadow .15s ease;
}
.side-post:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px var(--accent); }
.side-post:active { transform: scale(.97); }
.side-post:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.side-foot { margin-top: auto; padding-top: 14px; display: grid; gap: 4px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 999px; background: none; cursor: pointer; text-align: left; transition: background-color .15s ease; min-width: 0; width: 100%; }
.me-card:hover { background: var(--surface-2); }
.me-card .label { display: grid; min-width: 0; line-height: 1.25; }
.me-card strong { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .handle { font-size: 0.8125rem; }
.me-key { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.compact-only { display: none; }

/* ---------- Route list pane ---------- */
.pane-list {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); height: calc(100dvh - var(--top));
  overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); min-width: 0;
}
.list-head { position: sticky; top: 0; z-index: 2; background: var(--surface); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding: 12px 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.list-brand { display: none; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.list-brand .side-brand { padding: 0; font-size: 1.125rem; }
.list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 32px; align-items: center; }
.list-title h1 { font-size: 1.25rem; font-weight: 800; }
.count { font: 500 0.75rem/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.search { position: relative; display: flex; align-items: center; }
.search .ic { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; border: 1px solid transparent; background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 10px 16px 10px 42px; font: 0.9375rem/1.3 var(--font-body); transition: border-color .15s ease, background-color .15s ease; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: none; border-color: var(--accent); background: var(--surface); }
.search kbd { position: absolute; right: 12px; font: 500 0.75rem/1 var(--font-mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.group-label { padding: 18px 16px 8px; border-top: 1px solid var(--line); font: 500 0.75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; }
.ops > .group:first-child .group-label { border-top: 0; }
.op {
  width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center;
  text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 10px 16px; cursor: pointer; color: var(--ink);
  transition: background-color .15s ease;
}
.group-label + .op { border-top: 0; }
.op:hover { background: var(--hover); }
.op[aria-current="true"] { background: var(--accent-soft); }
.op-sum { min-width: 0; display: grid; gap: 1px; line-height: 1.3; }
.op-sum strong { font-weight: 600; font-size: 0.9375rem; display: flex; align-items: center; gap: 5px; min-width: 0; }
.op-sum strong .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.op-sum > span { font: 400 0.75rem/1.3 var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op .lock { width: 13px; height: 13px; color: var(--gold); flex: none; }
.empty-ops { padding: 32px 16px; color: var(--muted); font-size: 0.9375rem; text-align: center; }

/* Method tags (the visibility-label shape, one tint per verb) */
.m { display: inline-block; min-width: 50px; text-align: center; font: 500 0.6875rem/1 var(--font-mono); letter-spacing: .06em; padding: 4px 6px; border-radius: 4px; white-space: nowrap; }
.m-GET { background: var(--surface-2); color: var(--ink); }
.m-POST { background: var(--accent-soft); color: var(--accent); }
.m-PATCH, .m-PUT { background: var(--gold-soft); color: var(--gold); }
.m-DELETE { background: var(--danger-soft); color: var(--danger); }

/* ---------- Workspace pane ---------- */
.pane-work { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.page-head {
  position: sticky; top: var(--top); z-index: 20;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease, transform .28s var(--ease-out);
}
.page-head.scrolled { box-shadow: 0 8px 20px -18px var(--shadow); }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px 4px; }
.head-title { min-width: 0; display: grid; gap: 4px; line-height: 1.2; flex: 1; }
.head-title h1 { font-size: 1.25rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-sub { display: flex; align-items: center; gap: 8px; min-width: 0; }
.head-sub code { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.head-sub code .pp { color: var(--accent); }
.icon-round { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: background-color .15s ease, transform .15s ease; }
.icon-round:hover { background: var(--surface-2); }
.icon-round:active { transform: scale(.92); }
.back { display: none; margin-left: -6px; }
.head-env { flex: none; }

/* Tabs in the header, with one underline that slides */
.tabs { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tab { position: relative; border: 0; background: none; padding: 14px 8px; color: var(--muted); font: 600 0.9375rem/1 var(--font-body); cursor: pointer; transition: background-color .15s ease, color .15s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tab:hover { background: var(--hover); color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab-ink { position: absolute; left: 0; bottom: -1px; width: 52px; height: 3px; border-radius: 3px; background: var(--accent); transform: translateX(var(--x, 0)); transition: transform .28s var(--ease-out); pointer-events: none; }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; transition: background-color .2s ease; }
.tab-dot[hidden] { display: none; }
.tab-dot.ok { background: var(--accent); }
.tab-dot.warn { background: var(--gold); }
.tab-dot.err { background: var(--danger); }
.tab-dot.fresh { animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, transparent); } 50% { box-shadow: 0 0 0 4px var(--accent-soft); } }

.tabpanel { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* Request panel */
.intro { padding: 16px 16px 14px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vis { display: inline-flex; align-items: center; gap: 4px; font: 500 0.6875rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 6px; border-radius: 4px; white-space: nowrap; }
.vis .ic { width: 12px; height: 12px; }
button.vis { border: 0; cursor: pointer; font-family: var(--font-mono); }
.vis-public { background: var(--surface-2); color: var(--muted); }
.vis-private { background: var(--gold-soft); color: var(--gold); }
.vis-organisation { background: var(--accent-soft); color: var(--accent); }
.op-desc { font-size: 0.9375rem; line-height: 1.55; color: var(--muted); max-width: 68ch; }
.op-desc code, .hint code, .notice code, .sheet-body code, .empty code { font-size: 0.8125em; color: var(--ink); background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
.op-desc.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font: 600 0.875rem/1.2 var(--font-body); cursor: pointer; justify-self: start; }
.linkish:hover { text-decoration: underline; }

.sec { padding: 14px 16px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 12px; }
.field { display: grid; gap: 5px; min-width: 0; align-content: start; }
.field > span { font: 600 0.8125rem/1.2 var(--font-body); color: var(--muted); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.field > span code { font: 500 0.8125rem/1.2 var(--font-mono); color: var(--ink); }
.req-mark { color: var(--gold); font: 500 0.6875rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.field input[type="text"], .field input[type="password"], .field select, .field textarea, .token-box {
  width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 9px 11px; font: 0.9375rem/1.4 var(--font-body);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input.mono-in, .field textarea, .token-box { font-family: var(--font-mono); font-size: 0.875rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .token-box:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[type="file"] { font-size: 0.8125rem; color: var(--muted); }
.field input[type="file"]::file-selector-button { margin-right: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; background: transparent; color: var(--ink); font: 600 0.8125rem/1 var(--font-body); cursor: pointer; }
.field input[type="file"]::file-selector-button:hover { background: var(--hover); }
.field > .hint { display: block; font-weight: 400; }
.hint { font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.hint.bad { color: var(--danger); }
.hint.good::before { content: "✓ "; color: var(--accent); }
.body-editor { min-height: 176px; resize: vertical; line-height: 1.6 !important; tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto; background: var(--hover) !important; }

.send-row { padding: 14px 16px; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.url-line { flex: 1 1 100%; min-width: 0; font: 400 0.8125rem/1.45 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.url-line b { color: var(--ink); font-weight: 500; }
.kbd { font: 500 0.75rem/1 var(--font-mono); color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; font: 600 0.9375rem/1 var(--font-body); background: var(--accent); color: var(--accent-ink); transition: transform .15s var(--ease-out), opacity .15s ease, box-shadow .15s ease, background-color .15s ease; white-space: nowrap; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ic { width: 17px; height: 17px; transition: transform .2s var(--ease-out); }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--hover); }
@media (hover: hover) {
  .btn:not(.btn-ghost):hover { box-shadow: 0 8px 20px -10px var(--accent); }
  .send-btn:hover .ic, .side-post:hover .ic { transform: translate(2px, -2px); }
}

details.more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .ic { width: 16px; height: 16px; color: var(--muted); transition: transform .25s var(--ease-out); }
details.more[open] > summary .ic { transform: rotate(180deg); }
details.more[open] > :not(summary) { animation: open-down .22s var(--ease-out); }
@keyframes open-down { from { opacity: 0; transform: translateY(-6px); } }
.codes { display: grid; margin: 10px 0 0; }
.code-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.45; }
.code-row:first-child { border-top: 0; }
.code-row dt { font: 500 0.8125rem/1.45 var(--font-mono); }
.code-row dd { margin: 0; color: var(--muted); min-width: 0; }
.st { font: 500 0.75rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.st.ok { color: var(--accent); }
.st.warn { color: var(--gold); }
.st.err { color: var(--danger); }

/* View switch (as under the feed chips) */
.view-switch { display: flex; flex-wrap: wrap; gap: 4px; }
.view-btn { border: 0; background: none; color: var(--muted); font: 600 0.8125rem/1 var(--font-body); padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: background-color .15s ease, color .15s ease; display: inline-flex; align-items: center; gap: 6px; }
.view-btn:hover { background: var(--hover); color: var(--ink); }
.view-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.view-btn .ic { width: 15px; height: 15px; }
.view-btn .n { font: 500 0.75rem/1 var(--font-mono); opacity: .8; }

/* Code */
.code-wrap { position: relative; min-width: 0; }
pre.code { margin: 0; padding: 14px 84px 14px 16px; background: var(--hover); border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 560px; font: 400 0.8125rem/1.65 var(--font-mono); color: var(--ink); tab-size: 2; }
.copy { position: absolute; top: 8px; right: 8px; background: var(--surface); }
.copy.done { color: var(--accent); border-color: var(--accent); }
.j-key { color: var(--ink); font-weight: 500; }
.j-str { color: var(--accent); }
.j-num { color: var(--gold); }
.j-lit { color: var(--muted); font-style: italic; }

/* Response panel */
.resp-title { display: none; font-size: 1.125rem; font-weight: 800; }
/* Wide screens: request (or code) and response side by side under one header */
.main.split .pane-work { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.main.split .page-head { grid-column: 1 / -1; }
.main.split .tabs { width: 50%; }
.main.split #tab-response { display: none; }
.main.split #panelRequest, .main.split #panelCode { grid-column: 1; grid-row: 2; }
.main.split #panelResponse {
  grid-column: 2; grid-row: 2; align-self: start; border-left: 1px solid var(--line);
  position: sticky; top: calc(var(--top) + var(--headH, 108px));
  max-height: calc(100vh - var(--top) - var(--headH, 108px)); max-height: calc(100dvh - var(--top) - var(--headH, 108px));
  min-height: calc(100vh - var(--top) - var(--headH, 108px)); min-height: calc(100dvh - var(--top) - var(--headH, 108px));
  overflow-y: auto; overscroll-behavior: contain; animation: none;
}
.main.split .resp-title { display: block; margin-right: 4px; }
.main.split .resp-bar { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.main.split #panelResponse > .empty { min-height: 60vh; align-content: center; }
.main.split #panelResponse .resp-out { animation: fade .25s ease; }
.resp-bar { padding: 14px 16px; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.resp-bar .resend { margin-left: auto; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 0.8125rem/1 var(--font-mono); padding: 6px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.pop { animation: pop-in .38s var(--ease-spring); }
@keyframes pop-in { from { opacity: 0; transform: scale(.85); } }
.s-ok { background: var(--accent-soft); color: var(--accent); }
.s-warn { background: var(--gold-soft); color: var(--gold); }
.s-err { background: var(--danger-soft); color: var(--danger); }
.s-idle { background: var(--surface-2); color: var(--muted); }
.meta { font: 400 0.8125rem/1.3 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.resp-req { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; min-width: 0; font: 400 0.8125rem/1.3 var(--font-mono); color: var(--muted); }
.resp-req code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.resp-views { padding: 10px 12px 0; }
.resp-out { padding: 12px 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.notice { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; color: var(--ink); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; animation: open-down .22s var(--ease-out); }
.notice > .ic { width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }
.notice.warn { background: var(--gold-soft); }
.notice.warn > .ic { color: var(--gold); }
.notice > div { display: grid; gap: 8px; min-width: 0; }
.notice .btn { justify-self: start; }
.notices { padding: 12px 16px 0; display: grid; gap: 8px; }
.notices:empty { display: none; }
.hdrs, .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; font-size: 0.875rem; }
.hdrs { font: 400 0.8125rem/1.5 var(--font-mono); }
.hdrs dt, .hdrs dd, .kv dt, .kv dd { padding: 8px 0; border-top: 1px solid var(--line); }
.hdrs dt, .kv dt { color: var(--muted); padding-right: 16px; }
.kv dt { font: 400 0.8125rem/1.5 var(--font-mono); }
.hdrs dd, .kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.hdrs dt:first-of-type, .hdrs dt:first-of-type + dd, .kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.img-out { display: grid; gap: 8px; justify-items: start; }
.img-out canvas { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); animation: av-in .35s var(--ease-out); }
@keyframes av-in { from { transform: scale(.96); opacity: 0; } }

/* Skeleton */
.skel-wrap { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.skel { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px; border-top: 1px solid var(--line); }
.skel:first-child { border-top: 0; }
.skel-av { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); }
.skel-lines { display: grid; gap: 9px; padding-top: 4px; }
.skel-lines i { display: block; height: 11px; border-radius: 6px; background: var(--surface-2); }
.skel-lines i:first-child { width: 40%; }
.skel-lines i.short { width: 60%; }
.skel-av, .skel-lines i {
  background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  background-size: 200% 100%; background-repeat: no-repeat; animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- Preview: OpenFeed components ---------- */
.pv-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.stagger > * { animation: rise .42s var(--ease-out) backwards; }
.stagger > :nth-child(2) { animation-delay: .04s; }
.stagger > :nth-child(3) { animation-delay: .08s; }
.stagger > :nth-child(4) { animation-delay: .12s; }
.stagger > :nth-child(5) { animation-delay: .16s; }
.stagger > :nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: .2; transform: translateY(10px); } }
.post { display: grid; gap: 6px; padding: 14px 16px 8px; border-top: 1px solid var(--line); transition: background-color .15s ease; }
.post:first-child { border-top: 0; }
.post:hover { background: var(--hover); }
.ctx-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.ctx-row .ic { justify-self: end; width: 15px; height: 15px; }
.ctx-row > span { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.space-link { color: var(--ink); font-weight: 600; }
.post-grid { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
.post-main { min-width: 0; display: grid; gap: 4px; }
.post-head { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.9375rem; line-height: 1.3; }
.name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; color: var(--ink); }
.handle { font: 0.8125rem/1.3 var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 3 auto; }
.dot, .time { color: var(--muted); flex: none; white-space: nowrap; font-size: 0.875rem; }
.ttl-chip { display: inline-flex; align-items: center; gap: 3px; font: 500 0.75rem/1 var(--font-mono); color: var(--gold); background: var(--gold-soft); padding: 3px 6px; border-radius: 999px; flex: none; }
.ttl-chip .ic { width: 13px; height: 13px; }
.post-body { font-size: 1rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.mention, .hashtag { color: var(--accent); font-weight: 500; }
.av { --s: 44px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; background: var(--av, #536075); color: #FFFFFF; display: grid; place-items: center; font: 700 calc(var(--s) * 0.36)/1 var(--font-body); user-select: none; }
.av-org { border-radius: 28%; }
.sav { --s: 40px; width: var(--s); height: var(--s); flex: none; border-radius: 26%; background: var(--av); color: #FFFFFF; display: grid; place-items: center; font: 800 calc(var(--s) * 0.36)/1 var(--font-display); letter-spacing: -0.02em; }
.cw-bar { display: flex; gap: 8px; align-items: center; background: var(--gold-soft); color: var(--ink); border-radius: 12px; padding: 8px 12px; font-size: 0.875rem; font-weight: 500; }
.cw-bar .ic { width: 18px; height: 18px; color: var(--gold); }
.link-card, .quote-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; margin-top: 4px; font-size: 0.875rem; color: var(--ink); transition: border-color .15s ease; }
a.link-card:hover { border-color: var(--accent); text-decoration: none; }
.link-card .host { font: 0.75rem/1.3 var(--font-mono); color: var(--muted); }
.link-card strong { font-weight: 600; }
.link-card span:last-child, .quote-card p { color: var(--muted); }
.img-ph { margin-top: 4px; border-radius: 14px; aspect-ratio: 3 / 2; max-width: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--av) 30%, var(--surface-2)), var(--surface-2)); display: grid; align-items: end; padding: 10px; border: 1px solid var(--line); }
.img-ph span { font: 500 0.6875rem/1 var(--font-mono); letter-spacing: .06em; background: var(--surface); color: var(--ink); padding: 4px 6px; border-radius: 4px; justify-self: start; }
.poll { display: grid; gap: 6px; margin-top: 4px; }
.poll-res { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; font-size: 0.875rem; }
.poll-res i { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); animation: grow .7s var(--ease-out) backwards; }
@keyframes grow { from { width: 0; } }
.poll-res.mine i { background: color-mix(in srgb, var(--accent) 28%, var(--surface-2)); }
.poll-res span, .poll-res b { position: relative; }
.poll-res span { font-weight: 500; }
.poll-res b { font: 500 0.8125rem/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.poll-foot { font-size: 0.8125rem; color: var(--muted); }
.actions { display: flex; gap: 2px 18px; margin: 2px 0 0 -8px; flex-wrap: wrap; }
.act { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 7px 8px; border-radius: 999px; font: 500 0.8125rem/1 var(--font-body); font-variant-numeric: tabular-nums; transition: color .15s ease, background-color .15s ease; }
.act .ic { width: 19px; height: 19px; transition: transform .2s var(--ease-out); }
.act .n { min-width: 2.5ch; text-align: left; display: inline-block; }
.act .n.roll { animation: roll .3s var(--ease-out); }
@keyframes roll { from { transform: translateY(60%); opacity: 0; } }
.act:active .ic { transform: scale(.85); }
.act-reply:hover { color: var(--accent); background: var(--hover); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.act-repost:hover, .act-repost.is-on { color: var(--repost); }
.act-repost:hover { background: var(--hover); background: color-mix(in srgb, var(--repost) 12%, transparent); }
.act-like:hover, .act-like.is-on { color: var(--like); }
.act-like:hover { background: var(--hover); background: color-mix(in srgb, var(--like) 12%, transparent); }
.act-save:hover, .act-save.is-on { color: var(--accent); }
.act-save:hover { background: var(--hover); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.act.is-on .ic { fill: currentColor; }
.act-repost.is-on .ic { fill: none; stroke-width: 2.4; }
.act.busy { pointer-events: none; opacity: .7; }
.act-like.pop .ic { animation: heart .45s var(--ease-spring); }
.act-like.pop::before { content: ""; position: absolute; left: 8px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; border-radius: 50%; border: 2px solid var(--like); pointer-events: none; animation: burst .5s var(--ease-out) forwards; }
.act-like.pop::after { content: ""; position: absolute; left: 16px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--like); pointer-events: none;
  box-shadow: 0 -14px 0 var(--like), 12px -7px 0 var(--like), 12px 7px 0 var(--like), 0 14px 0 var(--like), -12px 7px 0 var(--like), -12px -7px 0 var(--like);
  animation: sparks .55s var(--ease-out) forwards; }
.act-repost.pop .ic { animation: spin-half .45s var(--ease-out); }
.act-save.pop .ic { animation: drop .4s var(--ease-spring); }
@keyframes heart { 0% { transform: scale(.6); } 55% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes burst { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; border-width: 0; } }
@keyframes sparks { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes spin-half { from { transform: rotate(-180deg); } }
@keyframes drop { 0% { transform: translateY(-6px); } 100% { transform: none; } }
.replies-mini { margin-top: 2px; padding: 6px 0 2px 12px; border-left: 2px solid var(--line); display: grid; gap: 6px; font-size: 0.875rem; color: var(--muted); }
.replies-mini b { color: var(--ink); font-weight: 600; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); transition: background-color .15s ease; }
.row:first-child { border-top: 0; }
.row-info { min-width: 0; display: grid; gap: 1px; line-height: 1.3; }
.row-info strong { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-info span { font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.list-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.unread { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 0.75rem/22px var(--font-body); text-align: center; font-variant-numeric: tabular-nums; }
.chip-n { font: 500 0.75rem/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.pip { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.notif { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.notif:first-child { border-top: 0; }
.notif.is-unread { background: var(--accent-soft); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.notif.is-unread::after { content: ""; position: absolute; right: 16px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse-dot 2.4s ease-in-out infinite; }
.notif-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: var(--hover); background: color-mix(in srgb, var(--c) 14%, transparent); }
.notif-ic .ic { width: 17px; height: 17px; }
.notif-ic.fill .ic { fill: currentColor; }
.notif-main { min-width: 0; display: grid; gap: 6px; padding-right: 18px; }
.notif-avs { display: flex; gap: 4px; }
.notif-avs .av { --s: 32px; font-size: 0.75rem; }
.notif-text { font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.notif-text strong { font-weight: 700; }
.notif-text time { color: var(--muted); }
.notif-quote { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bubbles { display: grid; gap: 6px; padding: 14px 16px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 18px; font-size: 0.9375rem; line-height: 1.4; background: var(--surface-2); justify-self: start; animation: msg-in .3s var(--ease-spring) backwards; overflow-wrap: anywhere; }
.bubble.mine { background: var(--accent); color: var(--accent-ink); justify-self: end; }
.bubble small { display: block; font-size: 0.75rem; opacity: .75; margin-top: 2px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.94); } }
.hero { overflow: hidden; }
.hero-band { height: 88px; background: var(--hb); }
.hero-in { padding: 0 16px 16px; margin-top: -32px; display: grid; gap: 6px; }
.hero-in > .av { --s: 72px; box-shadow: 0 0 0 4px var(--surface); font-size: 1.5rem; animation: av-in .35s var(--ease-spring); }
.hero-name { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.hero-stats { display: flex; gap: 16px; font-size: 0.875rem; color: var(--muted); flex-wrap: wrap; }
.hero-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); display: grid; gap: 6px; justify-items: center; font-size: 0.9375rem; }
.empty strong { color: var(--ink); font: 800 1.125rem/1.15 var(--font-display); letter-spacing: -0.02em; }
.empty > .ic { width: 28px; height: 28px; margin-bottom: 4px; }
.empty .btn { margin-top: 8px; }
.sub-label { margin: 4px 0 -4px; }

/* ---------- Bottom bar and floating button (phones) ---------- */
.bottombar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + var(--bottom)) max(8px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 1px solid var(--line);
  grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  transition: transform .28s var(--ease-out);
}
.bottombar.is-hidden { transform: translateY(calc(100% + 4px)); }
.tab-item { position: relative; display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 6px 0; cursor: pointer; color: var(--muted); font: 500 0.6875rem/1.1 var(--font-body); min-height: 48px; align-content: center; }
.tab-item .ic { width: 24px; height: 24px; transition: transform .15s var(--ease-out); }
.tab-item:active .ic { transform: scale(.88); }
.tab-item[aria-current="page"] { color: var(--ink); }
.tab-item[aria-current="page"] .ic { stroke-width: 2.4; color: var(--accent); }
.tab-item .nbadge { position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; line-height: 18px; font-size: 0.6875rem; padding: 0 5px; }
.tab-item .bb-dot { position: absolute; top: 6px; left: 50%; margin-left: 8px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.tab-item .bb-dot.ok { background: var(--accent); }
.tab-item .bb-dot.warn { background: var(--gold); }
.tab-item .bb-dot.err { background: var(--danger); }
.tab-item .av { --s: 24px; font-size: 0.5625rem; }
.tab-item[aria-current="page"] .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.fab {
  display: none; position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(80px + var(--bottom)); z-index: 31;
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  place-items: center; cursor: pointer; box-shadow: 0 12px 28px -10px var(--accent); transition: transform .28s var(--ease-out), opacity .2s ease;
}
.fab .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.fab.bar-hidden { transform: translateY(calc(64px + var(--bottom))); }
.fab:active { transform: scale(.9); }
.fab.is-busy .ic { display: none; }

/* ---------- Sheets ---------- */
.sheet { --from: translateY(16px) scale(.97); border: 0; padding: 0; margin: auto; width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 860px); max-height: min(88dvh, 860px); background: var(--surface); color: var(--ink); border-radius: 20px; box-shadow: 0 30px 80px -30px var(--shadow); overflow: hidden; display: none; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .32s var(--ease-out); }
.sheet::backdrop { background: var(--scrim); }
.sheet[open]::backdrop { animation: fade-bg .32s ease; }
.sheet.closing { animation: sheet-out .2s ease forwards; }
.sheet.closing::backdrop { animation: fade-bg-out .2s ease forwards; }
@keyframes sheet-in { from { opacity: 0; transform: var(--from); } }
@keyframes sheet-out { to { opacity: 0; transform: var(--from); } }
@keyframes fade-bg { from { opacity: 0; } }
@keyframes fade-bg-out { to { opacity: 0; } }
.sheet-grab { display: none; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { font-size: 1.125rem; font-weight: 800; margin-right: auto; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 16px 16px 20px; display: grid; gap: 14px; }
.sheet-body.flush { padding: 0; gap: 0; }
.sheet-body p { font-size: 0.9375rem; line-height: 1.55; }
.sheet-sec { margin: 4px 0 -4px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.9375rem; line-height: 1.5; }
.pw-form { display: grid; gap: 12px; }
.token-box { min-height: 92px; resize: vertical; overflow-wrap: anywhere; }
.me-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.me-row .row-info span { font-family: var(--font-mono); }
.hist-row { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 0; border-top: 1px solid var(--line); background: none; padding: 12px 16px; cursor: pointer; text-align: left; transition: background-color .15s ease; }
.hist-row:first-child { border-top: 0; }
.hist-row:hover { background: var(--hover); }
.hist-row .row-info code { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row.is-new { animation: arrive .6s var(--ease-out); }
@keyframes arrive { 0% { opacity: 0; transform: translateY(-10px); background: var(--accent-soft); } 40% { opacity: 1; transform: none; background: var(--accent-soft); } 100% { background: transparent; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--bottom)); z-index: 60; max-width: calc(100vw - 32px); width: max-content; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 16px; font: 500 0.875rem/1.4 var(--font-body); box-shadow: 0 14px 34px -12px var(--shadow); transform: translate(-50%, 0); animation: toast-in .3s var(--ease-spring); overflow-wrap: anywhere; }
.toast.out { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1179px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); column-gap: 20px; }
  .main { grid-template-columns: 280px minmax(0, 1fr); }
  .sidebar { align-items: center; }
  .sidebar .label, .side-tag, .side-env, .nav-item .ext { display: none; }
  .compact-only { display: flex; }
  .side-brand { padding: 8px 0 18px; }
  .side-brand .word { display: none; }
  .nav-item { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .nav-item .nbadge { position: absolute; top: 6px; right: 4px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 0.6875rem; padding: 0 5px; }
  .side-post { width: 52px; height: 52px; padding: 0; }
  .me-card { padding: 6px; width: auto; }
}
@media (max-width: 999px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .main { grid-template-columns: minmax(0, 1fr); }
  .main:not(.show-work) .pane-work { display: none; }
  .main.show-work .pane-list { display: none; }
  .main.show-work .pane-work { animation: slide-in .3s var(--ease-out); }
  .main:not(.show-work) .pane-list { animation: slide-back .3s var(--ease-out); }
  .pane-list { border-right: 0; }
  .back { display: grid; }
}
@keyframes slide-in { from { opacity: .4; transform: translateX(28px); } }
@keyframes slide-back { from { opacity: .4; transform: translateX(-28px); } }
@media (max-width: 699px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-left: 0; padding-right: 0; column-gap: 0; }
  .sidebar { display: none; }
  .main { border-inline: 0; padding-bottom: calc(76px + var(--bottom)); }
  .pane-list { position: static; height: auto; overflow: visible; }
  .list-head { top: var(--top); position: sticky; }
  .list-brand { display: flex; }
  .bottombar { display: grid; }
  .main.show-work ~ .fab { display: grid; }
  .page-head, .list-head { transition: box-shadow .2s ease, transform .28s var(--ease-out); }
  .head-hidden .page-head:not(:focus-within), .head-hidden .list-head:not(:focus-within) { transform: translateY(calc(-100% - 2px)); box-shadow: none; }
  .page-head, .list-head { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
  .head-row, .list-head, .intro, .sec, .send-row, .resp-bar, .resp-out, .notices, .op, .group-label {
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .head-title h1 { font-size: 1.125rem; }
  .op { padding-block: 12px; }
  .field input[type="text"], .field input[type="password"], .field select, .field textarea, .token-box, .search input { font-size: 16px; }
  .kbd, .search kbd { display: none; }
  .toast { bottom: calc(86px + var(--bottom)); }
  .send-row .send-btn, .resp-bar .resend { display: none; }
  .send-row { padding-block: 12px; }
  .sheet { --from: translateY(100%); width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; padding-bottom: var(--bottom); }
  .sheet[open] { animation-duration: .38s; }
  .sheet-grab { display: block; }
  .post { padding-inline: 14px; }
  pre.code { max-height: none; }
}
@media (max-width: 420px) {
  .post-head .handle { display: none; }
}
@media (max-width: 359px) {
  .bottombar { padding-inline: 4px; }
  .tab-item { font-size: 0.625rem; letter-spacing: -0.01em; }
  .head-env { display: none; }
}
@media (hover: none) { .kbd { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
