/* Fixes on top of production CSS bundles */

/* Later bundle hides theme toggle — restore it */
.theme-toggle {
  display: inline-flex !important;
}

:root {
  --green: #57f3a7;
}

/* Hero intro layout (final frame — see intro-final.css for settled bubble) */
#hero-intro .intro-stage {
  height: auto;
  min-height: 130px;
  margin-bottom: 24px;
}

#hero-intro .intro-stage.intro-static .wordmark,
#hero-intro .intro-stage.phase-final .wordmark {
  max-height: 80px;
  opacity: 1;
}

#hero-intro .intro-stage.intro-static .wordmark .wm,
#hero-intro .intro-stage.phase-final .wordmark .wm {
  transform: none;
  opacity: 1;
}

#hero-intro .intro-stage.intro-static .by-label,
#hero-intro .intro-stage.phase-final .by-label {
  max-width: 240px;
  opacity: 1;
}

#hero-intro .intro-stage.intro-static .by-label .bc,
#hero-intro .intro-stage.phase-final .by-label .bc {
  opacity: 1;
  transform: none;
}

#hero-intro .intro-stage.intro-static .pill-row,
#hero-intro .intro-stage.phase-final .pill-row {
  gap: 14px;
}

.tag-cluster {
  pointer-events: auto;
}

.tag-cluster .cc-tag-link {
  pointer-events: auto;
}

.post-media img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 8px;
}

.comm-card .img {
  display: flex;
  align-items: center;
  justify-content: center;
}

.comm-card .img img,
.comm-card .img .tok-fallback {
  border-radius: 9999px;
}

.feed-cta .btn {
  min-width: 110px;
}

/* Home feed stories — cc-08eaf (community bundle) adds dashed “add story” avatar styles globally */
body.state-lo .stories .story-ring .avatar {
  border: none;
  background: var(--paper-2);
  display: block;
}

body.state-lo .stories .story-ring .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* /communities grid: show full coin art (no hover zoom / cover crop) */
.cc-card .img {
  background: var(--paper-2);
}

.cc-card .img > .img,
.cc-card .img > span.img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
}

.cc-card .img > .img img,
.cc-card .img > span.img img,
.cc-card .img img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
  object-fit: contain !important;
  object-position: center;
  transform: none !important;
}

.cc-card:hover .img img {
  transform: none !important;
}

.cc-card .img .tok-fallback {
  aspect-ratio: unset;
  border-radius: 14px;
}

.ex-status {
  grid-column: 1 / -1;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Explore page: production hides main until body.state-explore */
body.state-explore main.view-explore {
  display: block;
}

/* Community detail: same pattern as explore */
body.state-detail main.view-detail {
  display: block;
}

main.view-detail {
  min-height: calc(100vh - 120px);
  padding-bottom: 48px;
}

.detail-side .ds-header .img img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: contain;
  object-position: center;
  background: var(--paper-2);
}

main.view-explore {
  min-height: calc(100vh - 120px);
  padding-bottom: 48px;
}

.docs {
  min-height: calc(100vh - 120px);
}

.doc-prose pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.doc-prose pre code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

/* Logged-out home: don’t clip feed below hero */
body.state-lo .lo-wrap {
  max-height: none;
  overflow: visible;
}

.comm-card > .img img,
.comm-card > span.img img {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  object-fit: cover;
}

.msg-media-frame {
  display: block;
  margin-top: 8px;
}

.msg-media-frame .msg-media {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
}

/* Feed column width like production */
@media (min-width: 900px) {
  .feed-page {
    grid-template-columns: 1fr minmax(0, 640px) 1fr;
  }
}

body.cc-auth-modal-open,
body.cc-welcome-open {
  overflow: hidden;
}

.welcome-overlay dialog.welcome-modal {
  position: relative;
  display: block;
  width: min(520px, calc(100% - 40px));
  max-width: 520px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.welcome-overlay dialog.welcome-modal::backdrop {
  display: none;
}

.welcome-overlay .intro-stage.intro-static {
  margin: 0 auto;
}

.cc-footer__popover[hidden] {
  display: none !important;
}

/* Feed copy uses Geist (body), not Syncopate (display) — guards swapped @font-face */
#feed-posts .post-body,
#feed-posts .post-body .ln,
#feed-posts .post-head .nm,
#feed-posts .post-head .hd,
#feed-posts .post-head .ago,
#feed-posts .comm-card .ttl,
#feed-posts .comm-card .sub,
#feed-posts .comm-card .stat .v,
#feed-posts .comm-card .stat .l {
  font-family: var(--font-geist, 'Geist', 'Geist Fallback'), -apple-system, 'Segoe UI', system-ui, sans-serif;
  text-transform: none;
}

#community-feed .dm-post > p.body,
#community-feed .dm-post .body,
#community-feed .dm-post .body .ln,
#community-feed .dm-post header.head .nm,
#community-feed .dm-post .head .nm,
#community-feed .dm-post header.head .hd,
#community-feed .dm-post .head .hd,
#community-feed .dm-post header.head .ago,
#community-feed .dm-post .head .ago {
  font-family: var(--font-geist, 'Geist', 'Geist Fallback'), -apple-system, 'Segoe UI', system-ui, sans-serif;
  text-transform: none;
}

#community-feed .dm-post > p.body {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}

#community-feed .dm-post .dm-pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

#community-feed .dm-post .dm-pin svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

#community-feed .dm-post .nm-row .dev-chip {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.ds-chart .delta.dn {
  color: var(--negative);
}

/* Native <dialog> reset — keep production border + sizing from .jit-modal */
.drawer-overlay dialog.jit-modal {
  position: relative;
  display: block;
  align-self: center;
  width: min(520px, calc(100% - 40px));
  max-width: 520px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    0 24px 64px -16px rgba(19, 19, 18, 0.28),
    0 8px 20px rgba(19, 19, 18, 0.12);
  overflow: hidden;
  outline: none;
}

.drawer-overlay dialog.jit-modal:focus,
.drawer-overlay dialog.jit-modal:focus-visible {
  outline: none;
}

.drawer-overlay dialog.jit-modal::backdrop {
  display: none;
}

.drawer-overlay .jit-modal .jm-head h3 {
  margin: 10px 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: var(--t-display);
  text-transform: lowercase;
}

.drawer-overlay .jit-modal .jm-head h3 em {
  display: block;
  font-style: normal;
  color: var(--orange);
}

.drawer-overlay .jit-modal .jm-sub {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}

.drawer-overlay .jit-modal .jm-step .lab {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: -0.01em;
}

.drawer-overlay .jit-modal .jm-step .desc {
  font-family: var(--font-body);
  text-transform: none;
}

.drawer-overlay .jit-modal .twitter-btn.wallet-btn span[aria-hidden='true'] {
  font-size: 13px;
  line-height: 1;
}
