:root {
  --background: #0b1326;
  --surface: #0f172a;
  --surface-low: #131b2e;
  --surface-mid: #171f33;
  --surface-high: #222a3d;
  --surface-variant: #2d3449;
  --text: #dae2fd;
  --muted: #cfc2d6;
  --dim: #71717a;
  --outline: rgba(255, 255, 255, 0.1);
  --primary: #ddb7ff;
  --primary-strong: #b76dff;
  --primary-dark: #6900b3;
  --secondary: #dfb7ff;
  --tertiary: #ffb0cd;
  --success: #34d399;
  --warning: #f59e0b;
  --error: #ffb4ab;
  --shadow-glow: 0 16px 42px -20px rgba(183, 109, 255, 0.62);
  --thread-text-width: 500px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 430, "GRAD" 0, "opsz" 24;
}

.app-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #080d19 0%, var(--background) 36%, #060e20 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a855f7;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 20px;
}

.brand-button {
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-button:hover {
  color: var(--primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(221, 183, 255, 0.16);
  color: var(--primary);
  border: 1px solid rgba(221, 183, 255, 0.18);
}

.suite {
  display: block;
  color: #71717a;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #a1a1aa;
  background: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.icon-button:active, .primary-button:active, .ghost-button:active {
  transform: scale(0.97);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #222a3d, #691ea6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 264px;
  height: 100vh;
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 16px;
  background: #000000;
  border-right: 1px solid var(--outline);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-button {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: 12px;
  background: transparent;
  color: #71717a;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  text-align: left;
}

.nav-button:hover {
  background: #111111;
  color: #f4f4f5;
}

.nav-button.active {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  box-shadow: inset -2px 0 0 #a855f7;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--outline);
}

.primary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--primary);
  color: #490080;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button:hover {
  filter: brightness(1.05);
}

.primary-button:disabled, .ghost-button:disabled {
  cursor: wait;
  opacity: 0.72;
  filter: none;
  transform: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(73, 0, 128, 0.25);
  border-top-color: #490080;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ghost-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--outline);
  font-weight: 800;
}

.danger-button {
  color: var(--error);
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.main {
  width: 100%;
  padding: 40px 48px 48px;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
}

.landing-page {
  width: 100%;
}

.landing-hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 56px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 0 64px;
}

.landing-copy h1 {
  max-width: 760px;
  margin: 8px 0 18px;
  font-size: 82px;
  line-height: 0.95;
  color: #ffffff;
}

.landing-lede {
  max-width: 680px;
  margin: 0;
  color: #c7d2fe;
  font-size: 19px;
  line-height: 1.75;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.landing-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: #a1a1aa;
  font-size: 13px;
}

.landing-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: center;
}

.landing-visual img {
  width: min(42vw, 300px);
  min-width: 220px;
  filter: drop-shadow(0 28px 72px rgba(183, 109, 255, 0.34));
}

.visual-panel {
  position: absolute;
  min-width: 176px;
  padding: 16px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.visual-panel span {
  color: var(--primary);
}

.visual-panel strong,
.visual-panel small {
  display: block;
}

.visual-panel small {
  margin-top: 4px;
  color: #a1a1aa;
}

.visual-panel:nth-of-type(1) {
  top: 64px;
  left: 16px;
}

.visual-panel:nth-of-type(2) {
  right: 0;
  top: 210px;
}

.visual-panel:nth-of-type(3) {
  left: 58px;
  bottom: 74px;
}

.landing-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 0 20px;
  border-top: 1px solid var(--outline);
}

.landing-band h2 {
  max-width: 420px;
  margin-top: 8px;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-feature {
  min-height: 176px;
  padding: 20px;
  border: 1px solid var(--outline);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.landing-feature span {
  color: var(--primary);
}

.landing-feature strong {
  display: block;
  margin-top: 18px;
  color: #ffffff;
}

.landing-feature p {
  margin: 8px 0 0;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.65;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #a1a1aa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

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

h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.subtle {
  color: rgba(207, 194, 214, 0.74);
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 40px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
}

.dashboard-account-panel {
  margin-bottom: 24px;
}

.dashboard-account-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.dashboard-account-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-align: left;
}

.dashboard-account-button > span:nth-child(2) {
  flex: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-account-button small {
  color: var(--muted);
}

.dashboard-account-button.selected {
  border-color: rgba(221, 183, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(221, 183, 255, 0.12);
}

.dashboard-performance {
  margin-bottom: 24px;
}

.performance-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.keyword-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 140px auto;
  gap: 12px;
  align-items: center;
}

.keyword-results {
  margin-top: 18px;
}

.keyword-result-card .ghost-button {
  text-decoration: none;
}

.keyword-profile {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--outline);
}

.keyword-result-media {
  width: min(360px, 100%);
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 14px;
  border: 1px solid var(--outline);
}

.keyword-error {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.08);
  color: var(--error);
}

.keyword-error p {
  margin: 0;
}

.performance-card {
  display: grid;
  gap: 8px;
}

.performance-card strong {
  font-size: 26px;
  color: var(--primary);
}

.performance-card span {
  color: var(--muted);
  font-size: 12px;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.card-pad { padding: 22px; }

.stat-number {
  margin-top: 8px;
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--success);
  font-weight: 800;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.account-row, .queue-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.square-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #2d3449, #691ea6);
  color: var(--primary);
  font-weight: 900;
}

.round-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #2d3449, #691ea6);
  border: 2px solid rgba(221, 183, 255, 0.28);
  color: var(--primary);
  font-weight: 900;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #71717a;
  box-shadow: none;
}

.status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.api-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.api-panel strong {
  display: block;
  font-size: 12px;
}

.api-panel p {
  margin-top: 3px;
  color: #a1a1aa;
  font-size: 11px;
  line-height: 1.4;
}

.api-notice {
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(221, 183, 255, 0.1);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quick-action {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transition: background 160ms ease;
}

.quick-action:hover {
  background: rgba(255, 255, 255, 0.09);
}

.progress {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #27272a;
}

.progress span {
  display: block;
  height: 100%;
  background: #a855f7;
  box-shadow: 0 0 12px #a855f7;
}

.thread-preview {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
}

.thread-line {
  width: 2px;
  flex: 1;
  margin: 8px auto 0;
  border-radius: 999px;
  background: linear-gradient(to bottom, #b76dff, transparent);
}

.post-bubble {
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--outline);
  color: var(--muted);
  line-height: 1.6;
}

.account-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-manage-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: start;
  margin-top: 8px;
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #121a30;
  border: 1px solid #26345c;
  border-radius: 12px;
  padding: 12px 14px;
  color: #eaf0ff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.account-list-item:hover { border-color: #3a4a78; }

.account-list-item.selected {
  border-color: #7c5cff;
  background: #1a2342;
}

.account-list-item .round-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.account-list-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-list-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-list-meta small {
  color: #9fb0dd;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail { min-width: 0; }

.account-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.account-stats {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.36);
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}

.switch input { display: none; }

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3f3f46;
}

.slider::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: white;
  transition: transform 160ms ease;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::after {
  transform: translateX(20px);
}

.composer-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  align-items: start;
}

.assistant-box, .editor-box {
  padding: 18px;
}

.prompt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.llm-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.llm-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 18px;
}

.llm-title > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.llm-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.llm-summary strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.llm-panel-body {
  display: grid;
  gap: 14px;
}

.llm-panel.is-collapsed .llm-panel-body {
  display: none;
}

.llm-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.password-field {
  position: relative;
}

.password-field .field {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.97);
}

.llm-divider {
  height: 1px;
  background: var(--outline);
  margin: 8px 0;
}

.llm-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.field {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(19, 27, 46, 0.86);
  color: var(--text);
  outline: none;
  padding: 13px 14px;
}

.field:focus {
  border-color: rgba(221, 183, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(221, 183, 255, 0.12);
}

textarea.field {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}

.draft-field, .thread-text {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
}

.draft-field {
  width: calc(var(--thread-text-width) + 30px);
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  justify-self: start;
}

textarea.draft-field {
  line-height: 1.4;
}

.thread-text {
  width: var(--thread-text-width);
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  color: #d4d4d8;
}

.thread-preview > div:last-child {
  min-width: 0;
}

.post-bubble {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-box {
  width: 148px;
  min-height: 148px;
  display: grid;
  place-items: center;
  justify-self: center;
  gap: 10px;
  position: relative;
  padding: 20px;
  border: 2px dashed rgba(221, 183, 255, 0.28);
  border-radius: 18px;
  background: rgba(30, 41, 70, 0.78);
  color: #a1a1aa;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.upload-box:hover {
  border-color: rgba(221, 183, 255, 0.72);
  background: rgba(30, 41, 70, 0.95);
  color: var(--primary);
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box .material-symbols-outlined {
  font-size: 40px;
}

.thread-draft-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(221, 183, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.upload-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.upload-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-thumb {
  width: 148px;
  height: 148px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(221, 183, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb .icon-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.62);
}

.thread-editor-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
}

.target-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(19, 27, 46, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.composer-account-option {
  width: 100%;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.composer-account-option.selected {
  border-color: rgba(221, 183, 255, 0.7);
  background: rgba(132, 88, 255, 0.18);
}

.time-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(19, 27, 46, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.time-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.time-input-group label {
  display: grid;
  gap: 6px;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 900;
}

.time-input {
  min-height: 44px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.time-separator {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
}

.period-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  gap: 6px;
}

.time-option {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.time-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.time-option.active {
  background: #1478ff;
  color: #fff;
}

.phone {
  width: 640px;
  max-width: 100%;
  height: 640px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 38px;
  background: var(--surface-high);
  border: 8px solid #27272a;
  box-shadow: 0 28px 70px -36px rgba(0, 0, 0, 0.9);
}

.phone-screen {
  height: 100%;
  border-radius: 28px;
  padding: 20px;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.phone-content::-webkit-scrollbar {
  width: 0;
}

.phone-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.phone-image-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.calendar-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekday {
  text-align: center;
  color: #71717a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 0;
}

.day-cell {
  min-height: 120px;
  width: 100%;
  display: block;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.1);
  color: inherit;
  cursor: pointer;
}

.day-cell:hover {
  border-color: rgba(221, 183, 255, 0.34);
  background: rgba(221, 183, 255, 0.08);
}

.day-cell.muted {
  opacity: 0.36;
  cursor: default;
}

.day-cell.today {
  border-color: rgba(221, 183, 255, 0.52);
  background: rgba(221, 183, 255, 0.1);
}

.day-cell.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(221, 183, 255, 0.18);
}

.event-chip {
  margin-top: 8px;
  padding: 5px 7px;
  border-radius: 6px;
  border-left: 2px solid var(--primary);
  background: rgba(221, 183, 255, 0.14);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-chip.published {
  border-left-color: var(--success);
  background: rgba(52, 211, 153, 0.14);
  color: var(--success);
}

.event-chip.scheduled {
  border-left-color: var(--primary);
}

.queue-list {
  max-height: 720px;
  overflow-y: auto;
  padding-right: 2px;
}

.queue-list.compact {
  max-height: 360px;
}

.queue-list::-webkit-scrollbar { width: 0; }

.calendar-status-section {
  display: grid;
  gap: 8px;
}

.calendar-status-section .section-title {
  margin-bottom: 0;
}

.calendar-status-section h3 {
  font-size: 14px;
}

.empty-mini {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--outline);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-nav {
  display: none;
}

.empty-link {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #71717a;
}

.repost-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.repost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

.repost-card {
  overflow: hidden;
}

.repost-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(221, 183, 255, 0.07);
  border-bottom: 1px solid var(--outline);
}

.repost-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.repost-original {
  padding: 18px 22px;
}

.repost-metrics {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.repost-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.repost-metrics .material-symbols-outlined {
  font-size: 16px;
  color: var(--dim);
}

.repost-metric-highlight {
  color: var(--primary) !important;
  font-weight: 900 !important;
}

.repost-metric-highlight .material-symbols-outlined {
  color: var(--primary) !important;
}

.repost-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.repost-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.scrape-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 200px 200px auto;
  gap: 12px;
  align-items: center;
}

.scrape-text {
  margin: 0;
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--outline);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.scrape-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow: auto;
}

.scrape-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
  font-size: 14px;
  line-height: 1.5;
}

.scrape-list-row a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-word;
}

.scrape-list-row a:hover {
  text-decoration: underline;
}

.scrape-list-sub {
  font-size: 11px;
  word-break: break-all;
}

.scrape-heading-h2 { margin-left: 18px; }
.scrape-heading-h3 { margin-left: 36px; }
.scrape-heading-h4 { margin-left: 54px; }

.scrape-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scrape-meta-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
}

.scrape-meta-key {
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scrape-meta-value {
  color: var(--muted);
  word-break: break-word;
  font-size: 14px;
}

.scrape-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  max-height: 640px;
  overflow: auto;
}

.scrape-image-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
}

.scrape-image-cell img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: rgba(0, 0, 0, 0.3);
}

.scrape-section {
  margin-bottom: 26px;
}

.scrape-section:last-child {
  margin-bottom: 0;
}

.scrape-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--primary);
}

.scrape-section-title .material-symbols-outlined {
  font-size: 20px;
}

.scrape-shot-box {
  max-height: 560px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: rgba(0, 0, 0, 0.3);
}

.scrape-shot-box img {
  display: block;
  width: 100%;
  height: auto;
}

.scrape-thread-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.scrape-thread-post {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .sidebar { display: none; }
  .main { padding: 32px 20px 108px; }
  .stats-grid, .dashboard-grid, .account-grid, .account-manage-layout, .composer-grid, .calendar-layout, .landing-hero, .landing-band, .performance-grid, .keyword-search-form, .repost-grid, .scrape-form {
    grid-template-columns: 1fr;
  }
  .landing-hero {
    min-height: auto;
    padding-top: 10px;
  }
  .landing-visual {
    min-height: 420px;
  }
  .landing-feature-grid {
    grid-template-columns: 1fr;
  }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
  }
  .mobile-nav .nav-button {
    width: 72px;
    height: 58px;
    padding: 0;
    flex-direction: column;
    gap: 4px;
    box-shadow: none;
    font-size: 10px;
  }
  .brand .suite { display: none; }
}

@media (max-width: 720px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 { font-size: 27px; }
  .landing-copy h1 { font-size: 54px; }
  .landing-lede { font-size: 16px; }
  .landing-visual {
    min-height: 360px;
  }
  .landing-visual img {
    min-width: 180px;
  }
  .visual-panel {
    min-width: 148px;
    padding: 12px;
    font-size: 12px;
  }
  .visual-panel:nth-of-type(1) {
    top: 28px;
    left: 0;
  }
  .visual-panel:nth-of-type(2) {
    right: 0;
    top: 150px;
  }
  .visual-panel:nth-of-type(3) {
    left: 20px;
    bottom: 28px;
  }
  .prompt-row, .target-grid, .llm-model-row {
    grid-template-columns: 1fr;
  }
  .calendar-grid {
    gap: 4px;
  }
  .day-cell {
    min-height: 88px;
    padding: 8px;
  }
  .event-chip {
    font-size: 9px;
  }
}

/* ===== 공통 토스트 알림 (오른쪽 아래) ===== */
.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
  max-width: calc(100vw - 36px);
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #161f38;
  border: 1px solid #2c3a64;
  color: #eaf0ff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(10px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast .toast-ic {
  font-size: 20px;
  line-height: 1.2;
}
.toast .toast-msg {
  flex: 1;
  word-break: break-word;
  white-space: pre-line;
}
.toast.success {
  border-color: #2f6b4f;
}
.toast.success .toast-ic {
  color: #7cf5b0;
}
.toast.error {
  border-color: #6b2f3a;
}
.toast.error .toast-ic {
  color: #ff9aa6;
}
.toast.info .toast-ic {
  color: #9fb0dd;
}
@media (max-width: 640px) {
  .toast-host {
    left: 18px;
    right: 18px;
    align-items: stretch;
  }
  .toast {
    max-width: none;
  }
}

/* ===== 버튼 인라인 스피너 (저장/처리 중) ===== */
.btn-busy {
  color: transparent !important;
  position: relative;
  pointer-events: none;
}
.btn-busy > * {
  visibility: hidden;
}
.btn-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 999px;
  border: 2px solid rgba(205, 183, 255, 0.3);
  border-top-color: #cdb7ff;
  animation: spin 0.7s linear infinite;
}
/* 자동화 패널 처리 중: 비활성 컨트롤은 흐리게 + 클릭 불가 (스피너 버튼은 또렷하게 유지) */
[data-aut]:disabled:not(.btn-busy),
[data-aut-select]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
