/* ============================================================
   seven.fun — shared stylesheet (feed + coin detail)
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #000;
  --surface: #0d0e0f;
  --surface-raised: #121314;
  --surface-hover: #151719;
  --line: #24272a;
  --line-soft: #1b1e20;
  --line-strong: #32363a;
  --text: #eff3f4;
  --soft: #a8aeb3;
  --muted: #777e84;
  --white: #f0f3f4;
  --gold: #d6c46a;
  --gold-dim: rgba(214, 196, 106, 0.22);

  --shell-pad: 24px;
  --pill: 999px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 19px; font-weight: 700; letter-spacing: -0.5px; }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
small { font-size: 13px; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; color: inherit; font: inherit; background: none; }
button:disabled { cursor: not-allowed; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

:where(button, a):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* display: grid/flex on a panel would otherwise beat the UA hidden rule */
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.accent { color: var(--gold); }
.inline { display: inline-flex; align-items: center; gap: 6px; }

/* ── shell ─────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.ambient-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px var(--shell-pad);
}

.corner-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.35px;
  transition: opacity 0.15s;
}
.corner-brand:hover { opacity: 0.72; }
.corner-brand svg { width: 17px; height: 19px; display: block; }

.corner-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── controls ──────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 17px;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.1px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  transition: background 0.15s, border-color 0.15s;
}
.button:hover { background: var(--surface-hover); border-color: var(--line-strong); }

.button.sign-in { padding-left: 15px; }

.button.block {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
}
.button.disabled-look {
  background: #3b3f43;
  border-color: #3b3f43;
  color: #d3d8db;
  opacity: 1;
}
.button.disabled-look:hover { background: #3b3f43; border-color: #3b3f43; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: inherit;
  transition: background 0.15s, color 0.15s;
}
.icon-button:hover { background: #202326; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  white-space: nowrap;
}

/* the 7 mark in a disc */
.coin {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #2b2f33, #121415 62%, #08090a);
  box-shadow: inset 0 0 0 1px #2e3338, 0 2px 8px rgba(0, 0, 0, 0.5);
  color: var(--white);
}
.coin svg { width: 17px; height: 19px; display: block; }

.coin-lg { width: 60px; height: 60px; }
.coin-lg svg { width: 26px; height: 29px; }

/* ── main ──────────────────────────────────────────────────── */

.main-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 var(--shell-pad) 48px;
}

/* ── feed ──────────────────────────────────────────────────── */

.feed-surface { align-items: flex-start; }

.launch-feed {
  width: 100%;
  max-width: 720px;
  padding-top: 58px;
}

.browse-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.browse-tabs [role="tab"] {
  min-height: 40px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--pill);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.browse-tabs [role="tab"]:hover { background: var(--surface-hover); }
.browse-tabs [role="tab"].selected {
  background: var(--white);
  border-color: var(--white);
  color: #0a0b0c;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.create-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 156px;
  font-size: 13.5px;
  color: var(--soft);
}
.create-card:hover { background: var(--surface-raised); border-color: var(--line-strong); }
.create-card svg { color: var(--soft); }

.launch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 156px;
  padding: 18px;
  border-color: var(--gold-dim);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(214, 196, 106, 0.05), transparent 60%),
    var(--surface);
}
.launch-card:hover {
  border-color: rgba(214, 196, 106, 0.4);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(214, 196, 106, 0.08), transparent 60%),
    var(--surface-raised);
}

.launch-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.launch-id { flex: 1; min-width: 0; }
.launch-id h2 { font-size: 14.5px; }
.launch-id small { display: block; font-size: 12.5px; }

.launch-amount {
  text-align: right;
  flex-shrink: 0;
}
.launch-amount strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.launch-amount small { font-size: 11.5px; }

.launch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
}

/* stretched link — covers the whole card, sits beneath the CA chip */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/* click-to-copy CA chip on the feed card */
.ca-chip {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.025);
  color: var(--soft);
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ca-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
  color: var(--text);
}

.ca-tag {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.ca-chip .ca-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: 0.1px;
}

.ca-chip svg { flex-shrink: 0; }

.empty-note {
  grid-column: 1 / -1;
  padding: 44px 0;
  text-align: center;
  font-size: 14px;
}

/* ── progress ──────────────────────────────────────────────── */

.progress {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: var(--pill);
  background: #26292c;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--white);
}

.progress.gold .progress-fill {
  background: linear-gradient(90deg, #b9a64f, var(--gold));
  box-shadow: 0 0 10px rgba(214, 196, 106, 0.4);
}

/* ── detail page ───────────────────────────────────────────── */

.detail-surface { align-items: flex-start; }

.detail-wrap {
  width: 100%;
  max-width: 996px;
  padding-top: 46px;
}

.back-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.back-row .icon-button { margin-left: -7px; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 303px;
  gap: 54px;
  align-items: start;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.token-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.token-id { flex: 1; min-width: 0; }
.token-id h2 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.token-id h2 small { font-size: 13.5px; font-weight: 500; }

.token-by {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 13.5px;
}
.token-by a { transition: color 0.15s; }
.token-by a:hover { color: var(--text); }

.token-desc { font-size: 15px; color: var(--text); }

.raise-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
}

.raise-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.raise-amount strong {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.1;
}
.raise-amount span { font-size: 15px; }

.raise-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

/* the contract address banner — the whole row copies on click */
.ca-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 17px 13px 17px 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.ca-banner:hover { border-color: var(--line-strong); background: var(--surface-raised); }

.ca-action {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--soft);
  transition: background 0.15s, color 0.15s;
}
.ca-banner:hover .ca-action { background: #202326; color: var(--text); }

.ca-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--soft);
}

.ca-banner .ca-value {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  letter-spacing: 0.1px;
  color: var(--text);
  word-break: break-all;
}

/* copied state, shared by the feed chip and the coin banner */
[data-ca-copy] .i-check { display: none; }
[data-ca-copy].copied { color: #2fd67a; border-color: rgba(47, 214, 122, 0.45); }
[data-ca-copy].copied .i-copy { display: none; }
[data-ca-copy].copied .i-check { display: block; }
[data-ca-copy].copied .ca-tag,
[data-ca-copy].copied .ca-action { color: inherit; }

/* committed list */
.committed h3 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 17px;
  margin-bottom: 6px;
}
.committed .count { font-size: 13px; font-weight: 500; }

.committed-list {
  max-height: 352px;
  margin: 0;
  padding: 0 14px 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #33383c transparent;
}
.committed-list::-webkit-scrollbar { width: 8px; }
.committed-list::-webkit-scrollbar-track { background: #141617; border-radius: 4px; }
.committed-list::-webkit-scrollbar-thumb { background: #3a3f43; border-radius: 4px; }

.committed-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.committed-list li:last-child { border-bottom: 0; }

.committed-list img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.committed-list .who {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
}
.committed-list .who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.committed-list .verified { color: #1d9bf0; flex-shrink: 0; }
.committed-list .amount { font-size: 13.5px; flex-shrink: 0; }

/* ── right column ──────────────────────────────────────────── */

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.side-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface-raised);
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
}
.kv > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}
.kv dt { font-size: 13.5px; }
.kv dd { margin: 0; font-size: 13.5px; font-weight: 700; text-align: right; }

.details h3 { margin-bottom: 8px; font-size: 15px; }

.footnote {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  font-size: 12px;
}

/* ── footer ────────────────────────────────────────────────── */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 22px var(--shell-pad) 28px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { transition: color 0.15s; }
.site-footer a:hover { color: var(--text); }

/* ── responsive ────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .detail-side { max-width: 420px; }
}

@media (max-width: 620px) {
  :root { --shell-pad: 16px; }

  .launch-feed { padding-top: 34px; }
  .detail-wrap { padding-top: 28px; }

  .browse-tabs { gap: 10px; }
  .card-grid { grid-template-columns: 1fr; }

  .corner-brand span { font-size: 15px; }

  .token-head { flex-wrap: wrap; }
  .token-head .chip { order: 3; }
  .raise-amount strong { font-size: 30px; }

  .ca-banner { padding: 15px 10px 15px 15px; gap: 10px; }
  .ca-banner .ca-value { font-size: 12.5px; }

  .detail-side { max-width: none; }
}

@media (max-width: 400px) {
  .button.sign-in span { display: none; }
  .button.sign-in { padding: 8px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
