:root {
  color-scheme: dark;
  --background: #181b25;
  --panel: #222633;
  --panel-raised: #292e3e;
  --border: #383f52;
  --text: #e8eaf1;
  --muted: #acb4c9;
  --accent: #b2b2ff;
  --accent-strong: #7775e7;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #d4d4ff; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 2; padding: 10px; background: var(--panel); }
.skip-link:focus { top: 10px; }
.site-header {
  min-height: 68px;
  padding: 14px max(24px, calc((100vw - 1024px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.brand { color: var(--text); text-decoration: none; font-size: 19px; font-weight: 750; letter-spacing: -.4px; }
.brand:hover { color: var(--accent); }
.session-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.session-label { color: var(--muted); font-size: 12px; max-width: 300px; }
.session-controls .button { font-size: 13px; padding: 7px 12px; }
.page-content { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1, h1.page-heading { font-size: 26px; line-height: 1.2; letter-spacing: -.5px; margin: 0 0 8px; }
.page-heading p { color: var(--muted); max-width: 600px; margin: 0; }
.back-link { display: inline-block; font-size: 13px; margin-bottom: 16px; }
.search-panel { margin-bottom: 24px; }
label { display: block; font-weight: 650; margin-bottom: 10px; }
.search-controls { display: flex; gap: 10px; }
input {
  min-width: 0;
  flex: 1;
  width: 100%;
  background: var(--background);
  color: var(--text);
  border: 1px solid #545e77;
  border-radius: 5px;
  padding: 11px 13px;
}
input::placeholder { color: #989fb4; opacity: 1; }
input[readonly] { opacity: .7; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--accent-strong);
  color: white;
  padding: 9px 17px;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}
.button:hover { background: #8987ef; color: white; }
.button:disabled { cursor: wait; opacity: .6; }
.button-secondary { color: var(--accent); border-color: #62638e; background: transparent; }
.button-secondary:hover { background: #383950; color: #dedfff; }
.hint { color: var(--muted); font-size: 12px; }
.status { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.status:empty { display: none; }
.status.is-error { color: #ffb4b8; }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.feed-list { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); overflow: hidden; }
.feed-list[aria-busy="true"] { opacity: .65; }
.feed-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border); }
.feed-card:last-child { border-bottom: 0; }
.feed-card > div:only-child { min-width: 0; flex: 1; }
.feed-avatar { position: relative; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 7px; background: #3a4059; color: #d3d4ff; font-size: 23px; font-weight: 650; flex-shrink: 0; overflow: hidden; }
.feed-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--panel-raised); }
.feed-content { flex: 1; min-width: 0; }
.feed-title { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 700; }
.feed-title a { color: var(--text); text-decoration: none; }
.feed-title a:hover { color: var(--accent); text-decoration: underline; }
.feed-account { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.feed-summary { font-size: 14px; margin: 8px 0; color: #cbd0df; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.paused { color: #e4c48c; }
.feed-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.feed-actions .button { min-width: 82px; }
.empty-state { padding: 24px; color: var(--muted); font-size: 14px; margin: 0; }
.site-footer { max-width: 900px; margin: 0 auto; padding: 12px 24px 36px; font-size: 12px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.feed-items { padding-left: 24px; }
.feed-items li { margin-bottom: 20px; }
.feed-items img, .feed-summary img { max-width: 100%; height: auto; }

@media (max-width: 640px) {
  .site-header { padding: 16px 20px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .session-controls { justify-content: flex-start; }
  .session-label { max-width: none; }
  .page-content { padding: 30px 16px 24px; }
  .feed-card { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .feed-avatar { width: 40px; height: 40px; }
  .feed-content { flex-basis: calc(100% - 52px); }
  .feed-actions { margin-left: 52px; }
  .site-footer { padding-inline: 16px; }
}
