/* ============================================================================
   Discover — live launch rail + coin grid. Uses the app.css theme tokens.
   ========================================================================== */
.dv-page { max-width: 1240px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 80px; }
.dv-head { margin-bottom: 20px; }
.dv-head .lx-sub b { color: var(--muted); font-weight: 600; }
.dv-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }

/* ---- rail ---- */
.dv-rail {
  position: sticky; top: 76px; display: flex; flex-direction: column;
  height: calc(100vh - 100px); border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg-2); overflow: hidden;
}
.dv-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dv-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.dv-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: dv-pulse 1.6s ease-in-out infinite; }
.dv-rail.is-paused .dv-live-dot { animation: none; background: var(--faint); box-shadow: none; }
@keyframes dv-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.dv-pause { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-2); font-size: 12px; font-weight: 700; color: var(--muted); }
.dv-pause:hover { color: var(--text); border-color: var(--accent); }
.dv-rail-tabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.dv-tab { flex: 1; height: 30px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.dv-tab.active { background: var(--bg-elev); color: var(--text); box-shadow: 0 0 0 1px var(--border-2) inset; }
.dv-chips { display: flex; gap: 6px; padding: 8px 10px; }
.dv-chips.hidden { display: none; }
.dv-chip { height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--faint); border: 1px solid var(--border); }
.dv-chip.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.dv-rail-list { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.dv-rail-list::-webkit-scrollbar { width: 8px; }
.dv-rail-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.dv-empty { color: var(--faint); font-size: 13px; padding: 20px 10px; text-align: center; }

.dv-row {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
  color: var(--text); text-decoration: none; transition: background .12s ease;
}
.dv-row:hover { background: var(--hover); }
.dv-row.dv-new { animation: dv-flash 1.6s ease-out; }
@keyframes dv-flash { 0% { background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent) inset; } 100% { background: transparent; box-shadow: none; } }
.dv-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; background: var(--bg-elev); border: 1px solid var(--border); }
.dv-logo-ph { display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.dv-row-main { flex: 1; min-width: 0; }
.dv-row-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dv-sym { font-weight: 800; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.dv-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.dv-age { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.dv-row-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-row-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: var(--faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.dv-row-meta .dv-mcap { color: var(--text); font-weight: 700; }
.dv-grad { color: var(--accent); }
.dv-side { flex: 0 0 auto; width: 44px; text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 0; border-radius: 6px; }
.dv-side-buy { color: #14F195; background: rgba(20,241,149,.12); }
.dv-side-sell { color: #ff5a5f; background: rgba(255,90,95,.12); }
.dv-side-swap { color: var(--muted); background: var(--bg-elev); }

/* ---- grid ---- */
.dv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.dv-input { height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg-input); color: var(--text); font-size: 13.5px; outline: none; }
.dv-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.dv-search { width: 240px; }
.dv-seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg-2); }
.dv-seg button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.dv-seg button.active { background: var(--bg-elev); color: var(--text); box-shadow: 0 0 0 1px var(--border-2) inset; }
.dv-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dv-empty-wide { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); }
.dv-card { display: block; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg-2); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .12s ease; }
.dv-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.dv-card-top { display: flex; align-items: center; gap: 10px; }
.dv-card-id { flex: 1; min-width: 0; }
.dv-card-num { text-align: right; flex: 0 0 auto; }
.dv-card-num .dv-mcap { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.dv-price { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.dv-bar { height: 4px; border-radius: 999px; background: var(--bg-elev); overflow: hidden; margin-top: 12px; }
.dv-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.dv-card-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 8px; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .dv-layout { grid-template-columns: 1fr; }
  .dv-rail { position: static; height: 60vh; }
}

/* ---------------- launch-page variant: full-height left rail + copy rows ---------------- */
.dv-rail-launch {
  position: sticky; top: 60px; height: calc(100vh - 60px);
  border: none; border-right: 1px solid var(--border); border-radius: 0; background: var(--bg-2);
}
.dv-rail-sub { padding: 0 12px 8px; font-size: 11.5px; color: var(--faint); }
.dv-rail-sub b { color: var(--muted); font-weight: 700; }
.dv-row-copy { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.dv-row-copy:hover { background: var(--hover); }
.dv-row-copy.dv-new { animation: dv-flash 1.6s ease-out; }
.dv-row-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.dv-copy {
  flex: 0 0 auto; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--accent); border: 1px solid var(--accent-dim); background: transparent; transition: all .12s ease;
}
.dv-copy:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) {
  .dv-rail-launch { position: static; height: 58vh; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ---------------- paste-a-CA import ---------------- */
.dv-import { display: flex; gap: 6px; padding: 2px 10px 8px; }
.dv-import-input {
  flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text);
  font-size: 12.5px; outline: none;
}
.dv-import-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.dv-import-input::placeholder { color: var(--faint); }
.dv-import-btn { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: var(--accent-ink); background: var(--accent); }
.dv-import-btn:hover:not(:disabled) { background: var(--accent-2); }
.dv-import-btn:disabled { opacity: .6; }
.dv-import-status { padding: 0 12px 8px; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.dv-import-status.is-err { color: var(--danger); }
.dv-import-status.hidden { display: none; }

/* ---- rail mode segment (Launches / Top deployers) ---- */
.dv-modes { display: flex; gap: 6px; padding: 8px 10px 0; }
.dv-mode { flex: 1; height: 30px; border-radius: 9px; font-size: 12.5px; font-weight: 800; color: var(--muted); border: 1px solid var(--border); background: var(--bg-elev); }
.dv-mode:hover { color: var(--text); border-color: var(--border-2); }
.dv-mode.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---- deployer action tag on a rail card ---- */
.dv-dep { font-weight: 800; letter-spacing: .01em; padding: 0 6px; height: 15px; display: inline-flex; align-items: center; border-radius: 5px; font-size: 10px; text-transform: uppercase; border: none; cursor: pointer; }
.dv-dep-launch { color: var(--accent-ink); background: var(--accent); }
.dv-dep-buy { color: var(--text); background: var(--bg-elev); box-shadow: 0 0 0 1px var(--border-2) inset; }
.dv-dep:hover { filter: brightness(1.12); text-decoration: underline; }

/* ---- wallet drill-down drawer ---- */
.wd { width: min(720px, 92vw); max-height: 82vh; display: flex; flex-direction: column; }
.wd-head { padding: 4px 4px 12px; border-bottom: 1px solid var(--border); }
.wd-title { font-size: 18px; font-weight: 800; }
.wd-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
.wd-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.wd-body { overflow: hidden; padding-top: 12px; display: flex; min-height: 200px; }
.wd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; min-height: 0; }
.wd-col { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.wd-col-head { padding: 10px 12px; font-size: 13px; font-weight: 800; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.wd-count { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--hover-faint, var(--bg-elev)); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; }
.wd-list { overflow-y: auto; max-height: 56vh; }
.wd-empty { color: var(--faint); font-size: 13px; padding: 20px 12px; text-align: center; }
.wd-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); }
.wd-col .wd-list .wd-row:first-child { border-top: none; }
.wd-row:hover { background: var(--hover); }
.wd-row-link { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.wd-row-main { min-width: 0; flex: 1; }
.wd-row-top { display: flex; align-items: center; gap: 6px; }
.wd-row-top .wd-right { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); white-space: nowrap; }
.wd-amt { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.wd-badge { font-size: 10px; }
@media (max-width: 620px) { .wd-cols { grid-template-columns: 1fr; } .wd-list { max-height: 34vh; } }

/* ---- copy-contract-address icon next to a ticker ---- */
.dv-ca-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; margin-left: 1px; border: none; background: transparent;
  color: var(--faint); cursor: pointer; border-radius: 5px; line-height: 0;
  vertical-align: middle; flex: none;
}
.dv-ca-btn:hover { color: var(--text); background: var(--hover); }
.dv-ca-btn.copied { color: var(--accent); }
