﻿:root {
  color-scheme: dark;
  --bg-0: #050912;
  --bg-1: #08111d;
  --bg-2: #0b1524;
  --panel: rgba(12, 18, 31, 0.88);
  --panel-strong: rgba(14, 22, 37, 0.96);
  --stroke: rgba(148, 183, 214, 0.15);
  --stroke-soft: rgba(148, 183, 214, 0.08);
  --stroke-strong: rgba(56, 199, 228, 0.42);
  --text: #edf4ff;
  --muted: rgba(231, 239, 249, 0.68);
  --muted-2: rgba(231, 239, 249, 0.48);
  --accent: #38c7e4;
  --accent-soft: rgba(56, 199, 228, 0.14);
  --good: #72e3b1;
  --bad: #ff7f8f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.30);
  --shadow-soft: 0 10px 20px rgba(0, 0, 0, 0.18);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --rail-width: 312px;
  --inspector-width: 372px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 9%, rgba(56, 199, 228, 0.17), transparent 22%),
    radial-gradient(circle at 84% 11%, rgba(88, 130, 255, 0.08), transparent 20%),
    radial-gradient(circle at 50% 118%, rgba(0, 0, 0, 0.68), transparent 42%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 190, 229, 0.05), transparent 28%),
    radial-gradient(circle at 78% 16%, rgba(113, 132, 255, 0.04), transparent 24%);
  opacity: 0.9;
}

body::after {
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%;
  opacity: 0.5;
}

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

button {
  border: 0;
  cursor: pointer;
}

input,
textarea {
  border: 0;
  outline: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 199, 228, 0.16);
}

::selection {
  background: rgba(56, 199, 228, 0.24);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

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

.tiny {
  font-size: 0.84rem;
}

.good-text {
  color: var(--good);
}

.error-text {
  color: var(--bad);
}

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 22, 37, 0.88), rgba(9, 14, 24, 0.90));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1620px, calc(100vw - 20px));
  height: calc(100vh - 16px);
  margin: 8px auto;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--inspector-width);
  gap: 10px;
  min-height: 0;
}

.rail,
.feed-panel {
  padding: 12px;
}

.rail {
  display: grid;
  min-height: 0;
  gap: 10px;
}

.rail--streams {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  padding-bottom: 12px;
}

.rail__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(148, 183, 214, 0.06);
}

.brand {
  position: relative;
  min-width: 0;
  padding-left: 44px;
  display: grid;
  gap: 4px;
}

.brand::before {
  content: "S";
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(145deg, rgba(52, 201, 228, 0.95), rgba(55, 118, 225, 0.86));
  color: #ecfbff;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 18px rgba(56, 199, 228, 0.24);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 16px 30px rgba(0, 0, 0, 0.22);
}

.brand .eyebrow {
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
  text-transform: none;
}

.brand h1,
.brand .lede {
  display: none;
}

.stack-form {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(12, 18, 31, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  margin-top: 0;
}

.stack-form .field-group {
  position: relative;
}

.stack-form .field-group > span {
  display: block;
  color: #f0f6ff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.field-group {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.field-group > span {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.field-group--compact,
.field-group--wide,
.field-group--composer {
  position: relative;
}

.field-group--compact > span,
.field-group--wide > span {
  display: none;
}

.field-group--compact::before,
.field-group--wide::before {
  content: "⌕";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(231, 239, 249, 0.52);
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
}

.field-group--compact .field,
.field-group--wide .field {
  padding-left: 42px;
  padding-right: 12px;
}

.field {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(7, 12, 20, 0.74);
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.field::placeholder {
  color: rgba(231, 239, 249, 0.34);
}

.field:focus {
  border-color: rgba(56, 199, 228, 0.56);
  box-shadow: 0 0 0 3px rgba(56, 199, 228, 0.12);
  transform: translateY(-1px);
}

.field[readonly] {
  opacity: 0.78;
}

textarea.field {
  resize: none;
  min-height: 44px;
  max-height: 180px;
  line-height: 1.42;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease,
    opacity 150ms ease,
    box-shadow 150ms ease;
}

.btn:hover {
  border-color: rgba(148, 183, 214, 0.26);
  background: rgba(56, 199, 228, 0.08);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.btn--primary {
  border-color: rgba(56, 199, 228, 0.32);
  background: linear-gradient(135deg, rgba(56, 199, 228, 0.26), rgba(38, 134, 209, 0.28));
  color: #f6fbff;
  box-shadow: 0 14px 26px rgba(56, 199, 228, 0.10);
}

.btn--accent {
  border-color: rgba(56, 199, 228, 0.28);
  background: linear-gradient(135deg, rgba(56, 199, 228, 0.22), rgba(35, 138, 215, 0.20));
}

.stack-form .btn--primary {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
}

.stack-form .btn--primary::before,
.composer .btn--primary::before {
  content: "+";
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1;
}

.feed-head,
.feed-toolbar,
.composer__actions,
.rail__section-head,
.inspector__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.feed-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.feed-head__actions .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.9rem;
}

.rail__section-head {
  padding-top: 2px;
}

.rail__section-head h2 {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(241, 246, 252, 0.88);
}

.rail__section-head .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stream-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 199, 228, 0.28) transparent;
}

.stream-item {
  position: relative;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 12px 10px 48px;
  border: 1px solid rgba(148, 183, 214, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.stream-item::before {
  content: var(--stream-icon, "▣");
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(148, 183, 214, 0.12);
  background: linear-gradient(180deg, rgba(31, 40, 56, 0.96), rgba(20, 28, 40, 0.96));
  color: rgba(238, 245, 252, 0.94);
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stream-item::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  transform: translateY(-50%);
}

.stream-item:hover {
  border-color: rgba(56, 199, 228, 0.22);
  background: rgba(56, 199, 228, 0.07);
  transform: translateY(-1px);
}

.stream-item.is-active {
  border-color: rgba(56, 199, 228, 0.56);
  background: linear-gradient(90deg, rgba(24, 74, 95, 0.92), rgba(19, 57, 77, 0.68));
  box-shadow:
    inset 0 0 0 1px rgba(56, 199, 228, 0.12),
    0 0 0 1px rgba(56, 199, 228, 0.10);
}

.stream-item.is-active::after {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 199, 228, 0.14);
}

.stream-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stream-item__name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stream-item__count {
  color: var(--muted);
  font-size: 0.78rem;
}

.stream-item__slug {
  display: none;
}

.stream-item__meta {
  color: rgba(231, 239, 249, 0.60);
  font-size: 0.78rem;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.rail-status,
.feed-status,
.composer-status {
  min-height: 1.3em;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.feed-status:empty,
.composer-status:empty {
  display: none;
}

.feed-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
}

.feed-head {
  align-items: flex-start;
}

.feed-head__copy {
  position: relative;
  min-width: 0;
  max-width: 72ch;
  padding-left: 0;
}

.feed-head__copy .eyebrow {
  display: block;
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.feed-head__copy h2 {
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.feed-head__copy .lede {
  display: none;
}

.feed-toolbar {
  padding-bottom: 0;
  border-bottom: 0;
}

.feed-toolbar .field-group--wide {
  flex: 1 1 100%;
  min-width: min(100%, 360px);
}

.feed-toolbar .field-group--wide .field {
  width: 100%;
  min-height: 40px;
}

#feedSearchInput {
  padding-left: 42px;
  padding-right: 12px;
}

.feed-scroller {
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 199, 228, 0.28) transparent;
}

.feed-list {
  display: grid;
  gap: 0;
  padding-bottom: 8px;
}

.feed-day {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 8px;
  padding: 8px 14px 6px;
}

.feed-day::before,
.feed-day::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: rgba(148, 183, 214, 0.10);
}

.feed-day__label {
  color: rgba(231, 239, 249, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.feed-day__meta {
  display: none;
}

.feed-entry {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0 12px;
  padding: 8px 14px 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease;
}

.feed-entry + .feed-entry {
  margin-top: 2px;
}

.feed-entry:hover {
  background: rgba(255, 255, 255, 0.025);
}

.feed-entry:focus-visible {
  outline: none;
  background: rgba(56, 199, 228, 0.06);
}

.feed-entry.is-selected {
  background: rgba(56, 199, 228, 0.07);
}

.feed-entry__avatar {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, hsl(var(--avatar-hue) 68% 54%), hsl(calc(var(--avatar-hue) + 18) 58% 40%));
  color: #f6fbff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 8px 18px rgba(0, 0, 0, 0.20);
}

.feed-entry__content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.feed-entry__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  min-width: 0;
}

.feed-entry__headline {
  min-width: 0;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.feed-entry__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.feed-entry__time {
  color: rgba(231, 239, 249, 0.58);
  font-weight: 600;
}

.feed-entry__badge {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 183, 214, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(231, 239, 249, 0.68);
  font-size: 0.66rem;
}

.feed-entry__badge--accent {
  border-color: rgba(56, 199, 228, 0.22);
  color: var(--accent);
}

.feed-entry__body {
  white-space: pre-wrap;
  line-height: 1.48;
  overflow-wrap: anywhere;
  color: rgba(241, 246, 252, 0.96);
}

.feed-entry__url {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.feed-entry__url:hover {
  text-decoration: underline;
}

.feed-entry__actions {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.feed-entry__action {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 183, 214, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(231, 239, 249, 0.80);
  font-size: 0.72rem;
  font-weight: 600;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.feed-entry__action[data-action="copy"]::before {
  content: "⧉";
  margin-right: 6px;
  color: rgba(231, 239, 249, 0.72);
}

.feed-entry__action[data-action="edit"]::before {
  content: "✎";
  margin-right: 6px;
  color: rgba(231, 239, 249, 0.72);
}

.feed-entry__action:hover {
  border-color: rgba(56, 199, 228, 0.26);
  background: rgba(56, 199, 228, 0.08);
  color: var(--text);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.feed-entry:hover .feed-entry__actions,
.feed-entry:focus .feed-entry__actions,
.feed-entry:focus-within .feed-entry__actions,
.feed-entry.is-selected .feed-entry__actions {
  display: flex;
}

.feed-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 14px 0;
  text-align: left;
}

.feed-status.error-text {
  justify-content: flex-start;
  padding: 10px 12px;
  margin-top: 8px;
  border: 1px solid rgba(255, 127, 143, 0.18);
  border-radius: 12px;
  background: rgba(255, 127, 143, 0.06);
  color: rgba(255, 214, 220, 0.96);
  text-align: left;
}

.feed-status:not(.error-text)::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 183, 214, 0.14);
  color: rgba(231, 239, 249, 0.72);
  font-size: 0.74rem;
}

.feed-status.error-text::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 127, 143, 0.26);
  color: rgba(255, 214, 220, 0.96);
  font-size: 0.72rem;
  font-weight: 700;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.empty-state__title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.empty-state__copy {
  color: var(--muted);
  line-height: 1.55;
}

.composer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: stretch;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(10, 16, 26, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.field-group--composer {
  min-width: 0;
  padding-left: 42px;
  padding-top: 0;
  position: relative;
}

.field-group--composer::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(148, 183, 214, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(231, 239, 249, 0.74);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.field-group--composer > span {
  display: none;
}

.composer__input {
  width: 100%;
  min-height: 44px;
  resize: none;
  overflow: hidden;
  align-self: stretch;
  padding-top: 8px;
  padding-bottom: 8px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.composer__actions {
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  padding-top: 2px;
}

.composer-status {
  max-width: none;
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.8rem;
}

#postBtn {
  min-width: 88px;
  min-height: 32px;
  flex: 0 0 auto;
  box-shadow: 0 14px 24px rgba(56, 199, 228, 0.12);
}

.inspector {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.inspector__head .eyebrow {
  color: rgba(241, 246, 252, 0.94);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

#inspectorTitle {
  display: none;
}

.inspector__head .btn {
  display: none;
}

.inspector__body {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.inspector__empty {
  color: var(--muted);
  line-height: 1.55;
}

.inspector-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 183, 214, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.inspector-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.inspector-card__headline {
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.inspector-card__body {
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.inspector-card .inspector-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.inspector-card .inspector-actions .btn {
  min-height: 34px;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.text-link:hover {
  text-decoration: underline;
}

.editor-form {
  display: grid;
  gap: 10px;
}

.editor-form > .rail__section-head {
  padding-top: 8px;
}

.editor-form > .rail__section-head h2 {
  display: none;
}

.editor-form > .rail__section-head .eyebrow {
  color: rgba(241, 246, 252, 0.94);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

.editor-grid {
  display: grid;
  gap: 8px;
}

.editor-grid .field {
  min-height: 40px;
}

.editor-textarea {
  min-height: 140px;
  resize: vertical;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.editor-form > .inspector-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.editor-form > .inspector-actions .btn {
  width: 100%;
}

.editor-form > .inspector-actions .btn::before {
  content: "💾";
  margin-right: 8px;
}

button,
.btn,
.stream-item,
.feed-entry,
.feed-entry__action {
  -webkit-tap-highlight-color: transparent;
}

button:active,
.btn:active,
.stream-item:active,
.feed-entry:active,
.feed-entry__action:active {
  transform: translateY(0);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(148, 183, 214, 0.18);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 199, 228, 0.28);
  background-clip: padding-box;
}

.stream-item[data-stream-slug="home"] {
  --stream-icon: "⌂";
}

.stream-item[data-stream-slug*="work"] {
  --stream-icon: "◫";
}

.stream-item[data-stream-slug*="side"] {
  --stream-icon: "✦";
}

.stream-item[data-stream-slug*="inspiration"] {
  --stream-icon: "☼";
}

@media (max-width: 1360px) {
  .app-shell {
    width: min(100vw - 20px, 1640px);
    grid-template-columns: minmax(286px, 310px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 0.52fr);
  }

  .rail--streams {
    grid-column: 1;
    grid-row: 1;
  }

  .feed-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .rail--inspector {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .app-shell {
    width: min(100vw - 16px, 1640px);
    height: auto;
    margin: 8px auto 16px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .rail--streams,
  .feed-panel,
  .rail--inspector {
    grid-column: auto;
    grid-row: auto;
  }

  .feed-panel {
    min-height: 72vh;
  }

  .stream-list,
  .feed-scroller {
    max-height: 280px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 12px, 1640px);
  }

  .rail,
  .feed-panel {
    padding: 12px;
  }

  .feed-head,
  .feed-toolbar,
  .composer,
  .composer__actions,
  .rail__section-head,
  .inspector__head {
    align-items: stretch;
  }

  .feed-head {
    gap: 8px;
  }

  .feed-head__copy {
    padding-left: 0;
  }

  .feed-head__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .feed-head__actions .btn {
    width: 100%;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .field-group--composer {
    padding-left: 42px;
    padding-top: 0;
  }

  .feed-entry__top {
    grid-template-columns: 1fr;
  }

  .feed-entry__meta {
    align-items: flex-start;
  }

  .inspector-card .inspector-actions {
    grid-template-columns: 1fr;
  }
}
