* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0d1116;
  --bg-elevated: #141920;
  --panel: #171d24;
  --panel-raised: #1d252f;
  --panel-header: rgba(18, 24, 31, 0.96);
  --border: #26313b;
  --border-strong: #34414d;
  --text: #e8edf2;
  --muted: #8997a5;
  --muted-strong: #b2bcc7;
  --accent: #2d8cff;
  --button-bg: #202b35;
  --button-hover: #273440;
  --button-active: #2d3c49;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  background:
    radial-gradient(circle at top, rgba(45, 140, 255, 0.05), transparent 18%),
    linear-gradient(180deg, #0f1419 0%, var(--bg) 100%);
  color: var(--text);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 118px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 22, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.brand-lockup h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  display: block;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-lockup p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

.topbar-meta {
  display: flex;
  gap: 6px;
}

.meta-pill {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(32, 40, 51, 0.72);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, calc((100vw - 8px) / 8)));
  gap: 0;
  min-height: 0;
  padding: 0 4px 4px;
  width: 100vw;
}

.column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(26, 33, 41, 0.98), rgba(19, 24, 31, 0.99));
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.column:first-child {
  border-left: 1px solid var(--border);
}

.column-chrome {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-header);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 38px;
  padding: 6px 8px 5px;
}

.column-title-group {
  min-width: 0;
}

.column-type {
  margin: 0 0 1px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.column-header h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-controls {
  display: grid;
  gap: 5px;
  padding: 0 8px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.column-controls label {
  font-size: 10px;
  line-height: 1.1;
  color: var(--muted);
  font-weight: 600;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
}

.config-input {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: rgba(8, 12, 16, 0.78);
  color: var(--text);
  font-size: 11px;
  line-height: 1.15;
  outline: none;
}

.config-input::placeholder {
  color: #6f7d8a;
}

.config-input:focus {
  border-color: rgba(45, 140, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
}

.refresh-button,
.save-button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--button-bg), #1d2832);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.refresh-button:hover,
.save-button:hover {
  background: linear-gradient(180deg, var(--button-hover), #25323d);
  border-color: #4a5967;
}

.refresh-button:active,
.save-button:active {
  transform: translateY(1px);
  background: var(--button-active);
}

.apply-button {
  width: 100%;
  margin-top: 1px;
}

.column-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #475565 transparent;
}

.column-description,
.placeholder-card p,
.result-placeholder p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.34;
  color: var(--muted-strong);
}

.status {
  margin: 0 0 6px;
  font-size: 9px;
  line-height: 1.15;
  color: var(--muted);
}

.placeholder-card,
.result-placeholder {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(57, 69, 81, 0.95);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(17, 22, 28, 0.9), rgba(14, 19, 24, 0.98));
}

.placeholder-card + .placeholder-card,
.placeholder-card + .result-placeholder {
  margin-top: 6px;
}

.placeholder-label {
  font-size: 9px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7ea9d8;
  text-transform: uppercase;
}

.filter-controls {
  grid-template-columns: 1fr;
}

.result-placeholder {
  margin-top: 6px;
  min-height: 180px;
  align-content: start;
}

.search-results {
  display: grid;
  gap: 0;
}

.search-results-empty {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.34;
  color: var(--muted-strong);
}

.search-saved-card {
  margin-bottom: 8px;
}

.search-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 -8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.96);
  backdrop-filter: blur(10px);
}

.search-tab {
  position: relative;
  height: 34px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.search-tab:hover {
  background: rgba(239, 243, 244, 0.04);
  color: var(--text);
}

.search-tab.is-active {
  color: var(--text);
}

.search-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 32px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
  transform: translateX(-50%);
}

.search-results-shell {
  margin: 0 -8px -8px;
}

.search-people-module {
  padding: 10px 12px 2px;
  border-bottom: 1px solid rgba(47, 58, 69, 0.9);
  background: rgba(15, 20, 25, 0.94);
}

.search-module-title {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

.search-people-list {
  display: grid;
}

.search-person-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
}

.search-person-row + .search-person-row {
  border-top: 1px solid rgba(38, 49, 59, 0.72);
}

.search-avatar,
.search-post-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(45, 140, 255, 0.35), rgba(22, 120, 232, 0.1));
  color: var(--text);
  font-weight: 800;
}

.search-avatar {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.search-avatar img,
.search-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-person-main,
.search-post-main {
  min-width: 0;
}

.search-person-name-row,
.search-post-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.search-display-name {
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-handle,
.search-dot,
.search-timestamp {
  font-size: 9.5px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.search-person-bio {
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted-strong);
}

.search-follow-button,
.search-view-all {
  border-radius: 999px;
  font-weight: 700;
}

.search-follow-button {
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #eff3f4;
  color: #0f1419;
  font-size: 10px;
  cursor: pointer;
}

.search-view-all {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 4px;
  color: var(--accent);
  font-size: 10px;
  text-decoration: none;
}

.search-view-all:hover {
  text-decoration: underline;
}

.search-feed {
  display: grid;
}

.search-post-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(47, 58, 69, 0.9);
  background: rgba(15, 20, 25, 0.94);
}

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

.search-post-text {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.search-post-media {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  border: 1px solid rgba(57, 69, 81, 0.9);
  border-radius: 12px;
  overflow: hidden;
}

.search-post-media.is-multi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-post-image {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  background: rgba(8, 12, 16, 0.78);
}

.search-engagement-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.search-engagement-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.2;
}

.search-engagement-icon {
  opacity: 0.9;
  font-size: 10px;
}

.search-engagement-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
