:root {
  --bg: #080b14;
  --card: #121827;
  --card2: #0f1524;
  --text: #f7f8ff;
  --muted: #94a0bb;
  --line: rgba(255,255,255,.09);
  --accent: #7c5cff;
  --accent2: #20d6ff;
  --good: #35d07f;
  --bad: #ff647c;
  --warn: #ffd166;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(124,92,255,.34), transparent 34%),
    radial-gradient(circle at top right, rgba(32,214,255,.16), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.app { min-height: 100vh; padding: 18px 16px 92px; max-width: 720px; margin: 0 auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 16px; }
.eyebrow { color: var(--accent2); font-weight: 900; letter-spacing: .16em; font-size: 11px; }
h1 { margin: 4px 0 0; font-size: 24px; line-height: 1.06; letter-spacing: -.03em; }
button { font: inherit; cursor: pointer; }
.icon-btn { border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); border-radius: 14px; width: 42px; height: 42px; font-size: 20px; }
.banner {
  display:flex; align-items:flex-start; justify-content:space-between; gap: 12px;
  padding: 14px 15px; border: 1px solid rgba(32,214,255,.24);
  background: linear-gradient(135deg, rgba(32,214,255,.13), rgba(124,92,255,.12));
  border-radius: 18px; margin-bottom: 16px;
}
.banner b { display:block; font-size: 15px; }
.banner span { display:block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.section-title { font-size: 12px; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; margin: 18px 0 10px; }
.list { display: grid; gap: 10px; }
.card, .idea-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.032));
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(0,0,0,.22);
}
.card { padding: 15px; }
.card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.22; letter-spacing: -.02em; }
.idea-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.idea-card:active { transform: scale(.985); }
.idea-num {
  width: 34px; height: 34px; border-radius: 13px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--accent), #3d7cff);
  box-shadow: 0 10px 24px rgba(124,92,255,.26);
}
.idea-content h3 { margin: 0; font-size: 16px; line-height: 1.22; letter-spacing: -.02em; }
.compact-meta { display:flex; gap: 6px; flex-wrap:wrap; margin-top: 7px; color: var(--muted); font-size: 11px; }
.compact-meta span:not(.badge) { border:1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 999px; padding: 4px 7px; }
.mini-action { border: 1px solid rgba(124,92,255,.35); background: rgba(124,92,255,.16); color: #fff; border-radius: 12px; padding: 8px 10px; font-size: 12px; font-weight: 900; }
.meta { display:flex; gap:7px; flex-wrap:wrap; margin: 9px 0; }
.badge { border: 1px solid var(--line); background: rgba(255,255,255,.055); color: var(--muted); border-radius: 999px; padding: 4px 8px; font-size: 11px; line-height: 1.2; }
.badge.good { color: var(--good); border-color: rgba(53,208,127,.35); background: rgba(53,208,127,.08); }
.badge.warn { color: var(--warn); border-color: rgba(255,209,102,.35); background: rgba(255,209,102,.08); }
.badge.bad { color: var(--bad); border-color: rgba(255,100,124,.35); background: rgba(255,100,124,.08); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.actions, .action-panel { display:flex; gap: 8px; flex-wrap:wrap; margin-top: 12px; }
.action-panel { margin: 12px 0 10px; }
.btn { border: 0; background: linear-gradient(135deg, var(--accent), #3d7cff); color: white; border-radius: 14px; padding: 12px 14px; font-weight: 900; }
.btn.secondary { background: rgba(255,255,255,.075); border:1px solid var(--line); color: var(--text); }
.btn.danger { background: rgba(255,100,124,.18); border:1px solid rgba(255,100,124,.35); color:#ffdbe1; }
.publish-btn { width:100%; margin: 2px 0 16px; padding: 14px; }
.small-btn { padding: 9px 11px; font-size: 13px; }
.tabs-nav { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display:grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: rgba(9,13,26,.84); border: 1px solid var(--line); border-radius: 22px; padding: 8px; backdrop-filter: blur(18px); max-width: 720px; margin: 0 auto; }
.nav-btn { border:0; background: transparent; color: var(--muted); padding: 11px 8px; border-radius: 15px; font-weight: 900; font-size: 13px; }
.nav-btn.active { background: rgba(124,92,255,.24); color: white; }
.tab { display:none; }
.tab.active { display:block; }
.modal { position: fixed; inset:0; background: rgba(0,0,0,.64); z-index: 5; display:flex; align-items:flex-end; }
.modal.hidden { display:none; }
.modal-sheet { background: #0e1424; border: 1px solid var(--line); width:100%; max-height: 92vh; overflow:auto; border-radius: 26px 26px 0 0; padding: 16px; box-shadow: 0 -18px 60px rgba(0,0,0,.35); }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; position: sticky; top: 0; background:#0e1424; padding-bottom: 10px; z-index: 1; }
.modal-head h2 { margin: 0; font-size:20px; letter-spacing: -.02em; }
.cover { width: 100%; border-radius: 20px; border:1px solid var(--line); margin: 10px 0 14px; display:block; }
.article-title { margin: 10px 0 6px; font-size: 20px; letter-spacing: -.03em; }
.article-text { white-space: pre-wrap; line-height: 1.58; color: #eef2ff; font-size: 15px; }
.job-box { border:1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 17px; padding: 12px; margin: 10px 0 14px; }
.job-box.hidden { display:none; }
.progress-line { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow:hidden; margin-bottom: 8px; }
.progress-line span { display:block; width:0%; height:100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .25s; }
.toggle-row { display:flex; justify-content:space-between; align-items:center; padding: 13px 0; border-bottom:1px solid var(--line); }
.toggle-row:last-child { border-bottom:0; }
.switch { width: 54px; height: 32px; border-radius:999px; border:1px solid var(--line); background: rgba(255,255,255,.1); padding:3px; }
.switch span { display:block; width:24px; height:24px; background:#fff; border-radius:50%; transition:.2s; }
.switch.on { background: rgba(53,208,127,.35); }
.switch.on span { transform: translateX(22px); }
.status-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-grid div { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 16px; padding: 11px; }
.status-grid span { display:block; color: var(--muted); font-size: 12px; }
.status-grid b { display:block; margin-top: 4px; }
.top-gap { margin-top: 12px; }
.skeleton-card { height: 78px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.1s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (max-width: 420px) {
  .app { padding-left: 13px; padding-right: 13px; }
  .idea-card { grid-template-columns: 30px 1fr; }
  .mini-action { grid-column: 2; width: fit-content; }
  h1 { font-size: 22px; }
}


/* UX polish patch: image previews, cleaner drafts, friendlier empty states */
.empty-state {
  display: grid;
  gap: 5px;
  color: var(--muted);
}
.empty-state b {
  color: var(--text);
  font-size: 16px;
}
.article-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 13px;
  align-items: center;
  padding: 12px;
}
.article-card h3 {
  margin: 5px 0 7px;
  font-size: 16px;
  line-height: 1.22;
}
.article-card .meta.compact {
  margin: 0;
}
.article-thumb {
  width: 92px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(32,214,255,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.68);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-thumb.no-image {
  background:
    radial-gradient(circle at 30% 20%, rgba(32,214,255,.25), transparent 35%),
    linear-gradient(135deg, rgba(124,92,255,.25), rgba(255,255,255,.04));
}
.open-row {
  color: var(--accent2);
  font-size: 12px;
  font-weight: 900;
}
.cover {
  max-height: 320px;
  object-fit: cover;
  background: rgba(255,255,255,.04);
}
.idea-card {
  cursor: pointer;
}
.idea-content h3,
.article-card h3 {
  overflow-wrap: anywhere;
}
@media (max-width: 420px) {
  .article-card {
    grid-template-columns: 82px 1fr;
    gap: 11px;
  }
  .article-thumb {
    width: 82px;
    height: 66px;
    border-radius: 14px;
  }
}

/* Cleaner draft cards */
.article-card .badge {
  text-transform: none;
  letter-spacing: 0;
}
.article-card .open-row {
  opacity: .9;
}
