/* ─── fonts ─── */
@font-face { font-family: 'Bergamasco'; src: url('fonts/custom/Bergamasco Light.ttf') format('truetype'); font-weight: 300; }
@font-face { font-family: 'Bergamasco'; src: url('fonts/custom/Bergamasco Semibold.ttf') format('truetype'); font-weight: 600; }
@font-face { font-family: 'Saint'; src: url('fonts/custom/saint.otf') format('opentype'); }
@font-face { font-family: 'RoyaleCouture'; src: url('fonts/custom/royale-couture-sans.otf') format('opentype'); }
@font-face { font-family: 'Handwriting'; src: url('fonts/custom/My handwriting.ttf') format('truetype'); }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cyan:     #74D7FE;
  --violet:   #8A6FE8;
  --lavender: #B9ADF9;
  --pink:     #DE97E7;
  --pink-hot: #FF2D92;
  --acid:     #39FF14;
  --white:    #EDE8FF;
}

html, body {
  width: 100%; min-height: 100%;
  background: #000008;
  color: var(--white);
  overflow-x: hidden;
  overflow-y: auto;
  cursor: none;
}

/* ─── cursor ─── */
#cur {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 12px; height: 12px;
  border: 1px solid rgba(116,215,254,0.6);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width .15s, height .15s, border-color .2s;
  mix-blend-mode: screen;
}
#cur.hover {
  width: 20px; height: 20px;
  border-color: rgba(222,151,231,0.7);
  box-shadow: 0 0 8px rgba(222,151,231,0.3);
}
#cur-trail {
  position: fixed; z-index: 9998; pointer-events: none;
  width: 80px; height: 80px;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(138,111,232,0.05) 0%, transparent 70%);
  transition: left .14s ease-out, top .14s ease-out;
}

/* ─── canvas ─── */
canvas#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ─── blueprint grid ─── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ─── vignette only — no scanlines ─── */
.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 20%, rgba(0,0,8,0.92) 100%);
}


/* ─── status bar ─── */
.status-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25;
  height: 18px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  background: rgba(0,0,8,0.7);
  border-bottom: 1px solid rgba(138,111,232,0.07);
  pointer-events: none;
}
.sb-l, .sb-r {
  font-family: monospace; font-size: 6px; letter-spacing: 0.3em;
  color: rgba(138,111,232,0.2);
}
.sb-c {
  font-family: monospace; font-size: 6px; letter-spacing: 0.4em;
  color: rgba(116,215,254,0.12);
}
.sb-dot {
  display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: var(--acid); opacity: 0.4;
  box-shadow: 0 0 4px var(--acid);
  animation: blink 2s step-end infinite;
  vertical-align: middle; margin-right: 5px;
}

/* ─── corners ─── */
.corner {
  position: fixed; width: 16px; height: 16px;
  border-style: solid; z-index: 20; pointer-events: none;
}
.tl { top: 26px; left: 20px; border-color: rgba(138,111,232,0.3); border-width: 1px 0 0 1px; }
.tr { top: 26px; right: 20px; border-color: rgba(116,215,254,0.25); border-width: 1px 1px 0 0; }
.bl { bottom: 24px; left: 20px; border-color: rgba(116,215,254,0.25); border-width: 0 0 1px 1px; }
.br { bottom: 24px; right: 20px; border-color: rgba(138,111,232,0.3); border-width: 0 1px 1px 0; }

/* ─── ticker ─── */
.ticker-wrap {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 15;
  height: 18px; overflow: hidden; pointer-events: none;
  border-top: 1px solid rgba(138,111,232,0.07);
  background: rgba(0,0,8,0.7);
}
.ticker {
  display: inline-block; white-space: nowrap; padding: 5px 0;
  font-family: monospace; font-size: 6.5px; letter-spacing: 0.24em;
  color: rgba(138,111,232,0.2);
  animation: scroll-left 60s linear infinite;
}
@keyframes scroll-left {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ─── page ─── */
.page {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 40px 65px;
  gap: 0;
}

/* ─── eyebrow ─── */
.eyebrow {
  font-family: monospace;
  font-size: 6.5px; letter-spacing: 0.55em; text-transform: uppercase;
  color: rgba(138,111,232,0.25);
  text-align: center; margin-bottom: 4px;
  animation: rise 1.2s cubic-bezier(0.16,1,0.3,1) both;
}
.eyebrow .ea { color: rgba(116,215,254,0.28); }
.eyebrow a.ea-link {
  color: rgba(116,215,254,0.55);
  text-decoration: none;
  border-bottom: 1px dotted rgba(116,215,254,0.3);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.eyebrow a.ea-link:hover {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.eyebrow-rule {
  width: 180px; height: 1px; margin: 0 auto 24px;
  background: linear-gradient(90deg, transparent, rgba(138,111,232,0.2), transparent);
  animation: rise 1.2s cubic-bezier(0.16,1,0.3,1) 0.06s both;
}

/* ─── mascot ─── */
.mascot-outer {
  position: relative; margin-bottom: 18px;
  animation: rise 1.1s cubic-bezier(0.16,1,0.3,1) 0.1s both;
}
.mascot-halo {
  position: absolute; inset: -28px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138,111,232,0.1) 0%, transparent 70%);
  animation: pulse-halo 5s ease-in-out infinite;
  pointer-events: none;
}
.mascot-ring {
  position: absolute; border-radius: 50%; pointer-events: none;
  border: 1px solid transparent;
}
.mascot-ring-1 {
  inset: -18px; border-color: rgba(138,111,232,0.14);
  animation: ring-spin 16s linear infinite;
}
.mascot-ring-2 {
  inset: -30px; border-color: rgba(116,215,254,0.07);
  animation: ring-spin 26s linear infinite reverse;
}
.mascot-img {
  display: block; width: 72px; height: 84px; object-fit: contain;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 0 8px  rgba(116,215,254,0.6))
    drop-shadow(0 0 20px rgba(138,111,232,0.4));
  animation: float 6s ease-in-out infinite;
}

/* ─── title ─── */
.title-wrap {
  position: relative; text-align: center;
  margin-bottom: 10px;
  animation: rise 1s cubic-bezier(0.16,1,0.3,1) 0.18s both;
}
.hub-title {
  font-family: 'RoyaleCouture', serif;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  line-height: 0.92; letter-spacing: 0.1em;
  color: var(--white);
  text-shadow:
    0 0 20px rgba(116,215,254,0.5),
    0 0 55px rgba(116,215,254,0.18),
    0 0 110px rgba(138,111,232,0.12);
}
.hub-title .w1 { color: var(--cyan); }
.hub-title .w2 { color: var(--lavender); }

/* glitch ghost */
.title-ghost {
  position: absolute; inset: 0;
  font-family: 'RoyaleCouture', serif;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  line-height: 0.92; letter-spacing: 0.1em;
  color: transparent; text-align: center;
  pointer-events: none; opacity: 0;
  animation: ghost-appear 10s linear 3s infinite;
}
.title-ghost::before {
  content: 'ARTIFACT ARCHIVE';
  position: absolute; inset: 0;
  color: rgba(255,45,146,0.3);
  clip-path: inset(20% 0 65% 0);
  transform: translateX(-2px);
  animation: glitch-r 10s linear 3s infinite;
}
.title-ghost::after {
  content: 'ARTIFACT ARCHIVE';
  position: absolute; inset: 0;
  color: rgba(0,240,255,0.22);
  clip-path: inset(60% 0 15% 0);
  transform: translateX(2px);
  animation: glitch-b 10s linear 3.1s infinite;
}

/* ─── subtitle ─── */
.hub-sub {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #d8cfff;
  text-align: center; margin-bottom: 14px; line-height: 1.9;
  animation: rise 1s cubic-bezier(0.16,1,0.3,1) 0.28s both;
}
.hub-sub .dot { color: rgba(238,170,247,0.95); }

.hub-aside {
  font-family: 'Handwriting', cursive;
  font-size: 18px; letter-spacing: 0.02em;
  color: rgba(140,225,255,0.7); text-align: center;
  margin-bottom: 42px;
  animation: rise 1s cubic-bezier(0.16,1,0.3,1) 0.34s both;
}

/* ─── divider ─── */
.divider {
  width: 100%; max-width: 960px; height: 1px; margin-bottom: 32px;
  background: linear-gradient(90deg, transparent, rgba(138,111,232,0.14), transparent);
  position: relative;
  animation: rise .9s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}
.divider::before {
  content: '∴';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px; color: rgba(138,111,232,0.28);
  background: #000008; padding: 0 8px; letter-spacing: 0.3em;
}

/* ─── search box ─── */
.search-wrap {
  position: relative;
  display: flex; align-items: center;
  width: 100%; max-width: 520px;
  margin: 0 auto 14px;
  padding: 0 14px 0 38px;
  height: 38px;
  background: rgba(8,4,20,0.55);
  border: 1px solid rgba(138,111,232,0.22);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  animation: rise .9s cubic-bezier(0.16,1,0.3,1) 0.36s both;
}
.search-wrap:hover {
  border-color: rgba(138,111,232,0.42);
}
.search-wrap:focus-within {
  border-color: var(--violet, #8a6fe8);
  background: rgba(8,4,20,0.78);
  box-shadow: 0 0 0 1px rgba(138,111,232,0.18), 0 0 18px rgba(138,111,232,0.18);
}
.search-wrap .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: rgba(216,207,255,0.55);
  pointer-events: none;
  transition: color .18s ease;
}
.search-wrap:focus-within .search-icon { color: var(--lavender, #B9ADF9); }
.search-wrap { cursor: text; }
.search-wrap .search-clear { cursor: pointer; }
.search-wrap .search-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #ece5ff;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  height: 100%;
  min-width: 0;
  caret-color: var(--lavender, #B9ADF9);
  cursor: text;
}
.search-wrap .search-input::placeholder {
  color: rgba(216,207,255,0.38);
  letter-spacing: 0.18em;
  text-transform: lowercase;
}
.search-wrap .search-input::-webkit-search-cancel-button { display: none; }
.search-wrap .search-count {
  margin-left: 10px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(138,111,232,0.6);
  white-space: nowrap;
}
.search-wrap .search-clear {
  display: none;
  background: transparent;
  border: 0;
  color: rgba(216,207,255,0.55);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  margin-left: 6px;
  transition: color .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.search-wrap .search-clear:hover { color: var(--pink-hot, #FF2D92); }
.search-wrap .search-clear:active { transform: scale(0.88); }
.search-wrap.has-query .search-clear { display: inline-block; }

@media (max-width: 720px) {
  .search-wrap {
    max-width: 320px;
    margin-bottom: 12px;
    font-size: 11px;
  }
  .search-wrap .search-count { display: none; }
}

/* ─── filter bar (categories + dice) ─── */
.filter-bar {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  width: 100%; max-width: 1100px;
  margin: 0 auto 22px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  animation: rise .9s cubic-bezier(0.16,1,0.3,1) 0.42s both;
}
.filter-group {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px;
}
.filter-bar .filter-sep {
  color: rgba(138,111,232,0.32);
  font-size: 11px;
  padding: 0 2px;
  user-select: none;
}
.filter-bar .filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(216,207,255,0.5);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  padding: 5px 10px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.filter-bar .filter-btn:hover {
  color: #ece5ff;
  border-color: rgba(138,111,232,0.32);
}
.filter-bar .filter-btn.is-active {
  color: #fff;
  border-color: var(--violet, #8a6fe8);
  background: rgba(138,111,232,0.18);
}

.filter-bar .dice-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid rgba(138,111,232,0.32);
  color: rgba(216,207,255,0.65);
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.filter-bar .dice-btn:hover {
  color: #fff;
  border-color: var(--violet, #8a6fe8);
  background: rgba(138,111,232,0.18);
}
.filter-bar .dice-btn:active {
  transform: scale(0.92);
}
.filter-bar .dice-btn.is-active {
  color: #fff;
  border-color: var(--violet, #8a6fe8);
  background: rgba(138,111,232,0.22);
}
.filter-bar .dice-icon {
  width: 16px; height: 16px;
  display: block;
}
.filter-bar .dice-btn.is-rolling .dice-icon {
  animation: dice-roll .6s cubic-bezier(0.16,1,0.3,1);
}
@keyframes dice-roll {
  0%   { transform: rotate(0)    scale(1);   }
  40%  { transform: rotate(220deg) scale(1.18); }
  100% { transform: rotate(360deg) scale(1);   }
}

.card-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-family: 'Handwriting', cursive;
  font-size: 18px;
  color: rgba(216,207,255,0.45);
  padding: 60px 0;
}

/* ─── card grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  width: 100%; max-width: 1100px;
  margin-bottom: 36px;
}
@media (max-width: 1100px) {
  .card-grid { max-width: 880px; gap: 14px; }
}
@media (max-width: 900px) {
  .card-grid { max-width: 680px; gap: 12px; }
}

/* ─── mobile D-pad navigation ─── */
.dpad-wrap { display: none; }

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    gap: 0;
    margin-bottom: 14px;
  }
  .card-grid .card {
    display: none;
    opacity: 1;
    animation: none;
  }
  .card-grid .card.is-active {
    display: block;
    animation: rise .5s cubic-bezier(0.16,1,0.3,1) both;
  }

  .dpad-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 0 32px;
    animation: fade-in 1.6s ease both;
  }
  .dpad-counter {
    font-family: monospace;
    font-size: 9px;
    letter-spacing: 0.38em;
    color: rgba(138,111,232,0.55);
    text-transform: uppercase;
  }
  .dpad {
    display: grid;
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 52px);
    gap: 4px;
  }
  .dpad-btn {
    background: rgba(8,4,20,0.55);
    border: 1px solid rgba(138,111,232,0.32);
    color: rgba(200,180,255,0.88);
    font-family: monospace;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .dpad-btn:active {
    background: rgba(138,111,232,0.28);
    border-color: var(--violet, #8a6fe8);
    color: #fff;
    transform: scale(0.94);
  }
  .dpad-up    { grid-column: 2; grid-row: 1; }
  .dpad-left  { grid-column: 1; grid-row: 2; }
  .dpad-right { grid-column: 3; grid-row: 2; }
  .dpad-down  { grid-column: 2; grid-row: 3; }
}

/* ─── card — outer square, no clip ─── */
.card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: #06001a;
  text-decoration: none; color: inherit;
  cursor: none;
  opacity: 0;
  animation: rise .9s cubic-bezier(0.16,1,0.3,1) both;
  transition: transform .3s cubic-bezier(0.16,1,0.3,1), filter .3s ease;
}
.card:nth-child(1) { animation-delay: .35s; }
.card:nth-child(2) { animation-delay: .48s; }
.card:nth-child(3) { animation-delay: .61s; }
.card:nth-child(4) { animation-delay: .74s; }
.card:hover {
  transform: translateY(-7px) scale(1.04);
  filter: brightness(1.12) saturate(1.2);
}

/* ─── card-inner — content clipped to the frame's octagonal window ─── */
/* polygon derived from SVG frame1 octagon (viewBox 1024×1024 → %):    */
/* points: 966,705.5 699.6,971.9 322.8,971.9 56.4,705.5                */
/*         56.4,328.7 322.8,62.3 699.6,62.3 966,328.7                  */
.card-inner {
  position: absolute;
  inset: 0;
  clip-path: polygon(
    94.34% 68.90%,
    68.32% 94.91%,
    31.52% 94.91%,
     5.51% 68.90%,
     5.51% 32.10%,
    31.52%  6.08%,
    68.32%  6.08%,
    94.34% 32.10%
  );
  overflow: hidden;
}

/* dark gradient overlay inside the window */
.card-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6,0,26,0.62) 0%,
    rgba(6,0,26,0.08) 28%,
    rgba(6,0,26,0.08) 60%,
    rgba(6,0,26,0.68) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ─── SVG frame — sits on top of card-inner, outside the clip ─── */
.card-frame-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 10;
  pointer-events: none;
}

/* ─── card preview — scaled live iframe of linked page ─── */
/* iframe is 500% × 500% of the card, then scaled back to 20%,
   so it renders at full page width and fills the card exactly  */
.card-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.card-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border: none;
  pointer-events: none;
  display: block;
}

.card.is-noimg .card-preview {
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--ca, var(--violet)) 22%, transparent) 0%, transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 8px),
    #0a0814;
}

/* ─── card dot ─── */
.card-dot {
  position: absolute; top: 18%; right: 18%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--dc, var(--pink));
  box-shadow: 0 0 7px var(--dc, var(--pink));
  animation: blink 2.4s step-end infinite;
  z-index: 3;
}

/* ─── card name — big title inside the octagonal window ─── */
.card-name {
  position: absolute;
  top: 20%;
  left: 0; right: 0;
  padding: 0 20%;
  text-align: center;
  font-family: 'RoyaleCouture', serif;
  font-size: clamp(1rem, 3.8vw, 1.45rem);
  line-height: 1.06;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 3px rgba(0,0,0,0.85);
  paint-order: stroke fill;
  text-shadow:
    0 0 18px var(--ca, var(--violet)),
    0 0 36px var(--ca, rgba(138,111,232,0.4)),
    0 2px 6px rgba(0,0,0,0.9);
  z-index: 3;
  pointer-events: none;
}

/* ─── card description — inside the octagonal window, bottom ─── */
.card-desc {
  position: absolute;
  bottom: 16%;
  left: 0; right: 0;
  padding: 0 18%;
  text-align: center;
  font-family: 'RoyaleCouture', serif;
  font-size: clamp(0.6rem, 1.6vw, 0.78rem);
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 5px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.9);
  line-height: 1.5;
  z-index: 3;
  pointer-events: none;
}

/* ─── card num ─── */
.card-num {
  position: absolute;
  bottom: 9%; left: 0; right: 0;
  text-align: center;
  font-family: monospace; font-size: 6px; letter-spacing: 0.38em;
  color: rgba(255,255,255,0.16);
  z-index: 3;
  pointer-events: none;
}

/* ─── footer ─── */
.hub-footer {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  animation: fade-in 3s ease both;
}
.hub-footer-main {
  font-family: monospace; font-size: 7px; letter-spacing: 0.32em;
  color: rgba(138,111,232,0.18); text-align: center;
}
.blink {
  display: inline-block; width: 4px; height: .82em;
  background: var(--violet); opacity: 0.4; vertical-align: middle;
  animation: blink 1.4s step-end infinite;
  box-shadow: 0 0 6px var(--violet);
}
.hub-footer-note {
  font-family: 'Handwriting', cursive;
  font-size: 15px; letter-spacing: 0.02em;
  color: rgba(140,225,255,0.55); text-align: center;
}

/* ─── "so here we goo" ─── */
.here-we-goo {
  font-family: 'Handwriting', cursive;
  font-size: 20px; letter-spacing: 0.02em;
  color: rgba(222,151,231,0.85); text-align: center;
  margin: -10px 0 28px;
  animation: rise 1s cubic-bezier(0.16,1,0.3,1) 0.4s both;
}

/* ─── credits / stack panel ─── */
.hub-stack {
  width: 100%; max-width: 720px;
  margin: 36px auto 28px;
  padding: 22px 28px;
  border: 1px solid rgba(138,111,232,0.14);
  background: rgba(8,4,20,0.45);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  animation: fade-in 2s ease both;
}
.hub-stack::before,
.hub-stack::after {
  content: '∴';
  position: absolute; top: -7px;
  font-size: 9px; color: rgba(138,111,232,0.4);
  background: #000008; padding: 0 6px; letter-spacing: 0.3em;
}
.hub-stack::before { left: 16px; }
.hub-stack::after  { right: 16px; }
.stack-row {
  display: flex; align-items: baseline; gap: 14px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 500;
  font-size: 14px; letter-spacing: 0.02em;
  color: #ece5ff;
  line-height: 1.7;
}
.stack-k {
  text-transform: uppercase;
  color: #9becff;
  letter-spacing: 0.22em;
  min-width: 90px;
  font-size: 13px;
  font-weight: 600;
}
.stack-sep {
  color: rgba(190,160,255,0.85);
  font-size: 13px;
}
.stack-v {
  color: #ece5ff;
  text-transform: lowercase;
  font-weight: 500;
}
.stack-v .dot { color: rgba(238,170,247,0.95); }
.stack-note {
  font-family: 'Handwriting', cursive;
  font-size: 16px; letter-spacing: 0.01em;
  color: #f3c2f8;
  text-transform: none;
  margin-left: 10px;
  font-weight: 400;
}
.stack-row-note {
  justify-content: center;
  border-top: 1px dashed rgba(138,111,232,0.3);
  padding-top: 12px;
  margin-top: 6px;
}
.stack-row-note .stack-v {
  font-family: 'Handwriting', cursive;
  font-size: 17px; letter-spacing: 0.01em;
  color: #b8ecff;
  font-weight: 400;
}

/* ─── keyframes ─── */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 0%,100%{opacity:.4} 50%{opacity:0} }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
@keyframes pulse-halo {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(1.12); }
}
@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ghost-appear {
  0%,88%,100% { opacity: 0; }
  89%,95%     { opacity: 1; }
  92%         { opacity: 0; }
}
@keyframes glitch-r {
  0%,88%,100% { clip-path: inset(20% 0 65% 0); transform: translateX(-2px); }
  89%         { clip-path: inset(5% 0 82% 0);  transform: translateX(-4px); }
  91%         { clip-path: inset(50% 0 35% 0); transform: translateX(2px); }
}
@keyframes glitch-b {
  0%,88%,100% { clip-path: inset(60% 0 15% 0); transform: translateX(2px); }
  89%         { clip-path: inset(42% 0 33% 0); transform: translateX(4px); }
  91%         { clip-path: inset(78% 0 5% 0);  transform: translateX(-2px); }
}
