/* pog wiki — dark iridescent pixel system.
   Motion personality: PHYSICAL (spring-snappy entries, spring-smooth state,
   ease-snap hover). Three curves total. All reveals translateY(24px),
   stagger 80ms, hover lift -2px. */

:root {
  --bg: #0d0d12;            /* charcoal */
  --bg-green: #0e1411;      /* deep forest tint (section alternation) */
  --panel: #14141c;
  --panel-2: #191924;
  --line: #26232f;
  --ink: #ece9f1;
  --muted: #9a96a8;
  --dim: #676279;
  --green: #4a9d6b;         /* pre-hardmode */
  --sky: #6fa8e3;           /* hardmode */
  --purple: #9b7bff;        /* post-plantera / primary accent */
  --teal: #4ecdc4;
  --gold: #e8c15a;          /* endgame */
  --blood: #c4504f;
  --holo: linear-gradient(120deg, var(--purple), var(--teal) 38%, var(--gold) 72%, var(--sky));

  --spring-snappy: linear(
    0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%,
    1.067 22.5%, 1.089 26%, 1.079 30.3%, 1.049 36%, 1.024 42.6%, 1.011 50.3%,
    1.004 59.2%, 1.001 69.3%, 1);
  --spring-smooth: linear(
    0, 0.004, 0.016 2.3%, 0.063 4.7%, 0.141 7.2%, 0.25 9.9%, 0.601 16.5%,
    0.815 21%, 0.929 25.2%, 0.987 29%, 1.025 33.5%, 1.042 38%, 1.04 43.5%,
    1.027 50%, 1.013 57.5%, 1.005 67%, 1.001 79%, 1);
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);

  --px: 3px;                /* the pixel unit for chunky details */
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 Inter, system-ui, sans-serif;
  overflow-x: hidden;
  /* sticky footer: content grows, footer rides the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
body > section, body > header.hero { flex-shrink: 0; }
.footer { margin-top: auto; }
img { image-rendering: pixelated; }
::selection { background: var(--purple); color: #0d0d12; }

.pixel-h { font-family: "Press Start 2P", monospace; line-height: 1.35; letter-spacing: 0; }

/* pixel-notched panel corners */
.notch, .world-panel, .slot, .kill-card, .chip, .join-btn {
  clip-path: polygon(
    0 var(--px), var(--px) var(--px), var(--px) 0,
    calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)),
    calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)),
    0 calc(100% - var(--px)));
}
/* holographic edge: gradient wrapper + inner offset */
.holo { position: relative; background: var(--panel); }
.holo::before {
  content: ""; position: absolute; inset: 0; padding: 2px;
  background: var(--holo); opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
  transition: opacity .35s var(--ease-snap);
}
.holo:hover::before { opacity: .95; }

/* film grain over everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: .8rem 1.4rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  animation: nav-in .6s var(--spring-snappy) both;
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-16px); } }
.nav-logo { font-family: "Press Start 2P", monospace; font-size: .8rem; color: var(--ink); text-decoration: none; }
.nav-cursor { color: var(--teal); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 1.4rem; margin-inline: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600;
  position: relative; padding-block: .2rem;
  transition: color .25s var(--ease-snap);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--holo); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-snap);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-live { display: flex; align-items: center; gap: .5rem; font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.live-dot { width: 8px; height: 8px; background: var(--dim); }
.nav-live.is-live .live-dot { background: var(--teal); animation: pulse 2s var(--spring-smooth) infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- reveals (PHYSICAL: one vocabulary everywhere) ---------- */
.reveal { opacity: 0; transform: translateY(24px); }
.is-in .reveal, .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--spring-snappy), transform .6s var(--spring-snappy);
}
.is-in .reveal:nth-child(1) { transition-delay: 0ms; }
.is-in .reveal:nth-child(2) { transition-delay: 80ms; }
.is-in .reveal:nth-child(3) { transition-delay: 160ms; }
.is-in .reveal:nth-child(4) { transition-delay: 240ms; }
.is-in .reveal:nth-child(5) { transition-delay: 320ms; }
.is-in .reveal:nth-child(6) { transition-delay: 400ms; }

/* ---------- hero ---------- */
.hero {
  min-height: 100dvh;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem;
  align-items: center; padding: 7rem clamp(1.2rem, 5vw, 5rem) 4rem;
  position: relative;
}
.hero::before {  /* ambient glow, never flat black */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 28% 38%, rgba(155,123,255,.07), transparent 70%),
    radial-gradient(ellipse 45% 40% at 78% 62%, rgba(78,205,196,.05), transparent 70%);
}
.eyebrow {
  font-family: "Press Start 2P", monospace; font-size: .58rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1.2rem;
}
.hero-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(4rem, 13vw, 11rem);
  background: var(--holo); -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.hero-stage { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.6rem; }
.hero-stage b { color: var(--ink); }
.hero-meter { max-width: 30rem; margin-bottom: 2rem; }
.hp-bar {
  height: 18px; background: var(--panel-2); border: 2px solid var(--line);
  padding: 3px; margin-bottom: .5rem;
}
.hp-fill {
  height: 100%; width: 100%;
  background: repeating-linear-gradient(90deg, var(--teal) 0 8px, color-mix(in srgb, var(--teal) 82%, #000) 8px 10px);
  transform: scaleX(var(--fill)); transform-origin: left;
  transition: transform 1s var(--spring-smooth);
}
.hp-label { font-size: .85rem; color: var(--muted); }
.hp-label b { color: var(--ink); font-size: 1rem; }
.join-btn {
  font: 600 .9rem Inter, sans-serif; color: var(--ink);
  background: var(--panel); border: 2px solid var(--line);
  padding: .8rem 1.3rem; cursor: pointer;
  transition: transform .3s var(--ease-snap), border-color .3s var(--ease-snap), box-shadow .3s var(--ease-snap);
}
.join-btn .join-label { color: var(--teal); font-family: "Press Start 2P", monospace; font-size: .6rem; margin-right: .6rem; text-transform: uppercase; }
.join-btn:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: 0 6px 22px rgba(78,205,196,.15); }
.join-btn:active { transform: scale(.97); transition: transform .16s var(--ease-snap); }
.join-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.world-panel { padding: 1.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; }
.panel-title { font-family: "Press Start 2P", monospace; font-size: .62rem; text-transform: uppercase; color: var(--muted); }
.badge { font-family: "Press Start 2P", monospace; font-size: .55rem; padding: .45rem .6rem; background: var(--panel-2); color: var(--muted); }
.badge.up { color: #0d0d12; background: var(--teal); }
.badge.down { color: var(--ink); background: var(--blood); }
.panel-rows { display: grid; gap: .45rem; margin-bottom: 1.2rem; }
.prow { display: flex; justify-content: space-between; font-size: .92rem; border-bottom: 1px dashed var(--line); padding-bottom: .45rem; }
.prow span { color: var(--muted); }
.panel-sub { font-family: "Press Start 2P", monospace; font-size: .55rem; color: var(--muted); text-transform: uppercase; margin-bottom: .7rem; }
.roster { list-style: none; padding: 0; display: grid; gap: .4rem; }
.roster li { font-weight: 600; font-size: .95rem; padding-left: 1.1rem; position: relative; }
.roster li::before { content: ""; position: absolute; left: 0; top: .42em; width: 7px; height: 7px; background: var(--teal); }
.roster li.dim { color: var(--dim); font-weight: 400; }
.roster li.dim::before { background: var(--dim); }

/* ---------- sections ---------- */
.section { padding: 6rem clamp(1.2rem, 5vw, 5rem); }
.section-green { background: var(--bg-green); border-block: 1px solid var(--line); }
.pixel-h { font-size: clamp(1.3rem, 3.4vw, 2.1rem); margin-bottom: .9rem; }
.section-sub { color: var(--muted); max-width: 46ch; margin-bottom: 2.6rem; }

/* next target */
.next-card {
  display: flex; gap: 1.3rem; align-items: center;
  padding: 1.4rem 1.6rem; margin-bottom: 3rem; max-width: 40rem;
}
.next-tag {
  position: absolute; top: -0.62rem; left: 1.2rem;
  font-family: "Press Start 2P", monospace; font-size: .55rem; text-transform: uppercase;
  color: #0d0d12; background: var(--gold); padding: .3rem .55rem;
}
.next-sprite { width: 64px; height: 64px; object-fit: contain; }
.next-name { font-family: "Press Start 2P", monospace; font-size: .95rem; margin-bottom: .5rem; }
.next-meta { color: var(--muted); font-size: .9rem; }

/* timeline */
.act { margin-bottom: 2.8rem; }
.act-head {
  display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem;
  font-family: "Press Start 2P", monospace; font-size: .78rem;
}
.act-head .act-count { font-size: .6rem; color: var(--muted); }
.act-line { flex: 1; height: 2px; background: var(--line); transform: scaleX(0); transform-origin: left; }
.is-in .act-line { transform: scaleX(1); transition: transform .8s var(--spring-smooth) .15s; }
.act-1 .act-tag { color: var(--green); } .act-2 .act-tag { color: var(--sky); }
.act-3 .act-tag { color: var(--purple); } .act-4 .act-tag { color: var(--gold); }
.trow {
  display: flex; align-items: center; gap: .9rem;
  padding: .55rem .7rem; border-bottom: 1px solid var(--line);
  transition: background .25s var(--ease-snap), transform .25s var(--ease-snap);
}
.trow:hover { background: var(--panel); transform: translateX(4px); }
.trow-sprite { width: 26px; height: 26px; object-fit: contain; flex: none; }
.trow-dot { width: 10px; height: 10px; flex: none; background: var(--dim); }
.trow.downed .trow-dot { background: var(--teal); }
.trow.next-up .trow-dot { background: var(--gold); animation: pulse 1.6s var(--spring-smooth) infinite; }
.trow-name { font-weight: 600; font-size: .95rem; }
.trow.downed .trow-name { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--teal) 55%, transparent); }
.trow-meta { margin-left: auto; color: var(--dim); font-size: .78rem; white-space: nowrap; }
.trow-meta b { color: var(--muted); }

/* giant stat break */
.break-stat { padding: 6.5rem 1.5rem; text-align: center; }
.giant-num { font-size: clamp(2.6rem, 9vw, 6rem); background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.giant-slash { opacity: .45; }
.giant-label { color: var(--muted); margin-top: 1rem; font-size: .95rem; }

/* compendium */
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2.2rem; align-items: center; }
.chip-gap { width: 1rem; }
.chip {
  font: 600 .8rem Inter, sans-serif; color: var(--muted);
  background: var(--panel); border: 2px solid var(--line);
  padding: .5rem .9rem; cursor: pointer;
  transition: transform .25s var(--ease-snap), color .25s var(--ease-snap), border-color .25s var(--ease-snap);
}
.chip:hover { transform: translateY(-2px); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip.is-on { color: var(--ink); border-color: var(--purple); box-shadow: inset 0 0 0 1px var(--purple); }
.slot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem;
}
.slot {
  background: var(--panel); border: 2px solid var(--line);
  padding: .9rem .8rem; text-align: center; position: relative;
  transition: transform .3s var(--ease-snap), border-color .3s var(--ease-snap), box-shadow .3s var(--ease-snap);
}
.slot:hover { transform: translateY(-2px); border-color: var(--purple); box-shadow: 0 8px 24px rgba(155,123,255,.12); }
.slot img, .slot .slot-ph {
  width: 42px; height: 42px; object-fit: contain; margin: 0 auto .6rem; display: block;
  transition: transform .3s var(--ease-snap);
}
.slot:hover img { transform: scale(1.12); }
.slot .slot-ph {
  display: grid; place-items: center; color: var(--dim);
  font-family: "Press Start 2P", monospace; font-size: .9rem;
  background: var(--panel-2);
}
.slot.locked img { filter: grayscale(1) brightness(.55); }
.slot-name { font-size: .78rem; font-weight: 600; line-height: 1.3; margin-bottom: .35rem; min-height: 2em; }
.slot.locked .slot-name { color: var(--muted); }
.slot-tag {
  font-family: "Press Start 2P", monospace; font-size: .48rem; text-transform: uppercase;
  color: var(--dim);
}
.slot.downed .slot-tag { color: var(--teal); }
.slot .slot-kills {
  position: absolute; top: .35rem; right: .45rem;
  font-family: "Press Start 2P", monospace; font-size: .5rem; color: var(--gold);
}
.slot-type { position: absolute; top: .35rem; left: .45rem; width: 8px; height: 8px; }
.slot-type.Boss { background: var(--purple); }
.slot-type.Miniboss { background: var(--sky); }
.slot-type.Event { background: var(--gold); }

/* kill log */
.kill-cascade { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: start; }
.kill-card { background: var(--panel); border: 2px solid var(--line); padding: 1.1rem 1.2rem; }
.kill-card.featured { grid-row: span 3; padding: 1.6rem; }
.kill-when { font-family: "Press Start 2P", monospace; font-size: .5rem; color: var(--dim); text-transform: uppercase; margin-bottom: .6rem; }
.kill-name { font-weight: 700; font-size: 1rem; }
.kill-card.featured .kill-name { font-family: "Press Start 2P", monospace; font-size: .95rem; line-height: 1.5; }
.kill-sub { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.kill-first { color: var(--gold); font-family: "Press Start 2P", monospace; font-size: .5rem; text-transform: uppercase; margin-left: .5rem; }
.kill-card { transition: transform .3s var(--ease-snap), border-color .3s var(--ease-snap); }
.kill-card:hover { transform: translateY(-2px); border-color: var(--teal); }

/* footer */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 2.2rem clamp(1.2rem, 5vw, 5rem);
  border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem;
}
.foot-brand { font-size: .7rem; background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 6rem; gap: 2.2rem; min-height: auto; }
  .section { padding: 4rem 1.2rem; }
  .nav-links { display: none; }
  .kill-cascade { grid-template-columns: 1fr; }
  .kill-card.featured { grid-row: auto; }
  .trow-meta { display: none; }
}
@media (hover: none) {
  .slot:hover, .trow:hover, .kill-card:hover, .chip:hover, .join-btn:hover { transform: none; }
}
/* ---------- reduced motion: opacity-only ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .is-in .reveal { transform: none; transition: opacity .3s linear; }
  .nav { animation: none; }
  .nav-cursor, .nav-live.is-live .live-dot, .trow.next-up .trow-dot { animation: none; }
  .hp-fill, .act-line, .is-in .act-line { transition: none; }
  .slot:hover, .trow:hover, .kill-card:hover, .chip:hover, .join-btn:hover { transform: none; }
}

/* ---------- evil-awareness ---------- */
.trow.other-evil { opacity: .4; }
.trow.other-evil .trow-name { text-decoration: none; color: var(--dim); }
.slot.other-evil { opacity: .45; }
.slot.other-evil .slot-tag { color: var(--dim); }

/* ---------- armory ---------- */
.armory-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; margin-bottom: 1.4rem; }
.armory-col { background: var(--panel); border: 2px solid var(--line); padding: 1.3rem 1.4rem; }
.armory-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.armory-tag { font-family: "Press Start 2P", monospace; font-size: .5rem; text-transform: uppercase; padding: .35rem .55rem; }
.armory-tag.unlocked { background: var(--gold); color: #0d0d12; }
.armory-tag.sealed { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.armory-boss { font-weight: 700; font-size: .95rem; }
.kind-group { margin-bottom: .9rem; }
.kind-label { font-family: "Press Start 2P", monospace; font-size: .5rem; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.gear-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.gear-chip {
  font-size: .78rem; font-weight: 600; padding: .3rem .55rem;
  background: var(--panel-2); border: 1px solid var(--line);
  transition: transform .25s var(--ease-snap), border-color .25s var(--ease-snap);
}
.gear-chip:hover { transform: translateY(-2px); }
.gear-chip.weapon { border-left: 3px solid var(--gold); }
.gear-chip.armor { border-left: 3px solid var(--sky); }
.gear-chip.accessory { border-left: 3px solid var(--purple); }
.gear-chip.tool { border-left: 3px solid var(--teal); }
.gear-chip.sealed-chip { color: var(--dim); border-style: dashed; }
.gear-chip small { color: var(--dim); font-weight: 400; margin-left: .3rem; }
.armory-count { color: var(--dim); font-size: .85rem; }
@media (max-width: 860px) { .armory-grid { grid-template-columns: 1fr; } }

/* ---------- kill receipts ---------- */
.rk-rows { margin-top: .8rem; display: grid; gap: .45rem; }
.rk-row { display: grid; grid-template-columns: minmax(0,1fr) 90px auto; gap: .6rem; align-items: center; font-size: .8rem; }
.rk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-track { height: 8px; background: var(--panel-2); border: 1px solid var(--line); display: block; }
.rk-bar { display: block; height: 100%; width: var(--w); background: var(--holo); }
.rk-nums { color: var(--muted); white-space: nowrap; font-size: .75rem; }

/* ---------- class setups ---------- */
.setup-panel { padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.setup-shared { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1rem; }
.shared-col { background: var(--panel); border: 2px solid var(--line); padding: 1.1rem 1.2rem; }
@media (max-width: 860px) { .setup-shared { grid-template-columns: 1fr; } }

/* ---------- multi-page ---------- */
.nav-links a.is-here { color: var(--ink); }
.nav-links a.is-here::after { transform: scaleX(1); }
.section:first-of-type, section.section { scroll-margin-top: 5rem; }
main > .section:first-child, body > .section:nth-of-type(1) { padding-top: 8rem; }
#path, #bosses, #kills, #setups, #gear-empty { padding-top: 8rem; }
.home-teasers { padding-block: 3.5rem 5rem; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.teaser {
  position: relative; display: flex; flex-direction: column; gap: .8rem;
  background: var(--panel); border: 2px solid var(--line); padding: 1.5rem 1.4rem 1.2rem;
  text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease-snap), border-color .3s var(--ease-snap);
}
.teaser:hover { transform: translateY(-2px); border-color: var(--purple); }
.teaser-label { font-family: "Press Start 2P", monospace; font-size: .55rem; text-transform: uppercase; color: var(--muted); }
.teaser-body { display: flex; align-items: center; gap: .6rem; font-size: .95rem; min-height: 2.4rem; flex-wrap: wrap; }
.teaser-body .dim, .dim { color: var(--dim); }
.teaser-go { font-size: .8rem; color: var(--teal); font-weight: 600; margin-top: auto; }
@media (max-width: 860px) { .teaser-grid { grid-template-columns: 1fr; } }

/* ═══════════ design elevation pass ═══════════ */

/* per-page biome accent — the world shifts hue as you travel */
body.accent-violet { --page-accent: var(--purple); --page-glow: 155, 123, 255; }
body.accent-green  { --page-accent: var(--green);  --page-glow: 74, 157, 107; }
body.accent-sky    { --page-accent: var(--sky);    --page-glow: 111, 168, 227; }
body.accent-gold   { --page-accent: var(--gold);   --page-glow: 232, 193, 90; }
body.accent-rose   { --page-accent: #d16a8e;       --page-glow: 209, 106, 142; }

/* atmosphere: ambient tint + pixel terrain horizon on every page */
body {
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(var(--page-glow), .06), transparent 65%),
    var(--bg);
}
body::before {
  content: ""; position: fixed; inset: auto 0 0 0; height: 200px; z-index: 0;
  pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60V38h12v-6h10v6h14v-10h12v-4h10v4h12v10h16V26h12v-8h10v8h14v12h18V30h12v-6h12v6h14v8h16V28h10v-8h12v8h12v10h16V32h12v-8h12v8h14v6h20V30h12v8h14v22z' fill='%23131019'/%3E%3C/svg%3E");
  background-size: 900px 200px; background-repeat: repeat-x; background-position: bottom;
  image-rendering: pixelated;
}
section, header.hero, footer { position: relative; z-index: 1; }

/* hero starfield — ambient, linear loop, felt not seen */
.stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stars::before, .stars::after {
  content: ""; position: absolute; width: 3px; height: 3px; background: transparent;
  box-shadow:
    8vw 12vh 0 rgba(236,233,242,.5), 22vw 32vh 0 rgba(155,123,255,.45),
    35vw 8vh 0 rgba(236,233,242,.3), 48vw 26vh 0 rgba(78,205,196,.4),
    61vw 14vh 0 rgba(236,233,242,.45), 72vw 38vh 0 rgba(232,193,90,.35),
    83vw 10vh 0 rgba(236,233,242,.4), 91vw 30vh 0 rgba(155,123,255,.35),
    15vw 52vh 0 rgba(236,233,242,.25), 55vw 55vh 0 rgba(111,168,227,.3),
    78vw 58vh 0 rgba(236,233,242,.3), 30vw 44vh 0 rgba(236,233,242,.2);
  animation: twinkle 4.5s linear infinite;
}
.stars::after {
  transform: translate(3vw, 5vh) scale(.7);
  animation-delay: -2.2s; opacity: .7;
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ornamented eyebrows + iridescent header rules */
.eyebrow::before { content: "\2726\00a0\00a0"; color: var(--page-accent, var(--teal)); }
.pixel-h { position: relative; padding-bottom: .9rem; }
.pixel-h::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 120px;
  background: var(--holo); transform: scaleX(0); transform-origin: left;
}
.is-in .pixel-h::after, .pixel-h.is-in::after {
  transform: scaleX(1);
  transition: transform .8s var(--spring-smooth) .2s;
}
.hero-title { padding-bottom: 0; } .hero-title::after { display: none; }

/* inventory-slot chrome: Terraria bevel on every panel */
.slot, .world-panel, .kill-card, .teaser, .armory-col, .shared-col,
.setup-panel, .next-card, .chip, .join-btn {
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, .05),
    inset -2px -2px 0 rgba(0, 0, 0, .45);
}
.slot { background: linear-gradient(160deg, var(--panel-2), var(--panel) 55%); }
.slot.downed {
  border-color: color-mix(in srgb, var(--teal) 40%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, var(--teal) 7%, var(--panel-2)), var(--panel) 60%);
}
.slot:hover {
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, .07),
    inset -2px -2px 0 rgba(0, 0, 0, .45),
    0 8px 24px rgba(var(--page-glow), .14);
}

/* gear chips: holo shimmer sweep on hover */
.gear-chip { position: relative; overflow: hidden; }
.gear-chip::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 50%, transparent 70%);
  transform: translateX(-110%);
}
.gear-chip:hover::after { transform: translateX(110%); transition: transform .6s var(--ease-snap); }

/* break-stat: flanking ornaments + accent glow */
.break-stat { position: relative; }
.break-stat .giant-num { filter: drop-shadow(0 0 22px rgba(var(--page-glow), .25)); }
.break-stat::before, .break-stat::after {
  content: "\25c6\00a0\2500\2500\2500"; color: var(--line);
  font-family: "Press Start 2P", monospace; font-size: .6rem;
  position: absolute; top: 50%;
}
.break-stat::before { left: clamp(1rem, 8vw, 8rem); }
.break-stat::after { content: "\2500\2500\2500\00a0\25c6"; right: clamp(1rem, 8vw, 8rem); }

/* section tone: accent-tinted alternation instead of flat green */
.section-green {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(var(--page-glow), .05), transparent 60%),
    var(--bg-green);
}

/* nav polish */
.nav-logo { transition: transform .3s var(--ease-snap); }
.nav-logo:hover { transform: scale(1.06); }
.nav { border-image: linear-gradient(90deg, transparent, rgba(var(--page-glow), .35), transparent) 1; border-bottom-width: 1px; }

/* footer holo rule */
.footer { position: relative; }
.footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: var(--holo); opacity: .3;
}

/* world panel rows: accent markers */
.prow b { color: var(--ink); }
.panel-title::before { content: "\25c8\00a0"; color: var(--page-accent, var(--teal)); }

@media (prefers-reduced-motion: reduce) {
  .stars::before, .stars::after { animation: none; }
  .pixel-h::after, .is-in .pixel-h::after { transform: scaleX(1); transition: none; }
  .gear-chip:hover::after { transition: none; transform: translateX(-110%); }
}

/* ---------- source-mod tags ---------- */
.mod-tag {
  font-size: .68rem; font-weight: 600; color: var(--dim);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: .1rem .45rem; white-space: nowrap; flex: none;
}
.trow.downed .mod-tag { opacity: .7; }
.slot-mod { font-size: .62rem; color: var(--dim); margin: -.2rem 0 .35rem; }
.slot.locked .slot-mod { opacity: .8; }
.chip-mod { color: var(--dim); font-weight: 400; margin-left: .35rem;
  border-left: 1px solid var(--line); padding-left: .35rem; }
@media (max-width: 860px) { .trow .mod-tag { display: none; } }

/* ---------- rich gear cards ---------- */
.gear-card { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .7rem .45rem .5rem; }
.gear-img { width: 22px; height: 22px; object-fit: contain; flex: none; image-rendering: pixelated; }
.gear-img-ph { background: var(--panel-2); border: 1px dashed var(--line); display: inline-block; }
.gear-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.gear-name { font-size: .8rem; font-weight: 600; line-height: 1.25; }
.gear-name small { color: var(--muted); font-weight: 400; margin-left: .35rem; }
.gear-from { font-size: .64rem; color: var(--dim); line-height: 1.3; }
.sealed-chip .gear-name { color: var(--muted); }
