:root {
  color-scheme: dark;
  --bg: #07070a;
  --rail: #09090e;
  --panel: #0c0c12;
  --panel-hover: #101018;
  --surface: #12111a;
  --surface-2: #161421;
  --border: #1d1b29;
  --border-strong: #2a263a;
  --text: #f3f1f7;
  --muted: #8b8798;
  --muted-2: #817b8a;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --accent-border: rgba(139, 92, 246, 0.35);
  --danger: #f87171;
  --topbar-h: 54px;
  --rail-w: 246px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --card-pad: 16px;
  --feed-gap: 10px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 67% -18%, rgba(139, 92, 246, 0.055), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.sheet-open {
  overflow: hidden;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 8px 11px;
  transform: translateY(-150%);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  display: flex;
  height: var(--topbar-h);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 10, 0.93);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.brand {
  display: inline-flex;
  min-width: 222px;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.18);
  color: white;
  font-size: 13px;
  font-weight: 850;
}

.brand-separator,
.brand-product {
  color: var(--muted-2);
}

.brand-product {
  font-size: 10px;
  letter-spacing: 0.17em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  display: flex;
  width: clamp(220px, 30vw, 420px);
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  transition: border-color 140ms ease, background 140ms ease;
}

.search:focus-within {
  border-color: var(--accent-border);
  background: var(--surface);
}

.search svg {
  width: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.search input::placeholder {
  color: var(--muted-2);
}

.search kbd {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--muted-2);
  font: 9px var(--mono);
}

.stream-status {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font: 9px/1 var(--mono);
  letter-spacing: 0.08em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.stream-status[data-state="live"] {
  border-color: var(--accent-border);
  color: #c4b5fd;
}

.stream-status[data-state="sync"] {
  border-color: var(--accent-border);
  color: #a99bc4;
}

.stream-status[data-state="sync"] .status-dot {
  background: #7c6a9c;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

.stream-status[data-state="live"] .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 10px var(--accent);
  animation: status-pulse 2s ease-out infinite;
}

.stream-status[data-state="error"] {
  color: var(--danger);
}

.stream-status[data-state="error"] .status-dot {
  background: var(--danger);
}

@keyframes status-pulse {
  0%, 45% { box-shadow: 0 0 0 1px var(--accent-soft), 0 0 9px rgba(139, 92, 246, 0.7); }
  75%, 100% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0), 0 0 2px rgba(139, 92, 246, 0.2); }
}

.icon-button,
.text-button,
.primary-button,
.mobile-nav button {
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.icon-button:hover,
.icon-button[aria-pressed="true"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: #c4b5fd;
}

.icon-button svg,
.text-button svg,
.mobile-nav svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

#sound-button .sound-on-icon {
  display: none;
}

#sound-button[aria-pressed="true"] .sound-on-icon {
  display: block;
}

#sound-button[aria-pressed="true"] .sound-off-icon {
  display: none;
}

.channel-rail {
  position: fixed;
  z-index: 30;
  inset: var(--topbar-h) auto 0 0;
  display: flex;
  width: var(--rail-w);
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(9, 9, 14, 0.92);
}

.rail-heading {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-2);
  font: 9px var(--mono);
  letter-spacing: 0.12em;
}

.rail-count {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  letter-spacing: 0;
}

.channel-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.channel-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 43px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.channel-button:hover {
  background: var(--panel);
  color: var(--text);
}

.channel-button[aria-current="true"] {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--text);
}

.channel-button[aria-current="true"]::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -9px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  content: "";
}

.channel-avatar,
.post-avatar {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.channel-avatar {
  width: 30px;
  height: 30px;
}

.channel-avatar img,
.post-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-all-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.channel-name {
  min-width: 0;
}

.channel-name strong,
.channel-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-name strong {
  color: inherit;
  font-size: 11px;
  font-weight: 680;
}

.channel-name span {
  margin-top: 1px;
  color: var(--muted-2);
  font: 9px var(--mono);
}

.channel-unread {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font: 9px var(--mono);
  text-align: center;
}

.rail-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 13px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font: 8px var(--mono);
  letter-spacing: 0.06em;
}

.rail-live {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rail-live span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.main {
  min-height: 100vh;
  margin-left: var(--rail-w);
  padding: calc(var(--topbar-h) + 24px) 24px 56px;
}

.feed-shell {
  position: relative;
  width: min(100%, 900px);
  margin: 0 auto;
}

.feed-header {
  display: flex;
  min-height: 58px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--border);
}

.feed-header h1,
.feed-header p {
  margin: 0;
}

.eyebrow {
  margin-bottom: 5px !important;
  color: var(--muted-2);
  font: 8px var(--mono);
  letter-spacing: 0.15em;
}

.feed-header h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font: 9px var(--mono);
}

.text-button {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 0.04em;
}

.text-button:hover {
  border-color: var(--accent-border);
  color: #c4b5fd;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: var(--feed-gap);
}

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(12, 12, 18, 0.9);
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
  transition: border-color 130ms ease, background 130ms ease;
}

.post-card:hover {
  border-color: var(--border-strong);
  background: rgba(15, 15, 23, 0.96);
}

.post-card.is-new {
  animation: new-post 850ms ease-out;
}

@keyframes new-post {
  from { border-color: var(--accent); background: var(--accent-soft); }
  to { border-color: var(--border); background: rgba(12, 12, 18, 0.9); }
}

.post-avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.post-content {
  min-width: 0;
}

.post-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.post-source {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.post-source strong,
.post-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-source strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.post-source span {
  color: var(--muted-2);
  font: 9px var(--mono);
}

.post-time {
  flex: none;
  color: var(--muted-2);
  font: 9px var(--mono);
  text-decoration: none;
}

.post-time:hover {
  color: var(--muted);
}

.post-body {
  overflow-wrap: anywhere;
  color: #d9d6e0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.post-body a {
  color: #b8a3fb;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.post-body a:hover {
  text-decoration: underline;
}

.post-body code {
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #09090d;
  font: 0.9em var(--mono);
}

.post-body pre {
  max-width: 100%;
  margin: 9px 0 0;
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #08080c;
  white-space: pre;
}

.post-body blockquote {
  margin: 8px 0;
  padding: 3px 0 3px 10px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

.post-body .spoiler {
  border-radius: 3px;
  background: var(--border-strong);
  color: transparent;
  cursor: pointer;
}

.post-body .spoiler:hover,
.post-body .spoiler:focus {
  color: inherit;
}

.media-grid {
  display: grid;
  max-height: 560px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #060608;
}

.media-grid[data-count="1"] {
  display: block;
}

.media-item {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  place-items: center;
  background: #09090d;
}

.media-grid[data-count="1"] .media-item {
  min-height: 230px;
  max-height: 560px;
}

.media-grid.document-grid,
.media-grid.document-grid .media-item {
  min-height: 58px;
  max-height: none;
}

.media-grid.expanded {
  max-height: none;
}

.media-item img,
.media-item video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  max-height: 560px;
  object-fit: contain;
}

.media-item audio {
  width: calc(100% - 24px);
  min-width: 0;
  margin: 24px 12px;
  accent-color: var(--accent);
}

.media-item img[data-fill="true"] {
  object-fit: cover;
}

.media-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 6, 0.72);
  color: white;
  cursor: pointer;
  font: 700 18px var(--mono);
}

.media-more:hover,
.media-more:focus-visible {
  background: rgba(13, 8, 22, 0.84);
  color: #c4b5fd;
}

.document-item {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
}

.document-item svg {
  width: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
}

.document-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.contract-chip {
  display: inline-flex;
  min-width: 0;
  height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: #c4b5fd;
  font: 9px var(--mono);
}

.contract-chip b {
  color: var(--muted);
  font-weight: 500;
}

.contract-chip code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-action {
  display: inline-flex;
  height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: 9px var(--mono);
  text-decoration: none;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.contract-action:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: #c4b5fd;
}

.contract-action svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted-2);
  font: 8px var(--mono);
  letter-spacing: 0.03em;
}

.post-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-footer b {
  font-weight: inherit;
}

.post-footer svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.edited-badge {
  color: var(--muted);
}

.new-posts-button {
  position: sticky;
  z-index: 20;
  top: calc(var(--topbar-h) + 10px);
  display: flex;
  height: 30px;
  align-items: center;
  gap: 7px;
  margin: 0 auto -30px;
  padding: 0 11px;
  cursor: pointer;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: #171126;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  color: #c4b5fd;
  font: 9px var(--mono);
  letter-spacing: 0.06em;
}

.new-posts-button svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.state-panel {
  width: 100%;
}

.loading-state {
  display: flex;
  flex-direction: column;
  gap: var(--feed-gap);
}

.skeleton-card {
  display: grid;
  min-height: 126px;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
}

.skeleton-card i,
.skeleton-card b,
.skeleton-card span {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface);
}

.skeleton-card i::after,
.skeleton-card b::after,
.skeleton-card span::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent);
  content: "";
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer { to { transform: translateX(100%); } }

.skeleton-card i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.skeleton-card div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card b {
  width: 32%;
  height: 11px;
}

.skeleton-card span {
  width: 88%;
  height: 9px;
}

.skeleton-card span:last-child {
  width: 54%;
}

.message-state {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted);
  text-align: center;
}

.message-state > svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--muted-2);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.message-state strong {
  color: var(--text);
  font-size: 12px;
}

.message-state span {
  max-width: 340px;
  font-size: 11px;
}

.primary-button {
  height: 30px;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font: 9px var(--mono);
  letter-spacing: 0.08em;
}

.load-sentinel {
  height: 1px;
}

.page-loader {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.page-loader span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: loader-dot 1s infinite alternate;
}

.page-loader span:nth-child(2) { animation-delay: 160ms; }
.page-loader span:nth-child(3) { animation-delay: 320ms; }

@keyframes loader-dot { to { opacity: 0.25; transform: translateY(-3px); } }

.toast {
  position: fixed;
  z-index: 90;
  right: 18px;
  bottom: 18px;
  padding: 9px 11px;
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  background: #171126;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: #c4b5fd;
  font: 9px var(--mono);
  letter-spacing: 0.04em;
}

.copy-fallback {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mobile-nav,
.mobile-sheet,
.sheet-backdrop {
  display: none;
}

.noscript {
  position: fixed;
  z-index: 100;
  inset: var(--topbar-h) 0 auto;
  padding: 12px;
  background: var(--danger);
  color: #07070a;
  text-align: center;
}

body.compact {
  --card-pad: 11px;
  --feed-gap: 6px;
}

body.compact .post-card {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

body.compact .post-avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

body.compact .post-header {
  margin-bottom: 5px;
}

body.compact .post-body {
  font-size: 12px;
  line-height: 1.45;
}

body.compact .media-grid,
body.compact .contract-row {
  margin-top: 8px;
}

@media (max-width: 860px) {
  :root {
    --rail-w: 214px;
  }

  .brand {
    min-width: 188px;
  }

  .search {
    width: min(34vw, 330px);
  }

  .status-label {
    display: none;
  }

  .stream-status {
    width: 32px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --topbar-h: 52px;
  }

  body {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding: 0 10px;
  }

  .brand {
    min-width: 0;
    gap: 7px;
  }

  .brand-mark {
    width: 25px;
    height: 25px;
  }

  .brand-product,
  .brand-separator {
    display: none;
  }

  .topbar-actions {
    flex: 1;
    justify-content: flex-end;
  }

  .search {
    width: min(54vw, 300px);
  }

  .search kbd,
  .stream-status,
  #density-button {
    display: none;
  }

  .channel-rail {
    display: none;
  }

  .main {
    margin-left: 0;
    padding: calc(var(--topbar-h) + 14px) 9px 30px;
  }

  .feed-header {
    min-height: 50px;
    margin-bottom: 9px;
    padding: 0 4px 9px;
  }

  .feed-header h1 {
    font-size: 15px;
  }

  .feed-meta > span {
    display: none;
  }

  .post-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    border-radius: 8px;
  }

  .post-avatar {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }

  .post-source {
    display: block;
  }

  .post-source strong,
  .post-source span {
    display: block;
  }

  .post-source span {
    margin-top: 1px;
  }

  .post-body {
    font-size: 12.5px;
  }

  .media-grid,
  .contract-row,
  .post-footer {
    margin-left: calc(-32px - 9px);
  }

  .media-item,
  .media-item img,
  .media-item video {
    min-height: 140px;
  }

  .media-grid[data-count="1"] .media-item {
    min-height: 180px;
  }

  .contract-chip {
    max-width: 100%;
  }

  .contract-chip code {
    max-width: 190px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(52px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: rgba(9, 9, 14, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    color: var(--muted);
    font: 9px var(--mono);
    letter-spacing: 0.07em;
  }

  .mobile-nav button:first-child {
    border-right: 1px solid var(--border);
  }

  .sheet-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(2px);
  }

  .mobile-sheet {
    position: fixed;
    z-index: 71;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    max-height: min(72vh, 560px);
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(105%);
    border: 1px solid var(--border-strong);
    border-width: 1px 0 0;
    border-radius: 14px 14px 0 0;
    background: #0b0b11;
    box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.6);
    transition: transform 180ms ease-out;
  }

  .mobile-sheet.open {
    transform: translateY(0);
  }

  .sheet-handle {
    width: 34px;
    height: 3px;
    margin: 8px auto 2px;
    border-radius: 3px;
    background: var(--border-strong);
  }

  .mobile-sheet header {
    display: flex;
    height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 15px;
    border-bottom: 1px solid var(--border);
    font: 9px var(--mono);
    letter-spacing: 0.1em;
  }

  .mobile-sheet .channel-list {
    padding: 8px 10px 12px;
  }

  .toast {
    right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 12px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .search {
    width: 46vw;
  }

  .main {
    padding-right: 6px;
    padding-left: 6px;
  }

  .post-card {
    --card-pad: 11px;
  }

  .contract-action {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .channel-button[aria-current="true"]::before,
  .rail-live span,
  .status-dot {
    forced-color-adjust: none;
  }
}
