:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: #0d1420;
  --panel2: #111c2b;
  --line: #1b2a3d;
  --blue: #1687ff;
  --blue2: #075fc7;
  --text: #f5f8ff;
  --muted: #8292a8;
  --green: #27d17f;
  --red: #ff5263;
  --amber: #f7b84b;
}
* {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 85% -5%, #0a3973 0, transparent 32%), var(--bg);
  color: var(--text);
  font:
    15px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  min-height: 100vh;
}
button {
  font: inherit;
  min-width: 0;
}
.app {
  width: 100%;
  max-width: 680px;
  margin: auto;
  padding: calc(18px + env(safe-area-inset-top)) 14px
    calc(92px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--blue), #063d86);
  box-shadow: 0 10px 34px #0878ff55;
  font-weight: 900;
  flex: none;
}
.brand h1 {
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
}
.sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.live {
  display: flex;
  gap: 7px;
  align-items: center;
  background: #0d1d1a;
  border: 1px solid #174b39;
  color: #67e4aa;
  border-radius: 99px;
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.live:active {
  transform: scale(0.96);
}
.live.busy {
  color: #8fb1c4;
  border-color: #1f3a4b;
  background: #0c1620;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  flex: none;
}
.live.busy .dot {
  background: var(--muted);
  box-shadow: none;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.updated {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}
.stat {
  min-width: 0;
  background: linear-gradient(145deg, #101a28, #0a111c);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 13px;
}
.stat strong {
  display: block;
  font-size: 21px;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 5px;
  margin-bottom: 13px;
  scrollbar-width: none;
}
.tab {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #0b121d;
  border-radius: 13px;
  padding: 10px 14px;
  white-space: nowrap;
}
.tab.active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  border-color: transparent;
  box-shadow: 0 8px 22px #0878ff36;
}
.views {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 5px;
  overflow: auto;
  margin: 0 -14px 16px;
  padding: 8px 14px;
  background: #070b12e8;
  border-top: 1px solid #101b29;
  border-bottom: 1px solid #182538;
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}
.view-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
  border-radius: 11px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.view-tab.active {
  background: #13243a;
  color: #fff;
}
.view-tab b {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 9px;
  background: #203753;
  color: #a9d4ff;
  font-size: 9px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.intro {
  margin: 2px 2px 14px;
}
.intro h2 {
  margin: 0;
  font-size: 20px;
}
.intro p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.overview-status {
  margin-bottom: 12px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 18px 2px 10px;
}
.section-head h2 {
  font-size: 16px;
  margin: 0;
}
.section-head span {
  color: var(--muted);
  font-size: 12px;
}
.empty {
  border: 1px dashed #26364b;
  border-radius: 20px;
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  background: #0a111a;
}
.empty b {
  display: block;
  color: #dce7f7;
  margin-bottom: 5px;
}
.queue {
  display: grid;
  gap: 11px;
  min-width: 0;
}
.card {
  min-width: 0;
  background: linear-gradient(150deg, #111b29, #0b121c);
  border: 1px solid var(--line);
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 0 12px 34px #0005;
}
.card.working {
  border-color: #287bc4;
  box-shadow:
    0 0 0 1px #287bc455,
    0 12px 34px #0005;
}
.cover {
  height: 172px;
  background:
    radial-gradient(circle at 80% 10%, #174d82 0, transparent 45%),
    linear-gradient(135deg, #102d52, #0b1018);
  position: relative;
  overflow: hidden;
}
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 0.28s ease,
    transform 0.5s ease;
}
.cover-img.ready {
  opacity: 1;
  transform: scale(1);
}
.cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #06101b1f 0%,
    #07101c42 45%,
    #0b121cf5 100%
  );
}
.badge,
.time {
  position: absolute;
  z-index: 1;
  top: 10px;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 750;
}
.badge {
  left: 10px;
  background: var(--blue);
  box-shadow: 0 5px 18px #0007;
}
.time {
  right: 10px;
  background: #07111ee8;
  border: 1px solid #27415e;
  color: #acd3ff;
  text-align: right;
  box-shadow: 0 5px 18px #0007;
}
.time b {
  display: block;
  font-size: 10px;
}
.time i {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: #7fb3ff;
  margin-top: 1px;
}
.content {
  padding: 0 12px 12px;
  margin-top: -27px;
  position: relative;
  z-index: 2;
  min-width: 0;
}
.content h3 {
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px #000;
}
.meta {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.caption-preview {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #09131f;
  border: 1px solid #1a2c41;
  color: #c7d5e6;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-line;
}
.schedule {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #0b2746;
  border: 1px solid #174d7f;
  color: #d6ebff;
  font-size: 12px;
  font-weight: 650;
}
.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  margin-top: 11px;
}
.action {
  width: 100%;
  border: 1px solid #243750;
  background: #101d2c;
  color: #dceaff;
  border-radius: 11px;
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.action.primary {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  border-color: transparent;
}
.action.danger {
  color: #ff9ba5;
  border-color: #4a2630;
  background: #201218;
}
.action:disabled {
  opacity: 0.5;
}
.history {
  display: grid;
  gap: 9px;
  width: 100%;
  min-width: 0;
}
.log {
  min-width: 0;
  background: linear-gradient(145deg, #0d1723, #0a111a);
  border: 1px solid #1b2a3d;
  border-radius: 15px;
  padding: 11px 12px;
}
.log-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.log-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d9e7f8;
  font-size: 11px;
  font-weight: 750;
}
.status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.status.success {
  background: var(--green);
  box-shadow: 0 0 10px #27d17f66;
}
.status.danger {
  background: var(--red);
}
.status.warning {
  background: var(--amber);
}
.log-event {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.log h3 {
  font-size: 13px;
  line-height: 1.3;
  margin: 8px 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.log-meta {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-review {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.review-chip {
  padding: 4px 7px;
  border-radius: 99px;
  background: #0c2238;
  border: 1px solid #1d466d;
  color: #a9d4ff;
  font-size: 9px;
}
.log-reason {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #09111c;
  border: 1px solid #17273a;
  color: #b9c9dc;
  font-size: 11px;
  line-height: 1.35;
}
.log-times {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}
.open-news {
  display: block;
  width: 100%;
  margin-top: 9px;
  border: 1px solid #1d4f80;
  background: #0b2b4b;
  color: #bdddff;
  border-radius: 10px;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
}
.loader {
  padding: 70px 10px;
  text-align: center;
  color: var(--muted);
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #18304d;
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 13px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.followups {
  display: grid;
  gap: 8px;
}
.followup {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  background: #0d1723;
  border: 1px solid #1c3652;
}
.followup b {
  font-size: 12px;
}
.followup span {
  font-size: 10px;
  color: #acd3ff;
  text-align: right;
}
.story-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #21466f;
  background: linear-gradient(150deg, #102747, #08111e);
  box-shadow: 0 12px 34px #0005;
}
.story-preview {
  display: block;
  width: 100%;
  max-height: 310px;
  object-fit: cover;
  object-position: center 32%;
  background: #07111e;
}
.story-body {
  padding: 13px;
}
.story-body h3 {
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 6px;
}
.story-body p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.story-share {
  width: 100%;
  margin-top: 11px;
  border: 0;
  border-radius: 12px;
  padding: 11px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
  font-size: 12px;
  font-weight: 750;
}
.story-share:disabled {
  opacity: 0.5;
}
.settings {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #0a121d;
  padding: 14px;
  margin-bottom: 15px;
}
.settings h3 {
  margin: 0 0 5px;
  font-size: 15px;
}
.settings-note {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 11px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}
.field input,
.field select {
  width: 100%;
  border: 1px solid #243750;
  border-radius: 10px;
  background: #0e1a29;
  color: #fff;
  padding: 9px;
  font-size: 12px;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #dceaff;
  font-size: 12px;
}
.save-settings {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 11px;
  padding: 11px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
  font-weight: 750;
}
.analytics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px;
}
.analytic {
  border: 1px solid var(--line);
  background: #0b1522;
  border-radius: 13px;
  padding: 10px;
}
.analytic b {
  display: block;
  font-size: 17px;
}
.analytic span {
  color: var(--muted);
  font-size: 10px;
}
.sources {
  grid-column: 1/-1;
  font-size: 10px;
  color: #afc2d9;
  line-height: 1.55;
}
.audit {
  margin-top: 8px;
  border-left: 2px solid #235b91;
  padding-left: 8px;
  color: #9fb5cd;
  font-size: 10px;
}
.score {
  color: #72b8ff;
}
.corroborated {
  color: #74dca9;
}
.actions .primary,
.actions .danger {
  grid-column: 1/-1;
}
.actions .primary {
  order: -2;
  padding: 12px;
}
.actions .danger {
  order: 2;
  margin-top: 2px;
}
.danger-zone {
  border-color: #42242d;
  background: #170e14;
}
.danger-zone h3 {
  color: #ffb2ba;
}
.retry {
  display: block;
  margin: 16px auto 0;
  max-width: 220px;
  border: 1px solid #243750;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff;
  border-radius: 11px;
  padding: 10px;
  font-size: 13px;
  font-weight: 650;
}
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  max-width: 500px;
  margin: auto;
  padding: 13px 15px;
  border-radius: 14px;
  background: #142238;
  border: 1px solid #2b4a71;
  box-shadow: 0 15px 50px #0009;
  transform: translateY(120px);
  opacity: 0;
  transition: 0.25s;
  z-index: 20;
}
.toast.show {
  transform: none;
  opacity: 1;
}
.error {
  color: #ff9aa5;
}
.hidden {
  display: none !important;
}
@media (min-width: 650px) {
  .queue {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .stats {
    gap: 13px;
  }
  .cover {
    height: 156px;
  }
}

.control-buttons {
  display: grid;
  gap: 8px;
}
.control-buttons button {
  border: 1px solid #294661;
  background: #10253c;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}
.control-buttons button:disabled {
  opacity: 0.5;
}
.source-health {
  display: grid;
  gap: 8px;
}
.source-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.source-item span,
.source-item small {
  color: var(--muted);
  font-size: 12px;
}
.source-item.error {
  border-color: var(--red);
}
