/* Dark is the default theme; light applies only when chosen with the toggle. */
:root {
  color-scheme: dark;
  --public-bg: #14161f;
  --public-card: #1b1e2b;
  --public-text: #e4e7f4;
  --public-muted: #8a90a8;
  --public-border: #2b2f42;
  --public-accent: #7189ff;
  --public-accent-soft: rgba(113, 137, 255, 0.18);
  --public-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  --public-soft-bg: #232736;
  --public-input-bg: #232736;
  --public-avatar-bg: #2b2f42;
  --public-faint: #4a5068;
  --public-error-bg: #3a2228;
  --public-error-border: #6b3a42;
  --public-error-text: #ff9aa5;
  --public-cw-bg: #2c2820;
  --public-cw-bg-hover: #363023;
  --public-cw-border: #4a4232;
}

:root[data-theme="light"] {
  color-scheme: light;
  --public-bg: #f2f3f7;
  --public-card: #ffffff;
  --public-text: #2a2d3c;
  --public-muted: #82879a;
  --public-border: #e3e6f2;
  --public-accent: #4f73ff;
  --public-accent-soft: rgba(79, 115, 255, 0.12);
  --public-shadow: 0 10px 24px rgba(40, 48, 70, 0.08);
  --public-soft-bg: #f8f9fd;
  --public-input-bg: #ffffff;
  --public-avatar-bg: #e1e3f5;
  --public-faint: #c7cde7;
  --public-error-bg: #fff3f3;
  --public-error-border: #f0b5b5;
  --public-error-text: #a23b3b;
  --public-cw-bg: #fefaf3;
  --public-cw-bg-hover: #fdf3e3;
  --public-cw-border: #f2e6d5;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--public-text);
  background: var(--public-bg);
}

.public-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  min-height: 40px;
  background: var(--public-accent);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.public-button--block {
  width: 100%;
}

.public-button--secondary {
  background: transparent;
  color: var(--public-accent);
  border: 1px solid var(--public-accent);
}

.public-button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* A follow in flight talks to a remote server (1–3 s): the pulse says
   "working", where a static dim could read as "unavailable". */
.public-follow-form button:disabled {
  animation: public-pulse 1s ease-in-out infinite;
}

@keyframes public-pulse {
  50% {
    opacity: 0.35;
  }
}

.public-emoji-count {
  display: inline-flex;
  gap: 2px;
  flex-wrap: nowrap;
  align-items: center;
  vertical-align: middle;
}

.public-emoji-count--wrap {
  flex-wrap: wrap;
  max-width: 96px;
}