:root {
  /* Surfaces are layered rather than flat: each step up is slightly lighter and
     slightly cooler, so depth reads without heavy shadows. */
  --bg: #0b0f16;
  --bg-glow: radial-gradient(1200px 600px at 15% -10%, rgba(245, 158, 11, 0.07), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(56, 189, 248, 0.06), transparent 55%);
  --panel: #121924;
  --panel-soft: #18212f;
  --surface: #0e141d;
  --surface-alt: #151d29;
  --raised: #1c2532;

  --line: rgba(148, 172, 205, 0.1);
  --line-strong: rgba(148, 172, 205, 0.2);
  --line-focus: rgba(245, 158, 11, 0.55);

  --text: #e8eef7;
  --text-dim: #b6c2d4;
  --muted: #8494ab;
  --faint: #5d6b7f;

  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-ink: #1a1204;
  --info: #38bdf8;
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.32), 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --radius-xs: 6px;

  --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "SF Mono", monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  background-image: var(--bg-glow);
  background-attachment: fixed;
  font-size: 15px;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  letter-spacing: -0.005em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* Scrollbars, so nested panes don't look like raw browser chrome. */
* {
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
  background-clip: content-box;
}

.shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hidden {
  display: none !important;
}

.login-panel,
.composer-card,
.schedule-card,
.jobs-card {
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
}

/* A single hairline highlight along the top edge -- reads as light falling on
   the card, and is what stops these looking like flat rectangles. */
.login-panel::before,
.composer-card::before,
.schedule-card::before,
.jobs-card::before,
.queue-card::before,
.preview-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  content: "";
  height: 1px;
  left: 12px;
  position: absolute;
  right: 12px;
  top: 0;
}

.login-shell {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: 28px;
}

.login-copy,
.login-notes {
  display: grid;
  align-content: start;
  gap: 14px;
}

.pill-row,
.topbar-actions,
.composer-actions,
.schedule-badges,
.schedule-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill,
.badge,
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Status badges carry a dot, so state reads at a glance rather than by reading. */
.badge.pending,
.badge.sent,
.badge.cancelled {
  padding-left: 8px;
}
.badge.pending::before,
.badge.sent::before,
.badge.cancelled::before {
  border-radius: 50%;
  content: "";
  height: 6px;
  width: 6px;
}
.badge.pending {
  border-color: rgba(245, 158, 11, 0.28);
  color: #fcd34d;
}
.badge.pending::before {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.badge.sent {
  background: var(--success-soft);
  border-color: rgba(52, 211, 153, 0.26);
  color: #6ee7b7;
}
.badge.sent::before {
  background: var(--success);
}
.badge.cancelled {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.24);
  color: #fca5a5;
}
.badge.cancelled::before {
  background: var(--danger);
}

.user-chip {
  background: var(--raised);
  min-height: 30px;
  padding: 0 12px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-panel h1,
.topbar h1,
.section-heading h2,
.section-heading h3,
.embed-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar h1 {
  font-size: 1.5rem;
  line-height: 1.2;
}
.section-heading h2 {
  font-size: 1.12rem;
}
.section-heading h3,
.section-heading h4 {
  font-size: 0.95rem;
  margin: 0;
}

.login-panel h1 {
  background: linear-gradient(180deg, var(--text), #9db2cd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.05;
}

.login-notes {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.login-notes h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.login-notes p,
.lede,
.muted,
.field-hint {
  margin: 0;
  color: var(--muted);
}

.primary-link,
.primary-button,
.ghost-button,
.danger-button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 90ms var(--ease), border-color 130ms var(--ease), background-color 130ms var(--ease),
    box-shadow 130ms var(--ease), color 130ms var(--ease);
}

.primary-link:active,
.primary-button:active,
.ghost-button:active,
.danger-button:active,
.upload-button:active {
  transform: translateY(1px);
}

.primary-link:focus-visible,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.danger-button:focus-visible,
.upload-button:focus-visible,
.tab:focus-visible,
.chip:focus-visible,
.tool:focus-visible,
.icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent);
}

.primary-link,
.primary-button {
  background: linear-gradient(180deg, #fbbf24, var(--accent));
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: var(--accent-ink);
  font-weight: 600;
}
.primary-link:hover,
.primary-button:hover {
  background: linear-gradient(180deg, #fcd34d, #fbbf24);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.ghost-button,
.upload-button {
  background: var(--raised);
  color: var(--text-dim);
  border-color: var(--line);
}
.ghost-button:hover,
.upload-button:hover {
  background: var(--panel-soft);
  border-color: var(--line-strong);
  color: var(--text);
}

.danger-button {
  background: var(--danger-soft);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.22);
}
.danger-button:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:disabled:hover {
  transform: none;
}

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

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.composer-card,
.schedule-card,
.jobs-card {
  padding: 22px;
}

.jobs-card {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading.minor {
  margin-top: 12px;
}

.subsection {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

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

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

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

.compact {
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.field-hint {
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 130ms var(--ease), box-shadow 130ms var(--ease), background-color 130ms var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  background: var(--surface-alt);
  border-color: var(--line-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 32px;
}

textarea {
  resize: vertical;
}

input[type="color"] {
  min-height: 46px;
  padding: 6px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.field-inline {
  align-self: center;
}

.stack,
.fields-stack,
.schedule-list {
  display: grid;
  gap: 14px;
}

.jobs-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.jobs-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.jobs-sources {
  margin: 18px 0;
}

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

.source-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.source-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.embed-editor,
.attachment-card,
.schedule-item {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.embed-editor,
.attachment-card,
.schedule-item {
  padding: 16px;
}

.embed-header,
.schedule-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.embed-field-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.attachment-card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.attachment-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.attachment-name {
  overflow-wrap: anywhere;
}

.status-line {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--muted);
}

.status-line.success {
  color: var(--success);
}

.status-line.error {
  color: #ffb4b4;
}

.schedule-title {
  margin: 0;
  font-size: 1.05rem;
}

.schedule-title a {
  color: var(--text);
  text-decoration: none;
}

.schedule-title a:hover {
  color: var(--accent-alt);
}

.schedule-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.schedule-preview {
  color: var(--text);
  white-space: pre-wrap;
}

.badge.pending {
  color: var(--accent-alt);
  border-color: rgba(56, 189, 248, 0.24);
}

.badge.sent {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.22);
}

.badge.cancelled {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.22);
}

.hidden-input {
  display: none;
}

@media (max-width: 1100px) {
  .layout,
  .login-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 1480px);
    padding-top: 20px;
  }

  .composer-card,
  .schedule-card,
  .jobs-card,
  .login-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .topbar,
  .section-heading,
  .embed-header,
  .schedule-top {
    flex-direction: column;
    align-items: stretch;
  }

  .two-up,
  .three-up,
  .embed-field-row {
    grid-template-columns: 1fr;
  }
}

/* ==================================================================
   Composer rebuild
   ================================================================== */

.spacer {
  flex: 1;
}
.meta-icon {
  border-radius: 50%;
  flex-shrink: 0;
  height: 20px;
  object-fit: cover;
  width: 20px;
}
#guildMeta {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin-top: 6px;
}
.topbar {
  align-items: flex-start;
  padding-bottom: 4px;
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  margin-bottom: 4px;
}
.section-heading {
  margin-bottom: 14px;
}
.section-heading.minor {
  margin-bottom: 10px;
}
.subsection {
  margin-top: 20px;
}

/* Empty states read as deliberate rather than as a missing element. */
.muted:only-child {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--faint);
  display: block;
  font-size: 0.88rem;
  padding: 22px 16px;
  text-align: center;
}
.strong {
  color: var(--text);
  font-weight: 600;
}
.hint-inline {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 6px 0 0;
}

/* --- tabs --- */
/* Segmented control rather than underlined tabs -- reads as a control surface
   and sits better above the cards than a bare rule. */
.tabs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: inline-flex;
  gap: 2px;
  margin: 16px 0 18px;
  padding: 4px;
}
.tab {
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 15px;
  transition: background-color 130ms var(--ease), color 130ms var(--ease);
}
.tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
}
.tab.is-active {
  background: var(--raised);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.tab-count {
  background: var(--panel-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  min-width: 19px;
  padding: 1px 6px;
  text-align: center;
}
.tab.is-active .tab-count {
  background: var(--accent-soft);
  color: var(--accent);
}

.queue-card,
.preview-card {
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
}

/* Interactive list rows: lift slightly and warm the border on hover so the
   queue feels like a list of things you can act on, not a static table. */
.schedule-item {
  transition: border-color 130ms var(--ease), background-color 130ms var(--ease), transform 130ms var(--ease);
}
.schedule-item:hover {
  background: var(--raised);
  border-color: var(--line-strong);
}
.schedule-item .schedule-actions {
  opacity: 0.55;
  transition: opacity 130ms var(--ease);
}
.schedule-item:hover .schedule-actions,
.schedule-item:focus-within .schedule-actions {
  opacity: 1;
}

.attachment-card {
  transition: border-color 130ms var(--ease);
}
.attachment-card:hover {
  border-color: var(--line-strong);
}

.embed-editor {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 130ms var(--ease);
}
.embed-editor:hover {
  border-color: var(--line-strong);
}
.embed-editor:focus-within {
  border-color: var(--line-focus);
}
.embed-header {
  background: rgba(255, 255, 255, 0.015);
}

/* The message box is the focal point of the page; give it a real focus state. */
.message-box:focus-within {
  border-color: var(--line-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.message-box {
  transition: border-color 130ms var(--ease), box-shadow 130ms var(--ease);
}

/* --- layout --- */
.composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.composer-card {
  padding: 22px;
  position: relative;
}
.preview-card {
  position: sticky;
  top: 18px;
}
.field-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.field-row .grow {
  flex: 1;
}

/* --- channel combo --- */
.combo {
  position: relative;
}
.combo input {
  width: 100%;
}
.combo-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.combo-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  padding: 8px 12px;
  text-align: left;
}
.combo-item:hover {
  background: var(--panel-soft);
}
.combo-empty {
  padding: 10px 12px;
}

/* --- message box --- */
.message-box {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: visible;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
}
.tool {
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  height: 28px;
  min-width: 28px;
  padding: 0;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.tool svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  width: 16px;
}
/* Bold's glyph is a filled shape, not a stroked outline. */
.tool[data-wrap="**"] svg {
  fill: currentColor;
  stroke-width: 0.8;
}
.tool:hover {
  background: var(--raised);
  color: var(--text);
}
.tool:active {
  background: var(--panel-soft);
}
.tool-divider {
  background: var(--line);
  height: 18px;
  margin: 0 5px;
  width: 1px;
}
.composer-input-wrap {
  position: relative;
}
.composer-input-wrap textarea {
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  display: block;
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.5;
  min-height: 150px;
  padding: 12px 14px;
  resize: vertical;
  width: 100%;
}
.composer-input-wrap textarea:focus {
  outline: none;
}
.message-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 7px 12px;
}
.message-footer .hint-inline {
  margin: 0;
  color: var(--accent);
}
.toggle.compact {
  font-size: 0.85rem;
  gap: 6px;
}
.char-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.char-count.near {
  color: var(--accent);
}
.char-count.over {
  color: var(--danger);
  font-weight: 700;
}

/* --- autocomplete --- */
.autocomplete {
  position: absolute;
  z-index: 50;
  bottom: 8px;
  left: 12px;
  min-width: 300px;
  max-width: 460px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.ac-item {
  align-items: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-family: var(--font-body);
  gap: 8px;
  padding: 7px 11px;
  text-align: left;
  width: 100%;
}
.ac-item.is-active,
.ac-item:hover {
  background: var(--panel-soft);
}
.ac-icon {
  height: 20px;
  width: 20px;
  object-fit: contain;
}
.ac-label {
  flex: 1;
}
.ac-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

/* --- drag and drop --- */
.drop-overlay {
  align-items: center;
  background: rgba(16, 24, 33, 0.88);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-lg);
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
  z-index: 60;
  pointer-events: none;
}
.drop-overlay span {
  color: var(--accent);
  font-size: 1.1rem;
}

/* --- scheduling --- */
.when-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quick-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: var(--panel-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 5px 12px;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- attachments --- */
.attachment-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.tiny {
  font-size: 0.78rem;
  padding: 4px 9px;
}
.attachment-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- embed editor --- */
.embed-header {
  align-items: center;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}
.embed-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 14px 12px;
}
.embed-editor.collapsed .embed-body {
  display: none;
}
.embed-editor.collapsed .embed-collapse {
  transform: rotate(-90deg);
}
.embed-collapse {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 2px;
  transition: transform 0.12s ease;
}
.embed-swatch {
  border: 2px solid var(--line-strong);
  border-radius: 4px;
  display: inline-block;
  height: 14px;
  width: 6px;
}
.embed-title-label {
  font-size: 0.92rem;
  margin: 0;
}
.icon-button {
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  height: 26px;
  width: 26px;
}
.icon-button:hover {
  background: var(--panel-soft);
  border-color: var(--line-strong);
  color: var(--text);
}
.icon-button.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.color-field {
  align-items: center;
  display: flex;
  gap: 8px;
}
.color-field input[type="color"]:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

/* --- emoji picker --- */
.emoji-picker {
  position: absolute;
  z-index: 80;
  width: 320px;
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 10px;
}
.emoji-picker input {
  margin-bottom: 8px;
  width: 100%;
}
.emoji-grid {
  max-height: 260px;
  overflow-y: auto;
}
.emoji-section {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin: 8px 0 4px;
  text-transform: uppercase;
}
.emoji-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}
.emoji-cell {
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  height: 34px;
  padding: 0;
}
.emoji-cell:hover {
  background: var(--panel-soft);
}
.emoji-cell img {
  height: 22px;
  width: 22px;
  object-fit: contain;
}

.search-input {
  min-width: 220px;
}
.inline-select {
  width: auto;
  min-width: 170px;
}

/* --- job sources --- */
.source-item {
  display: grid;
  gap: 9px;
}
.source-item.unsupported {
  opacity: 0.62;
}
.source-top {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.source-top .toggle {
  gap: 8px;
  margin: 0;
}
.source-url {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.source-item .schedule-meta {
  font-size: 0.78rem;
}
.jobs-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ==================================================================
   Discord-style preview
   ================================================================== */

.discord-preview {
  background: #313338;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: #dbdee1;
  font-family: "gg sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.375;
  max-height: 70vh;
  overflow-y: auto;
  padding: 16px;
}
.dp-message {
  display: flex;
  gap: 14px;
}
.dp-avatar {
  border-radius: 50%;
  flex-shrink: 0;
  height: 40px;
  width: 40px;
}
.dp-body {
  min-width: 0;
  flex: 1;
}
.dp-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
  margin-bottom: 2px;
}
.dp-name {
  color: #f2f3f5;
  font-weight: 600;
}
.dp-tag {
  background: #5865f2;
  border-radius: 4px;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 4px;
  text-transform: uppercase;
}
.dp-time {
  color: #949ba4;
  font-size: 0.75rem;
}
.dp-content {
  overflow-wrap: anywhere;
  white-space: normal;
}
.dp-empty {
  color: #949ba4;
  font-style: italic;
}
.dp-mention {
  background: rgba(88, 101, 242, 0.15);
  border-radius: 3px;
  color: #c9cdfb;
  font-weight: 500;
  padding: 0 2px;
}
.dp-timestamp {
  background: rgba(148, 155, 164, 0.18);
  border-radius: 3px;
  padding: 0 2px;
}
.dp-link {
  color: #00a8fc;
  text-decoration: none;
}
.dp-link:hover {
  text-decoration: underline;
}
.dp-code {
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.85em;
  padding: 1px 4px;
}
.dp-codeblock {
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 4px;
  margin: 6px 0;
  overflow-x: auto;
  padding: 8px 10px;
}
.dp-codeblock code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.85em;
  white-space: pre;
}
.dp-spoiler {
  background: #202225;
  border-radius: 3px;
  color: transparent;
  cursor: pointer;
  padding: 0 2px;
}
.dp-spoiler:hover {
  color: #dbdee1;
}
.dp-quote {
  border-left: 4px solid #4e5058;
  margin: 2px 0;
  padding-left: 10px;
}
.dp-li {
  padding-left: 18px;
  position: relative;
}
.dp-li::before {
  content: "•";
  left: 6px;
  position: absolute;
}
.dp-h1,
.dp-h2,
.dp-h3 {
  color: #f2f3f5;
  font-weight: 700;
  margin: 8px 0 2px;
}
.dp-h1 {
  font-size: 1.3rem;
}
.dp-h2 {
  font-size: 1.15rem;
}
.dp-h3 {
  font-size: 1rem;
}
.dp-emoji {
  height: 22px;
  vertical-align: -0.35em;
  width: 22px;
}
.dp-attachments {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.dp-attachment-image {
  border-radius: 8px;
  max-height: 260px;
  max-width: 100%;
  object-fit: contain;
}
.dp-attachment-file {
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 8px;
  padding: 8px 12px;
}

/* --- preview embeds --- */
.dp-embed {
  background: #2b2d31;
  border-left: 4px solid #4f545c;
  border-radius: 4px;
  margin-top: 8px;
  max-width: 520px;
  padding: 10px 14px 12px 12px;
}
.dpe-grid {
  display: flex;
  gap: 12px;
}
.dpe-main {
  flex: 1;
  min-width: 0;
}
.dpe-thumb img {
  border-radius: 4px;
  max-height: 80px;
  max-width: 80px;
}
.dpe-author {
  align-items: center;
  display: flex;
  font-size: 0.87rem;
  font-weight: 600;
  gap: 8px;
  margin-bottom: 6px;
}
.dpe-author img {
  border-radius: 50%;
  height: 24px;
  width: 24px;
}
.dpe-title {
  color: #f2f3f5;
  font-weight: 600;
  margin-bottom: 6px;
}
.dpe-title a {
  color: #00a8fc;
  text-decoration: none;
}
.dpe-description {
  font-size: 0.9rem;
}
.dpe-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.dpe-field {
  flex: 1 1 100%;
  min-width: 0;
}
.dpe-field.inline {
  flex: 1 1 30%;
}
.dpe-field-name {
  color: #f2f3f5;
  font-size: 0.86rem;
  font-weight: 600;
}
.dpe-field-value {
  font-size: 0.86rem;
}
.dpe-image img {
  border-radius: 4px;
  margin-top: 10px;
  max-width: 100%;
}
.dpe-footer {
  align-items: center;
  color: #949ba4;
  display: flex;
  font-size: 0.78rem;
  gap: 8px;
  margin-top: 8px;
}
.dpe-footer img {
  border-radius: 50%;
  height: 20px;
  width: 20px;
}
.preview-note {
  font-size: 0.8rem;
  margin: 10px 0 0;
}

@media (max-width: 1200px) {
  .composer-layout {
    grid-template-columns: 1fr;
  }
  .preview-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .field-row {
    flex-direction: column;
  }
  .emoji-row {
    grid-template-columns: repeat(6, 1fr);
  }
}
