section[id], #intro-title, #token h2 { scroll-margin-top: 6.75rem; }
.band, .sheet { position: relative; z-index: 2; }
.band { margin: 0.4rem 0 1.4rem; }
.sheet, .gate-card, .verse, .room, .link-slot, .link-live, .risk, .colophon, .tile, .poster-card, .sprite-grid figure {
  background: rgba(42, 22, 40, 0.74);
  color: #f6eadc;
  border: 1px solid rgba(246, 234, 220, 0.45);
  box-shadow: 0 0 18px rgba(198, 161, 187, 0.28), 0 10px 24px rgba(20, 8, 18, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(12, 6, 12, 0.45);
}
.sheet, .gate-card, .poster-card, .colophon {
  width: min(640px, calc(100vw - 48px - 220px));
  max-width: 640px;
  margin: 0.85rem 0 0.85rem 48px;
  padding: 1rem 1rem 1.1rem;
  overflow: hidden;
}
.sheet h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-style: italic;
  overflow-wrap: anywhere;
}
/* Cream-to-gold titles. No filter and no white chrome stripe:
   filter + background-clip:text was rendering as grey metal. */
.gate-card h1, .sheet h2 {
  color: #f0d6a0;
  -webkit-text-fill-color: #f0d6a0;
  text-shadow: none;
  filter: none;
  background-image: none;
  line-height: 1.08;
  padding-bottom: 0.06em;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .gate-card h1, .sheet h2 {
    background-image: linear-gradient(180deg, #fff8ee 0%, #f3ddb0 48%, #d49b4e 100%);
    background-size: 100% 100%;
    background-position: 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: none;
  }
}
.gate-card h1 { position: relative; }
.sprite-grid img { animation: bob 3.6s ease-in-out infinite; }
.sprite-grid figure:nth-child(2) img { animation-delay: .2s; }
.sprite-grid figure:nth-child(3) img { animation-delay: .4s; }
.sprite-grid figure:nth-child(4) img { animation-delay: .6s; }
.sprite-grid figure:nth-child(5) img { animation-delay: .8s; }
.sprite-grid figure:nth-child(6) img { animation-delay: 1s; }
.sprite-grid figure:nth-child(7) img { animation-delay: 1.2s; }
.sprite-grid { align-items: stretch; }
.sprite-grid figure {
  margin: 0;
  padding: 0.7rem 0.6rem 0.55rem;
  text-align: center;
  background: color-mix(in srgb, var(--dusk) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--pale) 72%, transparent);
  backdrop-filter: blur(8px);
}
.sprite-grid img { width: 64px; height: 64px; object-fit: contain; }
.sprite-grid figcaption { margin-top: 0.35rem; }
.sheet p, .verse p, .room p, .risk p { max-width: 100%; margin: 0.45rem 0; overflow-wrap: anywhere; }
.lede { font-size: 1.12rem; }
.kicker, .btn-ghost, .sheet a, .gate-card a { color: #f6eadc; }
.light, .dark, .ink { color: var(--pale); }
.split { display: grid; gap: 0.8rem; }
.split figure img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.portrait { aspect-ratio: 3 / 4; max-height: 280px; overflow: hidden; }
figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-top: 0.35rem;
}
.scroller {
  position: relative;
  margin: 0.35rem 0 0.8rem 48px;
  width: min(860px, calc(100vw - 48px - 220px));
}
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding: 0.35rem 0 0.55rem;
  margin: 0;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent);
}
.rail > * {
  flex: 0 0 260px;
  scroll-snap-align: start;
  min-width: 0;
  box-sizing: border-box;
}
.rail-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.25rem;
  position: relative;
  z-index: 3;
}
.rail-btn {
  position: static;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 1px solid rgba(246, 234, 220, 0.55);
  background: rgba(42, 22, 40, 0.82);
  color: #f6eadc;
  cursor: pointer;
  text-shadow: none;
}
.drag-hint {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f6eadc;
}
.verse, .room { padding: 0.85rem 0.9rem; }
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0.35rem 0 0.8rem 48px;
  width: min(860px, calc(100vw - 48px - 220px));
}
.links-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.links-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.link-live, .link-slot {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  text-decoration: none;
  min-width: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.link-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.link-live strong, .link-slot strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.link-handle {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.35;
  color: #f3ddb0;
  overflow-wrap: anywhere;
}
.link-live small, .link-slot small {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.link-arrow {
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--gold);
}
.link-live:hover, .link-live:focus-visible {
  border-color: rgba(243, 221, 176, 0.9);
  box-shadow: 0 0 22px rgba(212, 155, 78, 0.5), 0 0 0 1px rgba(243, 221, 176, 0.55);
}
.verse h3, .room h3 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.marquee {
  position: relative;
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  overflow: hidden;
  white-space: nowrap;
  margin: 0.8rem 0 0;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.4rem;
  z-index: 1;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, rgba(42, 22, 40, 0.95), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, rgba(42, 22, 40, 0.95), transparent); }
.band-run {
  display: inline-flex;
  width: max-content;
  animation: drift 28s linear infinite;
}
.band-run span { flex: 0 0 auto; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .band-run { animation: none !important; transform: none; }
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0.7rem 0;
}
.stat { padding: 0.55rem 0.6rem; min-width: 0; }
.stat span {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.stat b { display: block; font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; }
.contract {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.6rem 0;
  max-width: 100%;
}
.contract code {
  flex: 1 1 8rem;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-frame {
  margin: 0.7rem 0 0.4rem;
  border: 3px solid #4a2a40;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(16, 8, 16, 0.9);
  color: #f6eadc;
}
.chart-frame iframe {
  width: 100%;
  height: 250px;
  border: 0;
  display: block;
  background: #f6eadc;
}
.chart-frame iframe[hidden],
.chart-frame iframe:not([src]) { display: none; }
.chart-fallback {
  margin: 0;
  padding: 0.9rem 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.chart-fallback p { margin: 0.35rem 0; }
.feed, .facts { font-family: var(--mono); font-size: 0.78rem; overflow-wrap: anywhere; }
.facts { padding-left: 1.1rem; }
.risk { padding: 0.75rem 0.8rem; margin-top: 0.8rem; }
.risk strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.colophon {
  position: relative;
  z-index: 2;
  margin: 1rem 0 7rem 48px;
  padding: 0.9rem 1rem;
}
.sprite-grid, .room-grid {
  gap: 12px;
  margin: 0.4rem 0 1rem 48px;
  width: min(720px, calc(100vw - 48px - 220px));
}
.sprite-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}
.sprite-grid > figure {
  flex: 0 0 calc((100% - 72px) / 7);
  max-width: calc((100% - 72px) / 7);
  box-sizing: border-box;
}
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.chart-frame, .chart-frame iframe { width: 100%; max-width: 100%; min-width: 0; }
@media (min-width: 761px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.colophon p { margin: 0.35rem 0; font-size: 0.92rem; }
.noscript { position: relative; z-index: 2; margin: 1rem; }

.poster-card {
  display: block;
  width: min(340px, calc(100vw - 48px - 220px));
  padding: 0.45rem 0.45rem 0.7rem;
}
.poster-card img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.poster-card figcaption {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0.55rem 0.2rem 0.15rem;
}
.stat {
  background: rgba(16, 8, 16, 0.9);
  color: #f6eadc;
  border: 1px solid rgba(246, 234, 220, 0.28);
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: none;
}
@media (max-width: 760px) {
  .sheet, .gate-card, .poster-card, .colophon, .sprite-grid, .room-grid {
    margin-left: 12px;
    width: calc(100% - 24px);
    max-width: none;
  }
  .sprite-grid > figure {
    flex: 0 0 calc((100% - 36px) / 4);
    max-width: calc((100% - 36px) / 4);
  }
  .scroller, .links-grid { margin-left: 12px; width: calc(100% - 24px); }
  .links-grid, .links-grid[data-count="2"], .links-grid[data-count="3"] {
    grid-template-columns: 1fr;
  }
  .poster-card { grid-template-columns: 120px minmax(0, 1fr); }
  .poster-card img { width: 120px; height: 168px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet, .verse, .tile, .room, .gate-card { position: relative; overflow: hidden; }
  .sheet::after, .verse::after, .tile::after, .room::after, .gate-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 246, 220, 0.28) 50%, transparent 58%);
    transform: translateX(-130%);
    pointer-events: none;
  }
  .sheet:hover::after, .verse:hover::after, .tile:hover::after, .room:hover::after, .gate-card:hover::after {
    transform: translateX(130%);
    transition: transform 0.7s ease;
  }
}
@media (max-width: 760px) {
  .chart-frame iframe { height: 200px; }
  .colophon { margin-bottom: 6.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .rise {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    transition-delay: var(--d, 0ms);
  }
  .js .rise.is-in { opacity: 1; transform: none; }
}
