/* Chillieve — warm, cozy, fun */

:root {
  --bg: #f6efe3;           /* cream background */
  --bg-card: #ffffff;
  --bg-soft: #fbf5e9;
  --ink: #3b2a1f;          /* warm dark brown */
  --ink-soft: #7a6657;
  --line: #e8dcc6;
  --accent: #d15b4a;       /* terracotta roof red */
  --accent-dark: #b84a3a;
  --accent-soft: #fbe3dd;
  --green: #6fa86a;
  --green-soft: #dff1db;
  --blue: #a8c7cc;         /* pants blue */
  --yellow: #f0c062;
  --shadow: 0 6px 0 rgba(59, 42, 31, 0.08);
  --shadow-hover: 0 10px 24px rgba(59, 42, 31, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
}

/* Dark theme overrides */
html.dark {
  --bg: #1a1412;
  --bg-card: #241e1a;
  --bg-soft: #2a2220;
  --ink: #f0e6d8;
  --ink-soft: #a89888;
  --line: #3d322a;
  --accent: #e06b5a;
  --accent-dark: #c75545;
  --accent-soft: #3a2220;
  --green: #7ec478;
  --green-soft: #1e2e1c;
  --shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* -------- Navbar -------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 600; color: var(--ink-soft); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--ink) !important;
  color: var(--bg) !important;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700 !important;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.nav-cta:hover { transform: translateY(-2px); color: var(--bg) !important; }

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* -------- Hero (old full-width — kept for create page) -------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 60px;
}
.hero-text h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -1.2px;
  font-weight: 900;
  margin-bottom: 18px;
}
.hero-text h1 span { color: var(--accent); }
.hero-text p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-ghost { background: var(--bg-card); color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.hero-visual {
  position: relative;
  display: flex; justify-content: center; align-items: center;
}
.hero-visual img {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 30px 40px rgba(59,42,31,.18));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* -------- Hero compact (new homepage) -------- */
.hero-compact {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 0 12px;
}
.hero-char {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(59,42,31,.15));
  animation: float 6s ease-in-out infinite;
  flex-shrink: 0;
}
.hero-info h1 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.hero-info h1 span { color: var(--accent); }
.hero-info p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 520px;
}

/* -------- Search (large) -------- */
.search-section { padding: 18px 0 8px; }
.search-wrap-lg {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap-lg:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-wrap-lg .search-icon { font-size: 18px; flex-shrink: 0; }
.search-wrap-lg input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}
.search-wrap-lg input::placeholder { color: var(--ink-soft); opacity: 0.6; }
.search-wrap-lg .search-clear {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s;
}
.search-wrap-lg .search-clear:hover { background: var(--accent-soft); color: var(--accent); }

/* -------- Filter bar -------- */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 12px;
  gap: 16px;
}
.filter-left { display: flex; align-items: baseline; gap: 10px; }
.filter-left h2 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.3px;
}
.coin-count {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.time-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.tt {
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  transition: all .15s;
}
.tt.active { background: var(--ink); color: var(--bg); }
.tt:hover:not(.active) { color: var(--ink); }

/* -------- pump.fun-style tab pills (Movers/Charities/Mayhem/...) -------- */
.tab-pills {
  display: flex;
  gap: 8px;
  margin: 6px 0 18px;
  padding: 4px 0 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.tab-pills::-webkit-scrollbar { height: 6px; }
.tab-pills::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.tp {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 2px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, color .15s;
}
.tp:hover:not(.active) {
  background: var(--bg-soft);
  transform: translateY(-1px);
}
.tp.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* -------- Coin grid -------- */
.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding-bottom: 48px;
}
.coin-card {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.coin-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.cc-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cc-img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.cg-img-fallback {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}
.cc-meta { flex: 1; min-width: 0; }
.cc-name {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-sym {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.cc-change {
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.cc-change.green { background: var(--green-soft); color: var(--green); }
.cc-change.red   { background: #fde8e8; color: #d14545; }
html.dark .cc-change.red { background: #3a1e1e; }

.cc-bottom {
  display: flex;
  gap: 8px;
}
.cc-stat {
  flex: 1;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.cc-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.cc-val {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.cc-cta {
  text-align: center;
  background: var(--accent);
  color: #fff;
  padding: 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s;
}
.coin-card:hover .cc-cta {
  opacity: 1;
  transform: translateY(0);
}

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* -------- Responsive -------- */
@media (max-width: 640px) {
  .navbar { padding: 14px 16px; }
  .nav-links { gap: 14px; }
  .hero-compact { flex-direction: column; text-align: center; gap: 16px; }
  .hero-char { width: 80px; height: 80px; }
  .hero-info h1 { font-size: 28px; }
  .hero-info p { font-size: 14px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .time-tabs { justify-content: center; }
  .tab-pills { padding-left: 2px; padding-right: 2px; }
  .tp { padding: 7px 12px; font-size: 12px; }
  .coin-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cc-bottom { flex-wrap: wrap; }
}

.hero-chips {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.chip {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--green); margin-right: 6px; }

/* -------- Section header -------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 20px 0 22px;
  gap: 20px;
}
.section-head h2 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.section-head p { color: var(--ink-soft); font-size: 14px; }

.tabs { display: flex; gap: 6px; background: var(--bg-card); border: 2px solid var(--line); border-radius: 999px; padding: 4px; }
.tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
  transition: all .15s;
}
.tab.active { background: var(--ink); color: var(--bg); }
.tab:hover:not(.active):not(.disabled) { color: var(--ink); }
.tab.disabled,
.tab[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--ink-soft);
}
.tab .soon {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* -------- Search bar -------- */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  margin-bottom: 18px;
  transition: border-color .15s;
}
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap .search-icon {
  font-size: 16px;
  color: var(--ink-soft);
  flex-shrink: 0;
  margin-right: 10px;
}
.search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 14px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.search-wrap input::placeholder { color: var(--ink-soft); font-weight: 500; }
.search-wrap .search-clear {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.search-wrap .search-clear:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.search-wrap.compact { margin-bottom: 12px; padding: 0 12px; }
.search-wrap.compact input { padding: 10px 0; font-size: 13px; }
.search-wrap.compact .search-icon { font-size: 13px; margin-right: 8px; }

/* -------- Padre-style trending table -------- */
.trending-table {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 60px;
}
.trending-head,
.trending-row {
  display: grid;
  grid-template-columns: 48px 1fr 120px 120px 80px 130px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}
.trending-head {
  background: var(--bg-soft);
  border-bottom: 2px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--ink-soft);
}
.trending-head .th-mcap,
.trending-head .th-vol,
.trending-head .th-age { text-align: right; }
.trending-body {
  max-height: 720px;
  overflow-y: auto;
}
.trending-body::-webkit-scrollbar { width: 10px; }
.trending-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.trending-row {
  border-bottom: 1.5px dashed var(--line);
  transition: background .15s;
  color: inherit;
  text-decoration: none;
}
.trending-row:last-child { border-bottom: none; }
.trending-row:hover { background: var(--bg-soft); }

.td-rank {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
}
.td-token {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.row-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.row-img.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
}
.token-meta { min-width: 0; }
.token-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.token-sym {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.token-sym .mint {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  opacity: 0.8;
}
.td-mcap, .td-vol, .td-age {
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.td-vol, .td-age { color: var(--ink-soft); }
.td-action { display: flex; justify-content: flex-end; }
.row-btn {
  background: var(--yellow);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  transition: all .15s;
  white-space: nowrap;
}
.trending-row:hover .row-btn {
  background: var(--accent);
  color: #fff;
}
.row-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}
.row-empty small { display: block; margin-top: 6px; font-weight: 500; }

.spinner-sm {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@media (max-width: 860px) {
  .trending-head,
  .trending-row {
    grid-template-columns: 32px 1fr 90px 100px;
    gap: 10px;
    padding: 12px 14px;
  }
  .th-vol, .td-vol, .th-age, .td-age { display: none; }
}

/* -------- Coin grid (legacy) -------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}
.coin-card {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.coin-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.coin-head { display: flex; align-items: center; gap: 12px; }
.coin-img {
  width: 52px; height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.coin-info h3 { font-size: 15px; font-weight: 800; line-height: 1.2; }
.coin-info .sym { font-size: 12px; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.coin-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1.5px dashed var(--line);
  font-size: 13px;
}
.coin-stats .mcap { font-weight: 700; }
.coin-stats .chg.up { color: var(--green); font-weight: 700; }
.coin-stats .chg.down { color: var(--accent); font-weight: 700; }
.source-badge {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
  flex-shrink: 0;
}
.source-badge.pump  { background: var(--accent-soft); color: var(--accent); }
.source-badge.padre { background: #e6f1ff; color: #4a6db8; }

.chill-btn {
  background: var(--yellow);
  color: var(--ink);
  padding: 10px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.coin-card:hover .chill-btn { background: var(--accent); color: #fff; }

/* -------- Create page -------- */
.create-page { padding: 30px 0 80px; }
.create-title { font-size: 44px; font-weight: 900; letter-spacing: -1px; margin-bottom: 8px; }
.create-title span { color: var(--accent); }
.create-sub { color: var(--ink-soft); font-size: 17px; margin-bottom: 34px; }

.steps {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-text h1 { font-size: 38px; }
}

.panel {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 800;
}
.panel h3 .num {
  display: inline-flex;
  width: 22px; height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  align-items: center; justify-content: center;
  font-size: 12px;
  margin-right: 8px;
}

/* Source coin picker grid (smaller) */
.picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}
.picker::-webkit-scrollbar { width: 8px; }
.picker::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.pick-card {
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: all .15s;
}
.pick-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pick-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(209, 91, 74, 0.15);
}
.pick-card img {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
}
.pc-img-fallback {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid var(--line);
  flex-shrink: 0;
}

/* Selected-coin badge (collapsed picker UX, when ?coin= is preselected) */
.selected-coin-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-top: 14px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
}
.selected-coin-badge img,
.scb-img-fallback {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.scb-img-fallback {
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}
.scb-meta { flex: 1; min-width: 0; }
.scb-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scb-sym {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-top: 2px;
}
.btn-change {
  background: var(--bg-card);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}
.btn-change:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Source-coin input slot fallback (when image fails on the right preview) */
.input-img-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 24px;
  border-radius: 12px;
}
.pick-card .pc-name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-card .pc-mcap { font-size: 11px; color: var(--ink-soft); font-weight: 600; }

.picker-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ptab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
  transition: all .15s;
}
.ptab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ptab.disabled,
.ptab[disabled] { opacity: 0.5; cursor: not-allowed; }
.ptab .soon {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 999px;
  margin-left: 3px;
  vertical-align: middle;
}

/* Custom upload dropzone */
.upload-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-soft);
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 14px;
}
.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.upload-zone:hover .upload-icon { border-color: var(--accent); }
.upload-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upload-text strong { font-size: 14px; font-weight: 800; color: var(--ink); }
.upload-text span { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

/* Custom preview (after upload) */
.custom-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  position: relative;
}
.custom-preview img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  border: 2px solid #fff;
  flex-shrink: 0;
}
.custom-preview-body { flex: 1; min-width: 0; }
.custom-preview-body input {
  width: 100%;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.custom-preview-body input:focus { border-color: var(--accent); }
.custom-hint {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 4px;
}
#custom-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
#custom-clear:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Divider */
.picker-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0 14px;
}
.picker-divider::before,
.picker-divider::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: var(--line);
}
.picker-divider span {
  padding: 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--ink-soft);
}

/* Preview panel */
.preview-panel {
  background: linear-gradient(180deg, var(--bg-soft) 0%, #f3e6cd 100%);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 20px;
}

/* Two-input row (coin + chillhouse base) */
.mix-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.mix-input {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.mix-input img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
}
.mix-input.empty img {
  opacity: 0.2;
  filter: grayscale(1);
}
.mix-input .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-soft);
  font-weight: 800;
  margin-top: 6px;
}
.mix-plus {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent);
}

/* Result area */
.mix-result {
  background: #fff;
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 240px;
}
.mix-result.ready { border-style: solid; border-color: var(--accent); }
.mix-result .placeholder {
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
  padding: 20px;
  font-weight: 600;
}
.mix-result img {
  width: 100%; height: 100%;
  object-fit: contain;
  animation: pop .4s ease-out;
}
@keyframes pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.mix-result .ai-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
}

/* Loading spinner */
.mix-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mix-loading .txt { font-size: 12px; color: var(--ink-soft); font-weight: 700; }

/* Style selector */
.style-selector { display: flex; flex-direction: column; gap: 8px; }
.style-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--ink-soft);
}
.style-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.style-opt {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  transition: all .15s;
  white-space: nowrap;
}
.style-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.style-opt.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(209, 91, 74, 0.25);
}

/* ChillHouse base style picker (3 thumbnails) */
.base-style-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.base-style-opt {
  flex: 0 0 auto;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
}
.base-style-opt img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft);
}
.base-style-opt span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.base-style-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.base-style-opt.active {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(209, 91, 74, 0.25);
  background: rgba(209, 91, 74, 0.06);
}
html.dark .base-style-opt { background: var(--bg-card); }
html.dark .base-style-opt.active { background: rgba(209, 91, 74, 0.14); }

/* Custom prompt */
.custom-prompt-wrap { display: flex; flex-direction: column; gap: 6px; }
.custom-prompt {
  width: 100%;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 44px;
  max-height: 120px;
  transition: border-color .15s;
}
.custom-prompt:focus { border-color: var(--accent); }
.custom-prompt::placeholder { color: var(--ink-soft); font-weight: 500; }

.generate-btn {
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  padding: 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: all .15s;
}
.generate-btn:hover:not(:disabled) { transform: translateY(-2px); background: #2a1e16; }
.generate-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ai-note {
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.5;
}
.ai-note strong { color: var(--ink); }
.ai-note code {
  background: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  border: 1px solid var(--line);
}

.name-suggestions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.name-chip {
  background: #fff;
  border: 2px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  transition: all .15s;
}
.name-chip:hover { border-color: var(--accent); }
.name-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.chosen-name {
  text-align: center;
  padding: 10px 20px;
}
.chosen-name .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); font-weight: 700; }
.chosen-name .val { font-size: 24px; font-weight: 900; color: var(--ink); line-height: 1.1; }
.chosen-name .sym { font-size: 12px; color: var(--accent); font-weight: 800; margin-top: 2px; }

/* Social links */
.social-links-section {
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.social-links-section h4 { font-size: 15px; margin-bottom: 12px; }
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) { .social-grid { grid-template-columns: 1fr; } }
.social-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.social-field input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  transition: border-color .2s;
}
.social-field input:focus { outline: none; border-color: var(--accent); }

.deploy-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: var(--shadow);
  transition: all .15s;
}
.deploy-btn:hover { background: var(--accent-dark); transform: translateY(-2px); }
.deploy-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 700;
  opacity: 0;
  transition: all .3s;
  pointer-events: none;
  z-index: 1000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Footer */
.footer {
  text-align: center;
  padding: 30px 0;
  color: var(--ink-soft);
  font-size: 13px;
  border-top: 1.5px dashed var(--line);
  margin-top: 40px;
}
.footer span { color: var(--accent); font-weight: 700; }

/* -------- Deploy overlay -------- */
.deploy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(59, 42, 31, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.deploy-step {
  background: var(--bg-card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.deploy-step h4 {
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}
.deploy-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
}
.ds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.ds-row strong { color: var(--ink); }
/* Two-line variant: span > small holds an explanatory hint under the label */
.ds-row-stack { align-items: flex-start; }
.ds-row-stack > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.ds-hint {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.3;
}
/* Editable name/symbol inputs inside the deploy summary */
.ds-edit {
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  box-sizing: border-box;
}
.ds-edit:focus { outline: none; border-color: var(--accent); }
.ds-edit-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.5px; text-transform: uppercase; }
.ds-edit-error { border-color: #d6453d; }
.ds-total {
  border-top: 2px solid var(--line);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 15px;
}
.ds-total strong { color: var(--accent); font-size: 16px; }
.deploy-cancel {
  background: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  transition: color .15s;
}
.deploy-cancel:hover { color: var(--accent); }
.deploy-hint {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  font-weight: 600;
}
.deposit-addr {
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  word-break: break-all;
  cursor: pointer;
  transition: all .15s;
}
.deposit-addr:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.deposit-qr {
  display: flex;
  justify-content: center;
}
.deposit-qr img {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
}
.deposit-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.deploy-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.dsl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}
.dsl-icon { font-size: 18px; }
.deploy-result {
  background: var(--green-soft);
  border: 2px solid var(--green);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mint-addr {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  word-break: break-all;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}
.deploy-err-msg {
  font-size: 13px;
  color: var(--accent);
  text-align: center;
  font-weight: 600;
  background: var(--accent-soft);
  padding: 14px;
  border-radius: 10px;
}

/* -------- Dark mode hardcoded-color overrides -------- */
html.dark .pick-card img,
html.dark .mix-input img { background: var(--bg-soft); }
html.dark .pick-card img { background: var(--bg); }
html.dark .upload-icon { background: var(--bg-soft); border-color: var(--line); }
html.dark .custom-preview-body input,
html.dark .custom-prompt,
html.dark .style-opt,
html.dark .name-chip,
html.dark .mix-input,
html.dark .mix-result,
html.dark .ai-note code { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
html.dark .search-wrap input,
html.dark .custom-preview-body input { color: var(--ink); }
html.dark .nav-cta { background: var(--accent) !important; color: #fff !important; }
html.dark .preview-panel { background: linear-gradient(180deg, var(--bg-soft) 0%, #1e1610 100%); }
html.dark .deploy-overlay { background: rgba(0, 0, 0, 0.7); }
html.dark .deposit-addr,
html.dark .deploy-summary,
html.dark .mint-addr { background: var(--bg-soft); color: var(--ink); }

/* ---- Real-time pump.fun Live Feed ---- */
.realtime-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.realtime-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ws-dot {
  font-size: 0.7rem;
  color: #999;
  transition: color 0.3s;
}
.ws-dot.connected {
  color: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.realtime-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .realtime-columns {
    grid-template-columns: 1fr;
  }
}

.rt-col {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.rt-col-header {
  padding: 0.6rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
}
.rt-new   { background: rgba(34, 197, 94, 0.08); color: #16a34a; }
.rt-soon  { background: rgba(251, 146, 60, 0.08); color: #ea580c; }
.rt-grad  { background: rgba(99, 102, 241, 0.08); color: #6366f1; }
html.dark .rt-new   { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
html.dark .rt-soon  { background: rgba(251, 146, 60, 0.12); color: #fb923c; }
html.dark .rt-grad  { background: rgba(99, 102, 241, 0.12); color: #818cf8; }

.rt-list {
  max-height: 480px;
  overflow-y: auto;
}
.rt-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.rt-item:last-child { border-bottom: none; }
.rt-item:hover { background: var(--hover-bg, rgba(0,0,0,0.03)); }
html.dark .rt-item:hover { background: rgba(255,255,255,0.04); }

.rt-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-soft);
}
.rt-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--ink-muted);
}
.rt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.rt-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rt-sym {
  font-size: 0.7rem;
  color: var(--ink-muted);
}
.rt-age {
  font-size: 0.7rem;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.rt-progress {
  width: 48px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.rt-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #fb923c, #ef4444);
  border-radius: 3px;
  transition: width 0.3s;
}
.rt-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
}
