/* ==========================================================================
   UNDEAD PIRATES ONLINE — 3D MMORPG theme layer
   Layered over the existing site so every page shares one look.
   Enhanced with ambience effects and moving anime spirit models.
   ========================================================================== */

/* ==========================================================================
   Custom properties -- Undead Pirates color palette
   ========================================================================== */
:root {
  --ip-void: #0a0514;
  --ip-abyss: #1a0f3a;
  --ip-deep: #2a1a5a;
  --ip-panel: rgba(26, 12, 48, .8);
  --ip-panel-2: rgba(35, 18, 66, .6);
  --ip-line: rgba(255, 80, 100, .2);
  --ip-line-strong: rgba(255, 61, 87, .45);
  --ip-teal: #9acaff;
  --ip-aqua: #cce8f5;
  --ip-gold: #ff3d57;
  --ip-gold-soft: #ff6b7a;
  --ip-violet: #a85fff;
  --ip-text: #e8e0f0;
  --ip-muted: #a090b0;
  --ip-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9), 0 2px 0 rgba(255, 255, 255, .02) inset;
  --ip-glow: 0 0 50px rgba(255, 61, 87, .4);
  --ip-radius: 20px;
  --ip-display: "Cinzel", "Times New Roman", Georgia, serif;
  --ip-body: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   Backdrop & html
   ========================================================================== */
html { background: var(--ip-void); scroll-behavior: smooth; }

body,
body.lpkii-fantasy-v90,
body.lpk87-theme,
body.lpk87-amber {
  background-color: var(--ip-void) !important;
  background-image:
    radial-gradient(1400px 1000px at 80% -5%, rgba(255, 61, 87, .18), transparent 65%),
    radial-gradient(1100px 800px at 12% 5%, rgba(168, 95, 255, .16), transparent 60%),
    radial-gradient(1300px 950px at 50% 130%, rgba(255, 80, 100, .1), transparent 68%),
    linear-gradient(180deg, #0a0514 0%, #1a0f3a 42%, #2a1a5a 100%) !important;
  background-attachment: fixed !important;
  color: var(--ip-text) !important;
  font-family: var(--ip-body) !important;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   Depth background layer (inserted before canvas)
   ========================================================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 5, 20, .1), rgba(10, 5, 20, .7) 78%, #0a0514 100%),
    repeating-linear-gradient(90deg, rgba(255, 80, 100, .04) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255, 80, 100, .04) 0 1px, transparent 1px 96px),
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(168, 95, 255, .12), transparent 68%),
    radial-gradient(ellipse 70% 40% at 80% 70%, rgba(255, 61, 87, .1), transparent 66%);
  transform: perspective(800px) rotateX(60deg) translateY(52%) scale(1.7);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(180deg, transparent 44%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 44%, #000 100%);
}

#ip3d-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#ip3d-scene .ip3d-glow {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .6;
  will-change: transform;
}
#ip3d-scene .ip3d-glow.a { width: 52vw; height: 52vw; left: -14vw; top: -12vw; background: radial-gradient(circle, rgba(255, 61, 87, .6), transparent 72%); }
#ip3d-scene .ip3d-glow.b { width: 44vw; height: 36vw; right: -10vw; top: 18vh; background: radial-gradient(circle, rgba(168, 95, 255, .45), transparent 74%); }
#ip3d-scene .ip3d-glow.c { width: 68vw; height: 40vw; left: 22vw; bottom: -22vw; background: radial-gradient(circle, rgba(255, 80, 100, .3), transparent 74%); }
#ip3d-scene .ip3d-isle {
  position: absolute; width: 260px; height: 170px; opacity: .55; filter: blur(.5px);
  background: linear-gradient(180deg, rgba(30, 15, 45, .3), rgba(8, 5, 15, .05));
  clip-path: polygon(50% 0%, 86% 24%, 100% 50%, 72% 100%, 24% 100%, 0% 50%, 14% 24%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
  will-change: transform;
}
#ip3d-scene .ip3d-isle.i1 { left: 8%; top: 20%; transform: scale(.85) rotate(-5deg); }
#ip3d-scene .ip3d-isle.i2 { right: 10%; top: 36%; transform: scale(1.4) rotate(4deg); opacity: .36; }
#ip3d-scene .ip3d-isle.i3 { left: 38%; bottom: 14%; transform: scale(.75) rotate(7deg); opacity: .3; }
#ip3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, .ip3d-title, .ip3d-heading {
  font-family: var(--ip-display) !important;
  color: var(--ip-gold-soft) !important;
  letter-spacing: .02em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .6);
}
p, li, span, small, label, td, th, div { }
a { color: var(--ip-teal); }
a:hover { color: var(--ip-gold-soft); }
::selection { background: rgba(255, 61, 87, .3); color: #fff; }

/* ==========================================================================
   Nav
   ========================================================================== */
.lpk4-nav, .site-header, header.site-header, .ip3d-nav {
  background: linear-gradient(180deg, rgba(12, 5, 24, .94), rgba(12, 5, 24, .68)) !important;
  border-bottom: 1px solid var(--ip-line) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 61, 87, .25) inset !important;
  position: sticky; top: 0; z-index: 60;
}
.nav-shell { position: relative; }
.lpk4-nav a, .nav-links a, .ip3d-links a {
  color: #e0d8f0 !important; font-weight: 600; letter-spacing: .02em;
}
.nav-links a:hover, .nav-links a.current, .lpk4-nav a:hover,
.ip3d-links a:hover, .ip3d-links a[aria-current="page"] {
  color: var(--ip-gold-soft) !important;
  text-shadow: 0 0 22px rgba(255, 61, 87, .6);
}
.brand-emblem, .ip3d-brand__mark {
  color: var(--ip-gold) !important;
  filter: drop-shadow(0 0 14px rgba(255, 61, 87, .7));
}
.brand-type strong { color: #fff !important; letter-spacing: .16em; }
.brand-type small { color: var(--ip-aqua) !important; font-size: 10.5px; letter-spacing: .3em; }
.nav-account {
  border: 1px solid var(--ip-line-strong) !important;
  border-radius: 999px; padding: 8px 16px !important;
  background: rgba(255, 61, 87, .12) !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
button, input[type="submit"], input[type="button"], .lpk4-btn, .btn,
.lpkii-v91-home-tiles a, .ip3d-btn {
  font-family: var(--ip-body) !important;
  border-radius: 999px !important;
  letter-spacing: .06em;
}
.lpk4-btn, .btn, input[type="submit"], button[type="submit"], .ip3d-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 32px !important;
  border: 1px solid var(--ip-line-strong) !important;
  background: linear-gradient(180deg, rgba(255, 61, 87, .98), rgba(224, 115, 130, .98)) !important;
  color: #1a0a14 !important; font-weight: 800 !important;
  box-shadow: 0 18px 40px -18px rgba(255, 61, 87, .9), 0 1px 0 rgba(255, 255, 255, .6) inset !important;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.lpk4-btn:hover, .btn:hover, input[type="submit"]:hover, .ip3d-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 32px 56px -22px rgba(255, 61, 87, .95), 0 1px 0 rgba(255, 255, 255, .7) inset !important;
  filter: brightness(1.08);
}
.lpk4-btn.outline, .ip3d-btn.is-ghost {
  background: rgba(18, 8, 30, .6) !important;
  color: var(--ip-gold-soft) !important;
  border: 1px solid var(--ip-line) !important;
  box-shadow: 0 0 0 1px rgba(255, 61, 87, .15) inset, 0 22px 48px -28px #000 !important;
}

/* ==========================================================================
   Cards / surfaces
   ========================================================================== */
.lpk87-news-card, .lpk87-media-card, .lpkii-video-panel, .kingdom-card,
.realm-card, .lpkii-v91-home-tiles a, .memory-tile, .gw-card,
[class*="-card"], .ip3d-card, .ip3d-panel {
  background:
    linear-gradient(160deg, rgba(28, 12, 52, .82), rgba(12, 8, 28, .9)) !important;
  border: 1px solid var(--ip-line) !important;
  border-radius: var(--ip-radius) !important;
  box-shadow: var(--ip-shadow) !important;
  color: var(--ip-text) !important;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s ease;
}
[class*="-card"]:hover, .ip3d-card:hover, .ip3d-panel:hover {
  border-color: var(--ip-line-strong) !important;
  box-shadow: 0 50px 90px -36px #000, 0 0 0 1px rgba(255, 61, 87, .25) inset, var(--ip-glow) !important;
}
.ip3d-card { padding: 30px; }
.ip3d-card h3 { color: var(--ip-gold-soft) !important; margin: 0 0 12px; font-size: 20px; }
.ip3d-card p { color: var(--ip-muted); margin: 0; line-height: 1.7; font-size: 15px; }

/* ==========================================================================
   Tables
   ========================================================================== */
table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100%;
  background: rgba(20, 12, 40, .65) !important;
  border: 1px solid var(--ip-line) !important;
  border-radius: 16px;
  overflow: hidden;
  color: var(--ip-text) !important;
}
th {
  background: linear-gradient(180deg, rgba(255, 80, 100, .18), rgba(14, 8, 28, .92)) !important;
  color: var(--ip-gold-soft) !important;
  font-family: var(--ip-body) !important;
  font-size: 12px !important; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--ip-line) !important;
  padding: 13px 16px !important; text-align: left;
}
td {
  border-bottom: 1px solid rgba(255, 80, 100, .07) !important;
  padding: 12px 16px !important;
  color: var(--ip-text) !important; font-size: 14px;
}
tbody tr:hover td, table tr:hover td { background: rgba(255, 80, 100, .05) !important; }

/* ==========================================================================
   Forms / inputs
   ========================================================================== */
input, select, textarea {
  background: rgba(8, 5, 15, .85) !important;
  border: 1px solid var(--ip-line) !important;
  border-radius: 14px !important;
  color: var(--ip-text) !important;
  padding: 12px 18px !important;
  font-family: var(--ip-body) !important;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(255, 61, 87, .7) !important;
  box-shadow: 0 0 0 4px rgba(255, 61, 87, .14) !important;
}

/* ==========================================================================
   Legacy pages
   ========================================================================== */
.lpk87-section, .lpk4-section, .lpkii-home-showcase, .lpkii-fantasy-intro,
.lpkii-v91-home-group, .lpkii-home-guide-cta, .kingdom-section, .memories-section {
  background-color: transparent !important;
  background-image: none !important;
}
.lpk87-deck, .section-intro, .lpkii-home-showcase p, .lpkii-fantasy-intro p,
.footer p, .smallprint { color: var(--ip-muted) !important; }
.lpk87-eyebrow, .lpk4-kicker, .lpkii-overline, .lpk87-heading time {
  color: var(--ip-teal) !important; letter-spacing: .2em; font-weight: 800;
}
.lpk87-news-kicker, .lpk87-fineprint { color: rgba(160, 144, 176, .9) !important; }
.footer, .lpk4-footer {
  background: linear-gradient(180deg, rgba(8, 6, 18, .2), rgba(8, 6, 18, .98)) !important;
  border-top: 1px solid var(--ip-line) !important;
  color: var(--ip-muted) !important;
}
.footer h3, .lpk4-footer strong { color: var(--ip-gold-soft) !important; }
.footer a { color: #c8c0e0 !important; }
.footer a:hover { color: var(--ip-gold-soft) !important; }
img { max-width: 100%; }
iframe { border: 0; }

/* ==========================================================================
   New page design system (ip3d-*)
   ========================================================================== */
.ip3d-body { margin: 0; min-height: 100vh; }
.ip3d-wrap { width: min(1200px, 94vw); margin: 0 auto; }
.ip3d-nav { border-bottom: 1px solid var(--ip-line); }
.ip3d-nav__inner {
  width: min(1280px, 96vw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 18px 0;
}
.ip3d-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.ip3d-brand__mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 16px; font-size: 22px;
  background: linear-gradient(160deg, rgba(255, 61, 87, .3), rgba(168, 95, 255, .12));
  border: 1px solid var(--ip-line-strong);
  box-shadow: 0 0 26px rgba(255, 61, 87, .4), 0 1px 0 rgba(255, 255, 255, .35) inset;
}
.ip3d-brand__text strong {
  display: block; font-family: var(--ip-display); font-size: 18px;
  letter-spacing: .14em; color: #fff;
}
.ip3d-brand__text small { color: var(--ip-aqua); font-size: 11px; letter-spacing: .3em; }
.ip3d-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ip3d-links a {
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; transition: background .2s, color .2s;
}
.ip3d-links a:hover { background: rgba(255, 61, 87, .12); }
.ip3d-links a[aria-current="page"] {
  background: rgba(255, 61, 87, .14);
  border: 1px solid var(--ip-line-strong);
}

/* hero */
.ip3d-hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 7vw, 88px); }
.ip3d-hero__art {
  position: absolute; inset: 0; z-index: 0;
  background: url("../images/undead-hero.jpg?v=3") center 42% / cover no-repeat;
  opacity: .68; transform: scale(1.08);
  transition: transform .7s ease-out;
  will-change: transform;
}
.ip3d-hero__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(80% 90% at 14% 45%, rgba(30, 10, 35, .95), transparent 78%),
    linear-gradient(180deg, rgba(8, 6, 20, .6), rgba(6, 4, 14, .88) 78%, #0a0514 100%);
}
.ip3d-hero__inner { position: relative; z-index: 2; display: grid; gap: 24px; max-width: 800px; }
.ip3d-kicker {
  display: inline-flex; align-items: center; gap: 12px; width: fit-content;
  font-size: 13px; letter-spacing: .36em; font-weight: 800; color: var(--ip-teal);
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid rgba(255, 61, 87, .35);
  background: rgba(15, 10, 30, .65);
  backdrop-filter: blur(10px);
}
.ip3d-title {
  font-size: clamp(42px, 7vw, 92px); line-height: .96; margin: 0;
  text-transform: uppercase;
}
.ip3d-title em {
  font-style: normal; display: block;
  background: linear-gradient(100deg, #ff6b7a, #ff3d57 50%, #a85fff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(255, 61, 87, .4));
}
.ip3d-lead { font-size: clamp(17px, 1.8vw, 22px); color: #e0e8f8; line-height: 1.8; margin: 0; max-width: 70ch; }
.ip3d-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.ip3d-btn { text-decoration: none !important; }

.ip3d-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px; margin-top: 32px; max-width: 720px;
}
.ip3d-stat {
  padding: 20px 22px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(30, 18, 60, .75), rgba(12, 8, 30, .8));
  border: 1px solid var(--ip-line);
  box-shadow: 0 26px 50px -26px #000, 0 1px 0 rgba(255, 255, 255, .05) inset;
}
.ip3d-stat span { display: block; font-size: 12px; letter-spacing: .24em; color: var(--ip-aqua); font-weight: 800; }
.ip3d-stat strong {
  display: block; font-family: var(--ip-display); font-size: 30px; color: var(--ip-gold-soft);
  margin: 6px 0 4px;
}
.ip3d-stat b { font-size: 13px; font-weight: 600; color: var(--ip-muted); letter-spacing: .06em; }

/* sections */
.ip3d-section { padding: clamp(52px, 7vw, 100px) 0; position: relative; }
.ip3d-section + .ip3d-section { border-top: 1px solid rgba(255, 80, 100, .08); }
.ip3d-heading { margin: 0 0 14px; font-size: clamp(30px, 3.8vw, 48px); line-height: 1.1; }
.ip3d-heading em {
  font-style: normal; color: var(--ip-teal);
  text-shadow: 0 0 38px rgba(255, 61, 87, .5);
}
.ip3d-eyebrow {
  display: block; font-size: 13px; letter-spacing: .35em; font-weight: 800;
  color: var(--ip-teal); margin-bottom: 20px;
}
.ip3d-deck { color: var(--ip-muted); max-width: 78ch; line-height: 1.8; margin: 0 0 36px; font-size: 16px; }

.ip3d-grid { display: grid; gap: 20px; }
.ip3d-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ip3d-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.ip3d-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.ip3d-card__icon {
  width: 50px; height: 50px; display: grid; place-items: center; font-size: 24px;
  border-radius: 16px; margin-bottom: 18px;
  background: linear-gradient(150deg, rgba(255, 61, 87, .25), rgba(168, 95, 255, .2));
  border: 1px solid var(--ip-line);
  box-shadow: 0 0 30px rgba(255, 61, 87, .25) inset;
}
.ip3d-card__meta {
  display: block; margin-top: 18px; font-size: 12px; letter-spacing: .2em;
  color: var(--ip-teal); font-weight: 800; text-transform: uppercase;
}
.ip3d-card a { color: var(--ip-gold-soft); }

/* banner (codex / resource) */
.ip3d-banner {
  position: relative; overflow: hidden; border-radius: 28px;
  border: 1px solid var(--ip-line-strong);
  box-shadow: var(--ip-shadow);
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: stretch;
  background: linear-gradient(150deg, rgba(18, 12, 38, .94), rgba(10, 8, 24, .98));
}
.ip3d-banner__art { min-height: 300px; background: url("../images/undead-codex.jpg?v=3") center / cover no-repeat; opacity: .85; }
.ip3d-banner__body { padding: clamp(30px, 4vw, 48px); }
.ip3d-banner__body h3 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 36px); }
.ip3d-banner__body p { color: var(--ip-muted); line-height: 1.8; margin: 0 0 22px; }

/* chips + badges */
.ip3d-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ip3d-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(18, 12, 50, .75); border: 1px solid var(--ip-line);
  color: #d8d0e8;
}
.ip3d-chip b { color: var(--ip-gold-soft); }
.ip3d-badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.ip3d-badge.is-lesser { background: rgba(160, 144, 176, .18); color: #b8c8e0; border: 1px solid rgba(160, 144, 176, .35); }
.ip3d-badge.is-normal { background: rgba(180, 200, 240, .16); color: #a8c8ff; border: 1px solid rgba(180, 200, 240, .35); }
.ip3d-badge.is-veteran { background: rgba(255, 61, 87, .16); color: #ff8898; border: 1px solid rgba(255, 61, 87, .45); }
.ip3d-badge.is-elite { background: rgba(168, 95, 255, .18); color: #d0c0f0; border: 1px solid rgba(168, 95, 255, .5); }
.ip3d-badge.is-legendary { background: rgba(255, 61, 87, .2); color: #ffb8c8; border: 1px solid rgba(255, 61, 87, .55); box-shadow: 0 0 20px rgba(255, 61, 87, .35); }
.ip3d-group-tag { font-size: 12px; color: var(--ip-muted); letter-spacing: .1em; text-transform: uppercase; }

/* toolbar + codex table */
.ip3d-toolbar {
  display: grid; grid-template-columns: 1.6fr auto auto auto; gap: 12px;
  padding: 20px; border-radius: 20px; margin: 0 0 24px;
  background: linear-gradient(160deg, rgba(28, 16, 56, .65), rgba(16, 10, 34, .85));
  border: 1px solid var(--ip-line);
}
.ip3d-toolbar input, .ip3d-toolbar select { width: 100%; }
.ip3d-table-wrap {
  max-height: 80vh; overflow: auto; border-radius: 20px;
  border: 1px solid var(--ip-line);
  background: rgba(18, 12, 44, .75);
  box-shadow: var(--ip-shadow);
  scrollbar-color: rgba(255, 61, 87, .4) transparent;
}
table.ip3d-table { border: 0 !important; border-radius: 0; background: transparent !important; }
table.ip3d-table thead th {
  position: sticky; top: 0; z-index: 2;
  backdrop-filter: blur(14px);
  background: rgba(14, 12, 30, .98) !important;
}
table.ip3d-table td:first-child { color: var(--ip-aqua); font-variant-numeric: tabular-nums; }
table.ip3d-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .01); }
.ip3d-count { color: var(--ip-muted); font-size: 14px; margin: 12px 4px 0; }
.ip3d-count b { color: var(--ip-gold-soft); }

/* timeline / steps */
.ip3d-timeline { display: grid; gap: 18px; }
.ip3d-step {
  position: relative; padding: 26px 28px 26px 68px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(32, 18, 62, .6), rgba:14, 10, 32, .85));
  border: 1px solid var(--ip-line);
}
.ip3d-step::before {
  content: attr(data-step); position: absolute; left: 22px; top: 24px;
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #0e0a1c;
  background: linear-gradient(160deg, #ff6b7a, #ff3d57);
  box-shadow: 0 0 22px rgba(255, 61, 87, .5);
}
.ip3d-step h3 { margin: 0 0 8px; font-size: 20px; }
.ip3d-step p { margin: 0; color: var(--ip-muted); line-height: 1.7; font-size: 15px; }
.ip3d-step code, .ip3d-code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px; color: #a8c8ff;
  background: rgba(255, 61, 87, .1);
  border: 1px solid rgba(255, 61, 87, .22);
  padding: 2px 8px; border-radius: 8px;
}

/* footer */
.ip3d-footer {
  border-top: 1px solid var(--ip-line); margin-top: 48px;
  background: linear-gradient(180deg, rgba(8, 5, 18, .35), rgba(8, 5, 18, .98));
}
.ip3d-footer__inner {
  width: min(1200px, 94vw); margin: 0 auto; padding: 36px 0;
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center;
}
.ip3d-footer p { margin: 0; color: var(--ip-muted); font-size: 14px; }
.ip3d-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ip3d-footer nav a { color: #d0d8e8; text-decoration: none; font-size: 14px; }
.ip3d-footer nav a:hover { color: var(--ip-gold-soft); }

/* reveal animation */
.ip3d-rise { opacity: 1; transform: none; }
body.ip3d-anim .ip3d-rise { opacity: 0; transform: translateY(20px); }
body.ip3d-anim .ip3d-rise.is-in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.ip3d-rise.is-in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }

/* ---------------------------------------------- responsive safety pass */
.ip3d-wrap, .ip3d-hero__inner, .ip3d-banner__body { min-width: 0; }
.ip3d-lead { max-width: min(70ch, 100%); }
.ip3d-deck { max-width: min(78ch, 100%); }
.ip3d-heading, .ip3d-title { overflow-wrap: anywhere; }
.ip3d-stats { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.ip3d-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.ip3d-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.ip3d-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.ip3d-toolbar { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.ip3d-chips, .ip3d-actions { max-width: 100%; }
@media (max-width: 880px) {
  .ip3d-banner { grid-template-columns: 1fr; }
  .ip3d-banner__art { min-height: 220px; order: -1; }
  .ip3d-toolbar { grid-template-columns: 1fr 1fr; }
  .ip3d-nav__inner { flex-wrap: wrap; }
  .ip3d-links { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ip3d-rise { opacity: 1; transform: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------- spirit animation keyframes */
@keyframes floatSpirit {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  50% { transform: translateY(-40px) rotate(180deg); opacity: 0.8; }
}
@keyframes driftMist {
  0%, 100% { transform: translateX(0) translateY(0) scale(1); opacity: 0.04; }
  50% { transform: translateX(30px) translateY(20px) scale(1.2); opacity: 0.08; }
}

/* spirit elements */
.ip3d-spirit {
  position: absolute; width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 20px; color: rgba(255, 80, 100, 0.5);
  text-shadow: 0 0 12px rgba(255, 61, 87, 0.6);
  pointer-events: none;
  z-index: 2;
  user-select: none;
}