/* Tales of Puffs — brand overrides on 1:1 clone base */
@import url("https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&display=swap");

:root {
  --pixel: "Pixelify Sans", "Courier New", monospace;
  --puff-lime: #ccff00;
}

.brand-blob img,
.brand-puff img {
  image-rendering: pixelated;
  border: 2px solid var(--ink);
  background: var(--puff-lime);
  border-radius: 2px;
}

.social-link {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  justify-self: end;
}

/* CA Coming Soon → Robinhood Chain strip */
.ca-chain-banner {
  z-index: 30;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--puff-lime);
  color: #14161c;
  border-bottom: 2px solid var(--ink);
  font-family: var(--pixel);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ca-chain-banner .pill {
  background: #14161c;
  color: var(--puff-lime);
  padding: 3px 10px;
  border-radius: 2px;
}

.ca-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: #14161c;
  color: var(--puff-lime);
  padding: 3px 10px;
  border-radius: 2px;
  font: inherit;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
}

.ca-copy .ca-short {
  display: none;
}

.ca-copy-label {
  color: #14161c;
  background: var(--puff-lime);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

@media (max-width: 760px) {
  .ca-copy .ca-full {
    display: none;
  }

  .ca-copy .ca-short {
    display: inline;
  }
}

body.has-ca-banner .site-header {
  top: 38px;
}

body.has-ca-banner .opening-title {
  top: 38px;
}

body.has-ca-banner .hero {
  padding-top: 38px;
}

body.has-ca-banner .atlas-page-header {
  top: 38px;
}

.final-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.final-meta .chain-badge,
.final-meta .ca-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  padding: 10px 14px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--paper);
  box-shadow: 4px 4px #20263833;
}

.final-meta .ca-badge {
  background: var(--puff-lime);
  appearance: none;
  cursor: pointer;
  text-transform: none;
  word-break: break-all;
  color: inherit;
}

.final-meta .chain-badge {
  background: #1a1f2b;
  color: var(--puff-lime);
  border-color: #0c0f17;
}

/* Hide any non-X social if present */
.social-discord,
.social-telegram,
.social-link[href*="discord"],
.social-link[href*="t.me"],
.social-link[href*="telegram"],
.social-link[href*="instagram"],
.social-link[href*="youtube"] {
  display: none !important;
}

/* Layout glue for static clone (matches original component structure) */
.origin-browser {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  border: 1px solid #735936;
  border-radius: 2px;
  background: #fff9e8e6;
  outline: 5px solid #a27b3d1f;
  box-shadow: 0 20px 46px #3f2d1933;
  margin-top: 72px;
  min-height: 560px;
  overflow: hidden;
}

.origin-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-width: 0;
}

.origin-portrait {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 420px;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent, #80b8ff) 18%, white) 0 28%, transparent 58%),
    linear-gradient(180deg, #e7eff0 0 68%, #d3c19b 68% 100%);
  border-right: 1px solid #73593655;
}

.origin-portrait img {
  width: min(280px, 70%);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(4px 8px #20263833);
}

.origin-trait-label {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  color: #526075;
  white-space: nowrap;
}

.origin-copy {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.origin-copy blockquote {
  margin: 0 0 18px;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  color: #3a465a;
}

.origin-lore {
  color: #526075;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

.origin-controls button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.origin-tabs button i {
  font-style: normal;
  font-size: 11px;
  opacity: 0.7;
  justify-self: end;
}

.dungeon-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.dungeon-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dungeon-media .map-label,
.map-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #14161ce6;
  color: #f5efd9;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 6px 10px;
  text-transform: uppercase;
}

.dungeon-body {
  padding: 22px 20px 24px;
  color: #d9e0ea;
}

.dungeon-body h3 {
  margin: 0 0 6px;
  color: #fff9e9;
  font-size: 24px;
}

.dungeon-type {
  color: var(--dungeon-accent, #e9be5e);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 12px;
}

.field-note {
  margin-top: 14px;
  color: #9aa6b8;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.roadmap-status {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-deep);
  margin: 18px 0 8px;
}

.roadmap-waypoint {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  margin: 0 auto;
  background: var(--paper);
}

.roadmap-waypoint img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.roadmap-waypoint span {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.roadmap-stage {
  text-align: center;
}

.roadmap-stage h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.roadmap-stage p:last-child {
  color: #526075;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.journey-number {
  display: block;
  font-family: var(--pixel);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  color: #7d6c4d;
}

.journey-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}

.journey-grid h3 {
  margin: 22px 0 12px;
  font-size: 28px;
}

.journey-grid p {
  color: #526075;
  margin: 0;
  line-height: 1.55;
}

.site-footer {
  width: min(1240px, 100% - 64px);
  margin: 0 auto;
  padding: 48px 0 100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  border: 2px solid var(--ink);
  background: #ccff00;
}

.footer-brand strong {
  letter-spacing: 0.08em;
  display: block;
}

.footer-brand p {
  margin: 2px 0 0;
  color: #526075;
  font-size: 14px;
}

.footer-copy {
  text-align: center;
  color: #526075;
  font-size: 13px;
  margin: 0;
}

.site-footer .social-link {
  justify-self: end;
}

.soundtrack-dock {
  z-index: 90;
  opacity: 1;
  position: fixed;
  bottom: 16px;
  right: 18px;
}

.soundtrack-dock .soundtrack-toggle span > strong,
.soundtrack-dock .soundtrack-toggle span > small {
  display: block;
  line-height: 1.2;
}

.soundtrack-dock .soundtrack-toggle span > small {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 2px;
}

footer .social-link {
  justify-self: end;
}

footer > span {
  justify-self: end;
}

/* Ensure origin browser 3-zone layout when panel is nested */
.origin-browser {
  grid-template-columns: 220px 1fr;
}

.origin-panel {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-width: 0;
  height: 100%;
}

/* Opening complete state */
.opening-title[data-opening-state="complete"],
.opening-title[data-opening-state="skip"],
.opening-title[aria-hidden="true"][data-opening-state="complete"] {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

/* CA banner offset for absolute header */
body.has-ca-banner .site-header {
  top: 38px;
}

body.has-ca-banner .hero {
  padding-top: 198px;
}

body.has-ca-banner .atlas-page {
  padding-top: 38px;
}

.quote-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.quote-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-size: 18px;
}

.atlas-kicker {
  text-align: center;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  color: #5c4828;
}

/* One step smaller than the clone default */
.hero h1 {
  font-size: clamp(48px, 3.6vw, 58px);
  line-height: 0.96;
}

@media (max-width: 760px) {
  .hero h1 {
    font-size: clamp(36px, 10vw, 51px);
    line-height: 0.98;
  }
}

.atlas-back {
  justify-self: end;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

.atlas-page-body {
  position: relative;
  z-index: 1;
  height: calc(100dvh - 130px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.atlas-page-title {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  width: min(720px, 92vw);
}

.atlas-page-title p:first-child {
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #5c4828;
}

.atlas-page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
}

.atlas-lead {
  margin: 10px 0 0;
  color: #5c4828;
}

.atlas-map.map-stage {
  position: relative;
  top: auto;
  right: auto;
  width: min(90vw, 1100px);
}

.final-blob img {
  width: 120px;
  height: auto;
  image-rendering: pixelated;
}

@media (max-width: 980px) {
  .origin-browser,
  .origin-panel {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .site-footer .social-link {
    justify-self: center;
  }

  .dungeon-grid,
  .journey-grid,
  .roadmap-track {
    grid-template-columns: 1fr !important;
  }

  .map-stage {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    margin-top: 40px;
  }

  .hero-copy {
    width: 100% !important;
  }
}
