:root {
  --bg: #0f0a12;
  --bg-elevated: #1a1220;
  --card: #22182a;
  --card-hover: #2a1f35;
  --pink: #ff6bb5;
  --pink-soft: #ff8ec8;
  --pink-deep: #e84a9a;
  --lavender: #c4a1ff;
  --text: #f8eef5;
  --muted: #a890a0;
  --line: rgba(255, 107, 181, 0.18);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --font: "Nunito", "Quicksand", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(232, 74, 154, 0.28), transparent 55%),
    radial-gradient(700px 420px at -10% 30%, rgba(148, 90, 220, 0.22), transparent 50%),
    radial-gradient(600px 400px at 80% 100%, rgba(255, 107, 181, 0.12), transparent 45%),
    var(--bg);
}

body {
  padding: 16px 16px 88px;
  max-width: 1760px;
  margin: 0 auto;
  position: relative;
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.b1 { width: 200px; height: 200px; background: #e84a9a; top: 20px; right: -50px; }
.b2 { width: 240px; height: 240px; background: #7c3aed; bottom: 60px; left: -70px; opacity: 0.25; }

.top, .stats, .feed, .empty, .loading, .error, .sentinel, .boost-bar, .panel {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  animation: rise 0.45s ease both;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink-soft);
  font-weight: 800;
}

h1 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.btn-pill {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink) 0%, #c084fc 100%);
  color: #1a0a14;
  box-shadow: 0 8px 28px rgba(255, 107, 181, 0.35);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-pill:active { transform: scale(0.97); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-bottom: 14px;
  width: 100%;
}
.stats.is-admin {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stats.no-adult:not(.is-admin) {
  grid-template-columns: 1fr;
}

.stat {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 8px;
  min-width: 0;
  width: 100%;
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.stat:active { transform: scale(0.98); }
.stat.active {
  border-color: rgba(255, 142, 200, 0.65);
  background: linear-gradient(160deg, rgba(255,107,181,0.16), rgba(148,90,220,0.1));
  box-shadow: 0 0 0 1px rgba(255, 107, 181, 0.18);
}
.stat span {
  display: block;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--pink-soft);
  line-height: 1.1;
}
.stat .stat-gear {
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--lavender);
}
.stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pause-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  margin: 0;
}
.pause-toggle input { accent-color: var(--pink); }

.admin-actions {
  display: none;
}
.admin-actions[hidden],
.pause-toggle[hidden] {
  display: none !important;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 107, 181, 0.1);
  color: var(--pink-soft);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.btn-ghost:active { transform: scale(0.98); }
.btn-ghost:disabled {
  opacity: 0.55;
  cursor: wait;
}

.interval-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
}

.interval-select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pink-soft);
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 4px;
  cursor: pointer;
  outline: none;
  max-width: 110px;
}
.interval-select option {
  background: #1a1220;
  color: #f8eef5;
}

.cron-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.cron-hint.warn {
  color: #fbbf24;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 6px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab.active {
  background: linear-gradient(135deg, rgba(255, 107, 181, 0.25), rgba(192, 132, 252, 0.2));
  color: var(--text);
  border-color: rgba(255, 107, 181, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 107, 181, 0.15);
}

.feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 900px) {
  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .feed { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1440px) {
  .feed { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1680px) {
  .feed { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: rise 0.4s ease both;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.media-wrap {
  position: relative;
}

.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #2a1a30, #1a1020);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.carousel:active { cursor: grabbing; }

.track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.track.dragging {
  transition: none;
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 100%;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.card-media video {
  pointer-events: auto;
}

.card-media .ph {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 1.6rem;
  opacity: 0.5;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  background: rgba(15, 10, 18, 0.78);
  backdrop-filter: blur(10px);
  color: var(--pink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 10, 18, 0.72);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}
.nav.prev { left: 6px; }
.nav.next { right: 6px; }
.nav:active { transform: translateY(-50%) scale(0.94); }

.media-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(15, 10, 18, 0.75);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
  padding-right: 42px;
}
.dots .dot {
  pointer-events: auto;
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.dots .dot.on {
  background: var(--pink-soft);
  box-shadow: 0 0 8px rgba(255, 107, 181, 0.6);
}

.reject-btn {
  position: absolute;
  top: 42px;
  right: 6px;
  z-index: 7;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 107, 181, 0.35);
  border-radius: 50%;
  background: rgba(15, 10, 18, 0.8);
  color: var(--pink-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.reject-btn:active { transform: scale(0.94); }

.parser-line {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lavender, #c4a1ff);
  word-break: break-word;
}
.ban-btn {
  color: #ff8a9a;
  border-color: rgba(255, 120, 140, 0.35);
}
.ban-btn.on {
  opacity: 0.55;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.icon-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.icon-btn svg {
  display: block;
}
.icon-btn:active { transform: scale(0.96); }

.publish-now-btn {
  margin-top: 0;
  border-color: rgba(255, 107, 181, 0.45);
  background: rgba(255, 107, 181, 0.16);
  color: var(--pink-soft);
}
.publish-now-btn:disabled,
.publish-now-btn.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.draft-btn {
  color: var(--lavender);
}
.delete-btn {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
}

.reject-btn { display: none; }

.tabs { display: none !important; }

.eta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--lavender);
  background: rgba(196, 161, 255, 0.12);
  border: 1px solid rgba(196, 161, 255, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
  margin-bottom: 0;
}
.eta.eta-due {
  color: var(--pink-soft);
  border-color: rgba(255, 107, 181, 0.4);
  background: rgba(255, 107, 181, 0.12);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  min-height: 28px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  border: 1px solid rgba(255, 196, 80, 0.35);
  border-radius: 999px;
  background: rgba(15, 10, 18, 0.55);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  cursor: pointer;
}
.like-btn .like-bolt {
  font-size: 14px;
  line-height: 1;
  filter: grayscale(0.45) brightness(0.85);
  transition: filter 0.15s ease, transform 0.15s ease;
}
.like-btn.on {
  background: rgba(255, 196, 80, 0.16);
  border-color: rgba(255, 196, 80, 0.55);
  color: #ffc450;
}
.like-btn.on .like-bolt {
  filter: none;
  transform: scale(1.08);
}
.like-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.like-btn:active { transform: scale(0.96); }

.source-link {
  color: var(--pink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.caption {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.empty, .loading, .error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  padding: 32px 12px;
}
.error { color: #fb7185; }

.spam-row {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
}
.spam-row strong { color: var(--pink-soft); }
.spam-row span { color: var(--muted); }

.boost-bar {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  animation: rise 0.5s ease both;
}
.boost-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.boost-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.boost-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,107,181,0.12), rgba(148,90,220,0.08));
  color: var(--text);
  border-radius: 14px;
  padding: 10px 8px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.boost-btn:hover:not(:disabled) { border-color: var(--pink); transform: translateY(-1px); }
.boost-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.boost-btn strong {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  z-index: 1;
}
.boost-btn .boost-ico {
  font-size: 14px;
  line-height: 1;
}
.boost-btn span {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  position: relative;
  z-index: 1;
}
.boost-btn.is-active {
  border-color: rgba(255, 142, 200, 0.65);
  box-shadow: 0 0 0 1px rgba(255, 107, 181, 0.2), 0 8px 22px rgba(232, 74, 154, 0.18);
}
.boost-btn.is-active::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 107, 181, 0.05) 0%,
    rgba(255, 142, 200, 0.45) 28%,
    rgba(196, 161, 255, 0.4) 52%,
    rgba(255, 107, 181, 0.35) 72%,
    rgba(255, 107, 181, 0.05) 100%
  );
  background-size: 220% 220%;
  animation: boostShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes boostShimmer {
  0% { background-position: 0% 40%; transform: rotate(0deg); }
  50% { background-position: 100% 60%; transform: rotate(1.5deg); }
  100% { background-position: 0% 40%; transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .boost-btn.is-active::before { animation: none; }
}

.badge.cat {
  left: auto;
  right: 8px;
  top: 8px;
  z-index: 6;
  background: rgba(20, 10, 24, 0.72);
  text-transform: lowercase;
}

.panel { position: relative; z-index: 1; margin-bottom: 16px; }
.gate-card, .settings-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.gate-card--center {
  text-align: center;
  padding: 28px 20px 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.gate-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink, #ff8ab8);
  font-weight: 700;
}
.gate-card h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
}
.gate-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.gate-cta {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-sizing: border-box;
}
.gate-cta[hidden],
.gate-copy[hidden],
.gate-msg[hidden] {
  display: none !important;
}
.gate-msg {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--pink-soft);
}
.invite-link { text-decoration: none; }

.settings-block h3 { margin: 0 0 10px; font-size: 15px; }
.intervals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.intervals-grid--daynight {
  grid-template-columns: 1fr 1fr;
}
.intervals-grid .field { margin-bottom: 0; }
.interval-schedule-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted, #b9a8c4);
  line-height: 1.4;
}
.visits-summary {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted, #b9a8c4);
  line-height: 1.45;
}
.app-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  max-height: 320px;
  overflow: auto;
}
.app-user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  font-size: 12px;
}
.app-user-row .name {
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.app-user-row .app-user-name {
  color: var(--lavender, #c9b6ff);
  text-decoration: none;
  font-weight: 700;
}
.app-user-row .app-user-name:active,
.app-user-row .app-user-name:hover {
  text-decoration: underline;
}
.app-user-row .user-flag {
  font-size: 16px;
  line-height: 1;
}
.app-user-row .user-admin {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(168, 130, 255, 0.2);
  color: var(--lavender, #c9b6ff);
}
.app-user-row .meta {
  color: var(--muted, #b9a8c4);
  grid-column: 1 / -1;
}
.app-user-row .when {
  color: var(--lavender, #c9b6ff);
  font-size: 11px;
  white-space: nowrap;
}

.pin-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pin-block h3 { margin: 0; }
.pin-text {
  display: block;
  width: 100%;
  min-height: 88px;
  resize: vertical;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pin-text:focus {
  border-color: rgba(255, 107, 181, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 107, 181, 0.12);
}
.pin-btn {
  width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  padding: 13px 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select, .kw-add input, .kw-add select {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
}
.pause-toggle.inline { display: flex; align-items: center; gap: 8px; margin: 0; }

.keywords-box { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.kw-cat { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kw-cat strong { width: 100%; font-size: 12px; color: var(--lavender); }
.kw-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.collect-force-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.btn-ghost.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}
.admin-pulse {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted, #b9a8c4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-pulse .pulse-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  white-space: pre-wrap;
}
.admin-pulse .pulse-card strong {
  display: block;
  color: var(--lavender, #c9b6ff);
  margin-bottom: 4px;
  font-size: 12px;
}
.queue-detail, .collect-status {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted, #b9a8c4);
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.parser-lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.parser-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}
.flow-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  animation: flowIn 0.45s ease both;
}
.flow-card:nth-child(2) { animation-delay: 0.06s; }
.flow-card:nth-child(3) { animation-delay: 0.12s; }
@keyframes flowIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.flow-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.flow-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(255,138,184,0.25), rgba(180,150,255,0.2));
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.flow-head h4 {
  margin: 0;
  font-size: 15px;
}
.flow-head .flow-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.flow-pipe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.flow-node {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated, rgba(0,0,0,0.2));
  color: var(--text);
}
.flow-arrow {
  width: 28px;
  height: 2px;
  position: relative;
  background: linear-gradient(90deg, transparent, var(--pink, #ff8ab8), var(--lavender, #c9b6ff), transparent);
  overflow: hidden;
}
.flow-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: flowDash 1.4s linear infinite;
  opacity: 0.55;
}
@keyframes flowDash {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.flow-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lavender, #c9b6ff);
  margin: 0 0 8px;
}
.flow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  min-height: 36px;
}
.flow-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elevated, rgba(255,255,255,0.04));
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  animation: chipPop 0.35s ease both;
}
@keyframes chipPop {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: none; }
}
.flow-chip.is-primary {
  border-color: var(--pink, #ff8ab8);
  box-shadow: 0 0 0 1px rgba(255,138,184,0.25);
}
.flow-chip .chip-cat {
  font-size: 10px;
  opacity: 0.75;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}
.flow-chip .chip-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.flow-chip .chip-star {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  opacity: 0.45;
}
.flow-chip.is-primary .chip-star { opacity: 1; color: var(--pink, #ff8ab8); }
.flow-chip-add {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px dashed var(--pink, #ff8ab8);
  background: rgba(255,138,184,0.08);
  color: var(--pink, #ff8ab8);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease;
}
.flow-chip-add:hover { transform: scale(1.06); background: rgba(255,138,184,0.16); }
.flow-add-row {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}
.flow-add-row.open { display: flex; }
.flow-add-row input,
.flow-add-row select {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  min-width: 0;
  flex: 1 1 100px;
}
.flow-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.flow-settings .field { margin-bottom: 0; }
.flow-settings .field span { font-size: 11px; }
.flow-settings .check-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.flow-settings .span-2 { grid-column: 1 / -1; }
@media (max-width: 420px) {
  .flow-settings { grid-template-columns: 1fr; }
}

.mod-actions, .editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.editor-dlg {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0;
  max-width: 420px;
  width: calc(100% - 24px);
}
.editor-dlg::backdrop { background: rgba(8, 4, 12, 0.72); }
.editor-form { padding: 16px; }
.editor-form h3 { margin: 0 0 12px; }

.admin-actions { display: none; }

.sentinel {
  grid-column: 1 / -1;
  height: 1px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* —— in-app suggest compose —— */
.compose-panel { margin-top: 8px; }
.compose-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: rise 0.35s ease both;
}
.compose-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.compose-top h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}
.compose-rg-card {
  border: 1px solid rgba(255, 138, 184, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 138, 184, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compose-rg-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--pink-soft, #ffb4d4);
}
.compose-rg-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: var(--bg-elevated, rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.compose-rg-yana {
  margin: 0;
}
.compose-or {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.compose-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.compose-hint em,
.field em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.75;
}
.compose-drop {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.compose-drop.is-drag {
  border-color: var(--pink, #ff8ab8);
  background: rgba(255, 138, 184, 0.08);
}
.compose-drop-btn {
  border: 0;
  background: transparent;
  color: var(--pink-soft, #ffb4d4);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 8px;
}
.compose-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.compose-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1018;
  border: 1px solid var(--line);
}
.compose-thumb img,
.compose-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.compose-thumb .rm {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 10, 24, 0.8);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.compose-thumb .kind {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(20, 10, 24, 0.75);
  color: var(--pink-soft, #ffb4d4);
}
.compose-caption {
  display: block;
  width: 100%;
  margin-top: 6px;
  resize: vertical;
  min-height: 96px;
  background: var(--bg-elevated, rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.4;
}
.compose-caption.compose-rg-caption {
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.compose-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compose-cat {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.compose-cat.is-on {
  border-color: var(--pink, #ff8ab8);
  color: var(--text);
  background: rgba(255, 138, 184, 0.12);
}
.compose-submit {
  width: 100%;
}
.compose-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}
.compose-status {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--pink-soft, #ffb4d4);
}
.compose-bot-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 8px 4px 2px;
  text-align: center;
}
.compose-bot-link:hover { color: var(--pink-soft, #ffb4d4); }

.settings-sub {
  margin: 18px 0 8px;
  font-size: 1.05rem;
}

#warehouseStatsLine {
  margin: 0 0 10px;
}

.fab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  pointer-events: none;
  height: 48px;
}
.fab-bar[hidden] {
  display: none !important;
}

.fab-open-channel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 181, 0.35);
  background: linear-gradient(135deg, var(--pink) 0%, #c084fc 100%);
  color: #1a0a14;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 10px 32px rgba(255, 107, 181, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.fab-open-channel:active {
  transform: translateX(-50%) scale(0.97);
}
.fab-open-channel[hidden] {
  display: none !important;
}

.fab-scroll-top {
  appearance: none;
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: 0;
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(26, 10, 20, 0.88);
  color: var(--text, #ffe6f2);
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}
.fab-scroll-top:active {
  transform: scale(0.94);
}
.fab-scroll-top[hidden] {
  display: none !important;
}

.card-actions-user {
  justify-content: flex-end;
}
.mismatch-btn {
  appearance: none;
  width: auto;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 181, 0.4);
  background: linear-gradient(180deg, rgba(255, 107, 181, 0.18) 0%, rgba(255, 107, 181, 0.08) 100%);
  color: var(--pink-soft, #ff8ec8);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.mismatch-btn:active {
  transform: scale(0.97);
  filter: brightness(1.05);
}
.mismatch-btn:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

