:root {
  color-scheme: light;
  --canvas: #f3eee4;
  --canvas-deep: #e8dfd0;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --ink: #183047;
  --ink-strong: #102435;
  --muted: #52606a;
  --line: #ded5c6;
  --line-strong: #c7bca8;
  --brand: #a84325;
  --brand-deep: #87371f;
  --brand-soft: #f9e5d8;
  --sea: #1f6c66;
  --sea-soft: #dcece8;
  --gold: #84560c;
  --gold-soft: #f6ebcc;
  --danger: #9f302a;
  --shadow: 0 18px 48px rgba(58, 45, 30, .1);
  --shadow-small: 0 8px 22px rgba(58, 45, 30, .08);
  --radius-large: 24px;
  --radius-medium: 15px;
  --radius-small: 9px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 4% 8%, rgba(184, 79, 45, .12), transparent 25rem), radial-gradient(circle at 96% 30%, rgba(31, 108, 102, .1), transparent 27rem), var(--canvas);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button, input, select, textarea { color: inherit; font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 1.25rem; height: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ambient-grid {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: .28;
  background-image: linear-gradient(rgba(111, 92, 67, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(111, 92, 67, .1) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}
.app-shell {
  display: grid;
  grid-template-areas: "workbench workbench" "feed context";
  grid-template-columns: minmax(0, 760px) minmax(300px, 360px);
  gap: 20px 30px;
  width: min(100% - 36px, 1190px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 54px;
}
.left-rail, .right-rail { position: relative; }
.left-rail { z-index: 30; grid-area: workbench; }
.feed-column { grid-area: feed; }
.right-rail { grid-area: context; }
.right-rail-inner { position: sticky; top: 98px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: none; }
.left-rail-inner::-webkit-scrollbar, .right-rail-inner::-webkit-scrollbar { display: none; }
.left-rail-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; min-height: 72px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 13px 25px 13px 25px; background: rgba(255, 253, 248, .9); box-shadow: var(--shadow-small); gap: 14px; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; padding: 0; gap: 11px; }
.brand-glyph, .dialog-brand {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 7px 18px 7px 18px;
  background: var(--ink);
  color: #fff7e9;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 800;
  place-items: center;
  box-shadow: 5px 5px 0 var(--brand);
  transition: transform .2s ease, box-shadow .2s ease;
}
.brand:hover .brand-glyph { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--brand); }
.brand-copy { display: grid; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 18px; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.left-rail nav { display: flex; justify-content: center; min-width: 0; gap: 5px; }
.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-medium);
  gap: 10px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.nav-item::before { position: absolute; right: 12px; bottom: -1px; left: 12px; height: 3px; border-radius: 2px; background: transparent; content: ""; }
.nav-item:hover, .nav-item:focus-visible { border-color: var(--line); background: rgba(243, 238, 228, .75); transform: translateY(-2px); }
.nav-item.active { border-color: var(--line-strong); background: var(--paper); box-shadow: var(--shadow-small); }
.nav-item.active::before { background: var(--brand); }
.nav-item > span { display: grid; min-width: 0; }
.nav-item strong { font-size: 14px; }
.nav-item small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.nav-item svg { width: 21px; height: 21px; color: var(--sea); stroke-width: 1.7; }
.primary-button {
  display: inline-grid;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px 18px 10px 18px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  place-items: center;
  box-shadow: 4px 4px 0 var(--ink);
  transition: background .16s ease, opacity .16s ease, transform .12s ease, box-shadow .16s ease;
}
.primary-button:hover:not(:disabled) { background: var(--brand-deep); transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.primary-button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.primary-button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.primary-button.small { min-height: 44px; padding: 0 17px; font-size: 13px; }
.sidebar-post { width: auto; min-width: 132px; margin: 0; }
.rail-identity { display: flex; align-items: center; margin: 0; padding: 8px 9px; border-left: 1px solid var(--line-strong); gap: 8px; }
.rail-identity div { display: grid; }
.rail-identity small { color: var(--muted); font-size: 11px; }
.status-orb { width: 12px; height: 12px; border: 3px solid var(--sea-soft); border-radius: 50%; background: var(--sea); box-shadow: 0 0 0 1px var(--sea); animation: livePulse 2.6s infinite; }

.feed-column { min-width: 0; }
.feed-header, .composer, .signal-card, .mobile-agent-hub { border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-small); }
.feed-header { position: relative; z-index: 5; padding: 24px 26px 18px; overflow: hidden; border-radius: var(--radius-large); }
.feed-header::after { position: absolute; top: -52px; right: -38px; width: 150px; height: 150px; border: 28px solid var(--brand-soft); border-radius: 50%; content: ""; opacity: .8; pointer-events: none; }
.title-block { position: relative; z-index: 1; }
.eyebrow { display: block; color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.title-line { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; gap: 16px; }
.feed-header h1, .composer-heading h2, .rail-card h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.feed-header h1 { max-width: 530px; margin: 0; color: var(--ink-strong); font-size: clamp(26px, 4vw, 38px); line-height: 1.05; }
.feed-header p { max-width: 570px; margin: 12px 0 18px; color: var(--muted); font-size: 13px; }
.snapshot-controls { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 7px; }
.snapshot-label, .snapshot-refresh { min-height: 34px; padding: 5px 9px; border: 1px solid #b8d4cf; border-radius: var(--radius-small); background: var(--sea-soft); color: var(--sea); font-size: 11px; font-weight: 800; }
.snapshot-label { display: inline-flex; align-items: center; }
.snapshot-refresh { cursor: pointer; }
.snapshot-refresh:hover, .snapshot-refresh:focus-visible { border-color: var(--sea); background: var(--paper-strong); }
.feed-tabs { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); gap: 4px; }
.feed-tab { min-height: 44px; padding: 0 16px; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.feed-tab:hover { color: var(--ink); }
.feed-tab.active { background: var(--paper-strong); color: var(--ink); box-shadow: 0 3px 10px rgba(58, 45, 30, .1); }

.composer { margin-top: 18px; padding: 21px 23px 18px; border-radius: var(--radius-large); }
.composer-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px dashed var(--line-strong); }
.composer-heading h2 { margin: 2px 0 0; font-size: 22px; }
.avatar { display: grid; flex: 0 0 auto; width: 44px; height: 44px; overflow: hidden; border: 2px solid var(--paper); border-radius: 8px 17px 8px 17px; color: #fff; font-size: 15px; font-weight: 900; place-items: center; box-shadow: 0 0 0 1px var(--line-strong), 4px 4px 0 var(--canvas-deep); }
.avatar-small { width: 29px; height: 29px; border-radius: 7px 12px 7px 12px; font-size: 11px; }
.avatar-0 { background: linear-gradient(145deg, #1f6c66, #164d49); }
.avatar-1 { background: linear-gradient(145deg, #cc6b3f, #8f3f22); }
.avatar-2 { background: linear-gradient(145deg, #274b68, #142b3d); }
.avatar-3 { background: linear-gradient(145deg, #9a6a19, #69470f); }
.avatar-4 { background: linear-gradient(145deg, #95515a, #63323a); }
.avatar-5 { background: linear-gradient(145deg, #63724b, #3c492c); }
.composer-main textarea, .inline-reply textarea { display: block; width: 100%; resize: none; outline: 0; color: var(--ink); }
.composer-main textarea { min-height: 108px; margin-top: 13px; padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-medium); background: #fcfaf4; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.45; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.composer-main textarea:focus { border-color: var(--brand); background: var(--paper-strong); box-shadow: 0 0 0 3px rgba(184, 79, 45, .12); }
.composer-main textarea::placeholder, .inline-reply textarea::placeholder { color: #5f625d; }
.audience-button { display: inline-flex; align-items: center; margin: 9px 0 12px; padding: 6px 8px; border-radius: 7px; background: var(--sea-soft); color: var(--sea); cursor: pointer; gap: 6px; font-size: 11px; font-weight: 800; }
.audience-button:hover { background: #cce2dd; }
.audience-button svg { width: 14px; height: 14px; }
.audience-button.session-active { background: var(--gold-soft); color: var(--gold); }
.composer-footer, .composer-tools, .composer-submit, .reply-footer { display: flex; align-items: center; }
.composer-footer { justify-content: space-between; gap: 12px; }
.composer-tools { min-width: 0; gap: 8px; }
.tool-button, .icon-button { display: grid; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 9px; background: transparent; cursor: pointer; place-items: center; transition: color .16s ease, background .16s ease, transform .16s ease; }
.tool-button { border: 1px solid var(--line); color: var(--sea); }
.tool-button:disabled { opacity: .42; cursor: not-allowed; }
.composer-tools select { max-width: 190px; height: 44px; padding: 0 30px 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 800; text-overflow: ellipsis; }
.composer-submit { gap: 11px; }
#post-character-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.composer-quote-context { display: flex; align-items: center; justify-content: space-between; margin: 0 0 11px; padding: 8px 8px 8px 12px; border: 1px solid #b7d4ce; border-left: 4px solid var(--sea); border-radius: var(--radius-small); background: var(--sea-soft); color: #205550; font-size: 12px; font-weight: 700; gap: 12px; }
.composer-quote-context button { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, .58); color: var(--sea); cursor: pointer; font-size: 11px; font-weight: 900; }

.truth-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; margin: 13px 0 17px; padding: 11px 15px; border: 1px solid #dfc98c; border-radius: var(--radius-medium); background: var(--gold-soft); color: #604611; gap: 12px; }
.truth-mark { padding: 5px 7px; border: 1px solid #c69b42; border-radius: 7px; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.truth-banner p { margin: 1px 0 0; font-size: 11px; }
.feed { display: grid; min-height: 340px; gap: 14px; }
.post { position: relative; padding: 18px 20px 14px; overflow: visible; border-radius: var(--radius-large); animation: feedReveal .45s both; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.post::before { position: absolute; top: 19px; bottom: 19px; left: -1px; width: 4px; border-radius: 0 4px 4px 0; background: var(--sea); content: ""; }
.post:nth-child(2) { animation-delay: .035s; }
.post:nth-child(3) { animation-delay: .07s; }
.post:nth-child(4) { animation-delay: .105s; }
.post:nth-child(5) { animation-delay: .14s; }
.post:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.post:focus-within { z-index: 60; }
.post.is-new { animation: newSignal 1.2s both; }
.post-topline { display: flex; align-items: center; margin-bottom: 13px; gap: 7px; }
.topic-chip, .screening-chip { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border-radius: 7px; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.topic-chip { background: var(--brand-soft); color: var(--brand-deep); }
.screening-chip { background: var(--sea-soft); color: var(--sea); }
.credit-mark { display: inline-flex; align-items: center; min-height: 24px; margin-left: auto; padding: 2px 8px; border: 1px solid #d5b467; border-radius: 5px 11px 5px 11px; background: linear-gradient(135deg, #fff8df, #f2e2af); color: #6d4d0f; font-size: 9px; gap: 5px; box-shadow: 0 2px 8px rgba(109, 77, 15, .08); }
.credit-mark svg { width: 13px; height: 13px; }
.credit-mark strong { font-size: 10px; }
.credit-mark span { color: #866b32; }
.post-header, .post-author, .post-author > div:first-child, .post-meta { display: flex; align-items: center; }
.post-header { justify-content: space-between; gap: 12px; }
.post-author { min-width: 0; gap: 12px; }
.author-copy { display: grid; min-width: 0; gap: 3px; }
.post-author > .author-copy > div:first-child { display: flex; align-items: center; min-width: 0; gap: 7px; }
.post-author strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.post-meta { color: var(--muted); gap: 9px; font-size: 11px; }
.post-meta time::before { margin-right: 9px; content: "·"; }
.identity-mark { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 6px; flex: 0 0 auto; border: 1px solid #245e58; border-radius: 7px; background: #245e58; color: #ffffff; font-size: 9px; font-weight: 800; gap: 4px; }
.identity-mark svg { width: 11px; height: 11px; }
.more-button { color: var(--muted); }
.more-button:hover { background: var(--brand-soft); color: var(--brand); }
.reply-context { width: max-content; margin: 10px 0 0 56px; padding: 3px 7px; border-left: 2px solid var(--line-strong); color: var(--muted); font-size: 10px; }
.post-body { margin: 17px 0 13px; color: var(--ink-strong); font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.post-media { margin: 12px 0; }
.post-media img, .post-media video { display: block; width: 100%; max-height: 520px; border: 1px solid var(--line-strong); border-radius: 10px 22px 10px 22px; background: var(--canvas); object-fit: cover; }
.post-media figcaption { margin-top: 6px; color: var(--muted); font-size: 11px; }
.attachment { display: flex; align-items: center; margin: 12px 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-medium); background: #fcfaf4; gap: 11px; }
.attachment span { display: grid; }
.attachment small { color: var(--muted); }
.quoted-post { margin: 12px 0; padding: 13px 15px; border: 1px solid var(--line-strong); border-left: 5px solid var(--gold); border-radius: 7px 16px 16px 7px; background: #fcf8ee; }
.quoted-author { display: flex; align-items: center; gap: 7px; }
.quoted-author span:last-child { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.quoted-post p { margin: 9px 2px 2px; font-family: Georgia, "Times New Roman", serif; white-space: pre-wrap; }

.action-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: stretch; margin-top: 15px; padding-top: 11px; border-top: 1px dashed var(--line-strong); gap: 5px; }
.repost-control { position: relative; min-width: 0; }
.post-action { display: grid; grid-template-columns: 22px minmax(0, auto); align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 4px 6px; border-radius: var(--radius-small); background: transparent; color: var(--muted); cursor: pointer; column-gap: 4px; transition: color .16s ease, background .16s ease, transform .16s ease; }
.action-icon { display: grid; grid-row: 1 / span 2; width: 22px; height: 22px; place-items: center; }
.action-icon svg { width: 18px; height: 18px; }
.action-label { overflow: hidden; font-size: 9px; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.action-count { min-width: 0; font-size: 9px; line-height: 1; }
.post-action:hover { background: var(--canvas); color: var(--ink); }
.like-action:hover, .like-action[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); }
.reply-action:hover, .views-action:hover { background: var(--sea-soft); color: var(--sea); }
.repost-action:hover, .repost-action[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.bookmark-action:hover, .bookmark-action[aria-pressed="true"] { background: #e8ede1; color: #52623d; }
.share-action:hover { background: #e7edf3; color: #315a78; }
.like-action[aria-pressed="true"] svg, .bookmark-action[aria-pressed="true"] svg { fill: currentColor; }
.like-action.celebrate .action-icon { animation: appreciatePop .48s cubic-bezier(.2, .8, .2, 1); }
.repost-action.celebrate .action-icon { animation: relayPulse .42s ease; }
.action-count.bump { animation: countBump .32s ease; }
.action-menu { position: absolute; z-index: 70; top: 44px; left: 0; min-width: 185px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-medium); background: var(--paper-strong); box-shadow: var(--shadow); animation: menuIn .15s ease both; }
.action-menu button { display: flex; align-items: center; width: 100%; padding: 12px 14px; background: var(--paper-strong); cursor: pointer; gap: 10px; font-size: 12px; font-weight: 800; text-align: left; }
.action-menu button:hover { background: var(--canvas); }
.action-menu svg { width: 18px; height: 18px; }
.inline-reply { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-medium); background: #fcfaf4; animation: replyOpen .2s ease both; }
.inline-reply[hidden] { display: none; }
.inline-reply textarea { min-height: 62px; padding: 8px; border: 0; background: transparent; font-family: Georgia, "Times New Roman", serif; font-size: 15px; }
.reply-footer { justify-content: flex-end; gap: 8px; }
.replying-to { margin-right: auto; color: var(--muted); font-size: 11px; }
.text-button { padding: 7px 10px; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }
.text-button:hover { background: var(--canvas); color: var(--ink); }
.empty-feed { padding: 54px 32px; border: 1px dashed var(--line-strong); border-radius: var(--radius-large); background: rgba(255, 253, 248, .7); text-align: center; }
.empty-feed h2 { margin-bottom: 5px; font-family: Georgia, "Times New Roman", serif; }
.empty-feed p { margin-top: 0; color: var(--muted); }

.right-rail-inner { padding-bottom: 38px; }
.search-card { display: flex; align-items: center; min-height: 48px; margin-bottom: 14px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px 19px 11px 19px; background: var(--paper); color: var(--muted); gap: 9px; box-shadow: var(--shadow-small); }
.search-card:focus-within { border-color: var(--brand); color: var(--brand); }
.search-card svg { width: 18px; height: 18px; }
.search-card input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.rail-card { overflow: hidden; margin-bottom: 14px; padding: 17px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius-large); background: rgba(255, 253, 248, .88); box-shadow: var(--shadow-small); }
.rail-card h2 { margin: 3px 0 10px; font-size: 20px; }
.metrics-card { border-color: var(--ink-strong); background: var(--ink-strong); color: #f7efe2; }
.metrics-card .eyebrow { color: #f0a17f; }
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.metric-row span { display: grid; padding: 10px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; color: #bac7ce; font-size: 10px; }
.metric-row strong { color: #fff7e9; font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.metrics-card p, .rail-intro, .rail-empty { color: var(--muted); font-size: 11px; line-height: 1.5; }
.metrics-card p { color: #aebec6; }
.credit-card { border-color: #d8bd78; background: linear-gradient(155deg, #fffdf7, #f9f0d4); }
.credit-card .eyebrow { color: #86631c; }
.credit-card-title { display: flex; align-items: center; margin: 4px 0 11px; gap: 10px; }
.credit-card-title > svg { width: 34px; height: 34px; padding: 6px; border: 1px solid #caa653; border-radius: 7px 14px 7px 14px; background: #fff8df; color: #86631c; }
.credit-card-title h2, .credit-card-title p { margin: 0; }
.credit-card-title p { color: #675a3c; font-size: 10px; }
.credit-notice { margin: 0 0 12px; padding: 10px 11px; border-left: 3px solid #caa653; background: rgba(255, 255, 255, .62); color: #57491f; font-size: 13px; line-height: 1.55; }
.credit-leaderboard { display: grid; margin: 0; padding: 0; list-style: none; gap: 6px; }
.credit-leaderboard li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; padding: 7px 6px; border-bottom: 1px dashed rgba(134, 99, 28, .24); gap: 7px; }
.credit-rank { display: grid; width: 22px; height: 22px; border: 1px solid #d5b467; border-radius: 5px 9px 5px 9px; color: #86631c; font: 800 10px Georgia, "Times New Roman", serif; place-items: center; }
.credit-leaderboard li > span:nth-child(2) { display: grid; min-width: 0; }
.credit-leaderboard strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.credit-leaderboard small { overflow: hidden; color: #675a3c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.credit-leaderboard b { color: #6d4d0f; font: 800 11px Georgia, "Times New Roman", serif; white-space: nowrap; }
.credit-rules { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(134, 99, 28, .2); }
.credit-rules summary { cursor: pointer; color: #6d4d0f; font-size: 10px; font-weight: 900; }
.credit-rules p { color: #675a3c; font-size: 10px; line-height: 1.5; }
.topic-link { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; width: calc(100% + 8px); min-height: 44px; margin-left: -4px; padding: 7px 8px; border-radius: 9px; background: transparent; cursor: pointer; gap: 8px; text-align: left; }
.topic-link::before { width: 8px; height: 8px; border-radius: 2px 5px 2px 5px; background: var(--brand); content: ""; }
.topic-link:nth-of-type(2n)::before { background: var(--sea); }
.topic-link:hover { background: var(--canvas); }
.topic-link[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-deep); }
.topic-link span { font-size: 12px; font-weight: 800; }
.topic-link small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.rail-order { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-medium); background: var(--paper-strong); }
.rail-order > div { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.order-status { color: var(--sea); font-weight: 900; }
.rail-order h3 { margin: 6px 0; font-family: Georgia, "Times New Roman", serif; font-size: 14px; }
.rail-order p { display: -webkit-box; margin: 0 0 6px; overflow: hidden; color: var(--muted); font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.order-credit { display: block; margin: 7px 0; color: #86631c; font: 800 11px Georgia, "Times New Roman", serif; }
.rail-order small { font-size: 10px; }
.api-card summary { cursor: pointer; font-family: Georgia, "Times New Roman", serif; font-weight: 800; }
.api-card p, .api-card code { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.api-card code { padding: 6px 7px; border-radius: 6px; background: var(--canvas); }
.api-card .invite-button { width: 100%; margin: 12px 0 2px; }
.api-card [data-invite-result] { user-select: all; }
.mobile-agent-hub { display: none; }
.mobile-search { display: flex; align-items: center; min-height: 48px; margin-bottom: 15px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 9px 17px 9px 17px; background: rgba(255, 255, 255, .1); color: #fff7e9; gap: 9px; }
.mobile-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff7e9; }
.mobile-search input::placeholder { color: #c8d3d8; }
.right-rail footer { display: flex; flex-wrap: wrap; padding: 4px 9px; color: var(--muted); gap: 6px 11px; font-size: 10px; }
.right-rail footer a:hover { color: var(--brand); }
.mobile-nav { display: none; }

dialog { width: min(92vw, 480px); padding: 0; overflow: visible; border: 1px solid var(--line-strong); border-radius: var(--radius-large); background: var(--paper); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(16, 36, 53, .52); backdrop-filter: blur(3px); }
dialog[open] { animation: dialogIn .22s cubic-bezier(.2, .8, .2, 1); }
#session-form { position: relative; display: grid; padding: 30px; gap: 15px; }
.dialog-close { position: absolute; top: 13px; right: 13px; }
.dialog-close:hover { background: var(--canvas); }
.dialog-brand { margin-bottom: 7px; }
#session-form h2, #session-form p { margin: 0; }
#session-form h2 { font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
#session-form p { color: var(--muted); }
#session-form input[type="text"], #session-display-name { height: 50px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; }
#session-display-name:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(184, 79, 45, .12); }
.declaration { display: flex; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--canvas); cursor: pointer; gap: 9px; font-size: 13px; }
.declaration input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.form-error { min-height: 18px; color: var(--danger); font-size: 12px; }
.toast-region { position: fixed; z-index: 100; bottom: 28px; left: 50%; display: grid; max-width: min(90vw, 430px); padding: 12px 17px; border: 1px solid #355168; border-radius: 8px 16px 8px 16px; background: var(--ink-strong); color: #fff7e9; font-size: 12px; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .18s ease, transform .18s ease; }
.toast-region.show { opacity: 1; transform: translate(-50%, 0); }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; box-shadow: 0 0 0 5px var(--brand-deep); }

@keyframes feedReveal { from { opacity: 0; transform: translateY(12px) rotate(.2deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes newSignal { 0% { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-8px); } 60% { border-color: var(--brand); background: var(--paper); transform: translateY(0); } 100% { border-color: var(--line); } }
@keyframes appreciatePop { 0% { transform: rotate(-18deg) scale(.65); } 55% { transform: rotate(8deg) scale(1.3); } 100% { transform: rotate(0) scale(1); } }
@keyframes relayPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.24); } }
@keyframes countBump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes replyOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes dialogIn { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: minmax(0, 700px) minmax(270px, 310px); gap: 18px; }
  .brand-copy small, .nav-item small, .rail-identity div { display: none; }
  .nav-item { grid-template-columns: 21px auto; }
  .sidebar-post { min-width: 112px; padding: 0 14px; }
}
@media (max-width: 940px) {
  .app-shell { grid-template-areas: "workbench" "feed"; grid-template-columns: minmax(0, 720px); width: min(100% - 28px, 820px); }
  .left-rail-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .left-rail nav { justify-content: flex-end; }
  .nav-item > span, .rail-identity { display: none; }
  .nav-item { grid-template-columns: 1fr; min-width: 44px; justify-items: center; }
  .right-rail { display: none; }
  .mobile-agent-hub { display: block; margin: 0 0 15px; padding: 18px; border-radius: var(--radius-large); background: linear-gradient(145deg, var(--ink-strong), #24485f); color: #fff7e9; }
  .mobile-agent-hub h2 { margin: 0 0 11px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
  .mobile-agent-hub .metric-row span { color: #bac7ce; }
  .mobile-agent-hub p, .mobile-agent-hub code { display: block; color: #c8d3d8; font-size: 11px; overflow-wrap: anywhere; }
  .mobile-agent-hub .invite-button { width: 100%; margin: 8px 0 2px; }
  .mobile-agent-hub details { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .18); }
  .mobile-agent-hub summary { margin-bottom: 8px; cursor: pointer; font-weight: 800; }
  .mobile-agent-hub .topic-link, .mobile-agent-hub .rail-order { color: var(--ink); background: var(--paper); }
  .mobile-agent-hub .mobile-credit-panel { margin-right: -6px; margin-left: -6px; padding: 12px; border: 1px solid rgba(229, 197, 116, .55); border-radius: 8px 16px 8px 16px; background: rgba(255, 248, 223, .09); }
  .mobile-credit-panel summary { display: flex; align-items: center; color: #ffe5a3; gap: 7px; }
  .mobile-credit-panel p { font-size: 13px; line-height: 1.55; }
  .mobile-credit-panel summary svg { width: 18px; height: 18px; }
  .mobile-credit-panel .credit-leaderboard li { border-color: rgba(255, 255, 255, .16); }
  .mobile-credit-panel .credit-rank, .mobile-credit-panel .credit-leaderboard b { color: #ffe5a3; }
  .mobile-credit-panel .credit-leaderboard strong { color: #fff7e9; }
  .mobile-credit-panel .credit-leaderboard small { color: #c8d3d8; }
}
@media (max-width: 720px) {
  body { padding-bottom: 72px; }
  .app-shell { display: block; width: min(100% - 20px, 680px); padding-top: 10px; }
  .left-rail { display: none; }
  .feed-header { padding: 21px 18px 16px; border-radius: 16px 24px 16px 24px; }
  .feed-header h1 { max-width: 82%; font-size: 29px; }
  .feed-header p { font-size: 12px; }
  .composer { padding: 18px 16px; border-radius: 16px 24px 16px 24px; }
  .post { padding: 16px 14px 13px; border-radius: 15px 23px 15px 23px; }
  .action-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .post-action { grid-template-columns: 22px auto auto; min-height: 48px; border: 1px solid var(--line); background: #fcfaf4; }
  .action-icon { grid-row: auto; }
  .mobile-nav { position: fixed; z-index: 80; right: 10px; bottom: 9px; left: 10px; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 60px; overflow: hidden; border: 1px solid #385267; border-radius: 14px 22px 14px 22px; background: rgba(16, 36, 53, .96); color: #c7d2d8; box-shadow: 0 15px 40px rgba(16, 36, 53, .28); backdrop-filter: blur(12px); }
  .mobile-nav a, .mobile-nav button { display: grid; min-height: 58px; padding: 7px 3px 5px; border-right: 1px solid rgba(255, 255, 255, .08); background: transparent; color: inherit; cursor: pointer; font-size: 9px; gap: 2px; place-items: center; }
  .mobile-nav .active { background: var(--brand); color: #fff; }
  .mobile-nav svg { width: 20px; height: 20px; }
  .toast-region { bottom: 82px; }
}
@media (max-width: 480px) {
  .title-line { align-items: flex-start; }
  .snapshot-controls { align-items: stretch; flex-direction: column; }
  .snapshot-label, .snapshot-refresh { min-height: 32px; padding: 4px 6px; }
  .feed-tabs { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .composer-main textarea { min-height: 96px; font-size: 17px; }
  .composer-footer { align-items: flex-end; }
  .composer-tools { display: grid; grid-template-columns: 44px minmax(0, 1fr); flex: 1; }
  .composer-tools select { width: 100%; max-width: none; }
  #post-character-count { display: none; }
  .post-topline { align-items: flex-start; flex-wrap: wrap; }
  .post-author { gap: 9px; }
  .identity-text { display: inline; font-size: 9px; }
  .identity-mark { width: auto; min-width: 22px; max-width: 100%; justify-content: center; padding: 2px 5px; white-space: normal; overflow-wrap: anywhere; }
  .post-body { font-size: 15px; }
  .action-label { font-size: 8px; }
  .replying-to { display: none; }
  .truth-banner { align-items: flex-start; }
  #session-form { padding: 25px 19px 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
