/* resonance_glyph_index.css */

/* Global page styling */
/* === MERGED BODY (base styles + subtle field gradient) === */
:root{
  --field-bg-1:#0e0d1a;
  --field-bg-2:#15122a;
}

@keyframes field-drift{
  0%{ background-position: 80% 10%; }
  100%{ background-position: 60% 20%; }
}

body {
  /* your originals */
  font-family: "Inter", sans-serif;
  color: #f5f2ff;
  margin: 0;
  padding: 0;

  /* subtle background polish */
  background: radial-gradient(140% 120% at 80% 10%, var(--field-bg-2), var(--field-bg-1) 45%) fixed;
  animation: field-drift 40s ease-in-out infinite alternate;
}


/* Legend block */
.legend {
  background: #1b1830;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  line-height: 1.6;
  font-size: 0.95rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
}

.legend ul {
  list-style-type: disc;
  padding-left: 1.25rem;
}

.legend li {
  margin-bottom: 0.5rem;
}

/* Glyph grid container */
.glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
}

/* Glyph card */
.glyph-card {
  background: #1b1830;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glyph-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.5);
}

.glyph-card img {
  max-width: 140px;
  margin-bottom: 1rem;
}

/* Glyph title + tag */
.glyph-card h3 {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 1.1rem;
  color: #e3dfff;
}

.glyph-card .tag {
  display: inline-block;
  background: #4b4377;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.glyph-card p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #d2cde9;
}

/* Resolve Creed Accordion */
.creed-accordion {
  max-width: 1100px;
  margin: 1rem auto 2rem auto;
  padding: 0 1rem;
}

.creed-accordion details {
  background: #1b1830;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  overflow: hidden;
}

.creed-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
}

.creed-accordion summary::-webkit-details-marker { display: none; }

.creed-accordion .caret {
  width: 10px; height: 10px;
  border-right: 2px solid #cfc9f6;
  border-bottom: 2px solid #cfc9f6;
  transform: rotate(45deg);
  transition: transform 180ms ease;
  margin-right: 2px;
}

.creed-accordion details[open] .caret {
  transform: rotate(-135deg);
}

.creed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0 1.1rem 1.1rem 1.1rem;
}

@media (min-width: 760px) {
  .creed-grid { grid-template-columns: 1fr 1fr; }
}

.creed-card {
  background: #231e3d;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.creed-card h4 {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  color: #e9e4ff;
  letter-spacing: 0.2px;
}

.creed-card ul {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.5;
  color: #d5cffa;
  font-size: 0.92rem;
}

.creed-card.solemn { border-left: 3px solid #7d6df1; }
.creed-card.tompaul { border-left: 3px solid #c084fc; }

/* Deep-link anchors */
.anchor-wrap {
  position: relative;
}
.copy-anchor {
  position: absolute;
  top: 10px; right: 10px;
  background: #2a244a; color: #e9e4ff;
  border: 0; border-radius: 10px;
  padding: 6px 10px; font-size: 12px;
  opacity: 0.0; transition: opacity .15s ease;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.anchor-wrap:hover .copy-anchor { opacity: 1; }
.copy-anchor:active { transform: translateY(1px); }
.copy-anchor.copied { background:#3a9853; }


/* Map legacy/new class names so either works */
.glyph-grid, .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
}

.glyph-card, .card {
  background: #1b1830;
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glyph-card:hover, .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.5);
}

.glyph-card img, .card img {
  max-width: 140px;
  margin-bottom: 1rem;
}

.glyph-card h3, .card .title {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 1.1rem;
  color: #e3dfff;
}

.glyph-card .tag, .card .tag {
  display: inline-block;
  background: #4b4377;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.glyph-card p, .card .desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #d2cde9;
}

/* Anchor/copy button (from earlier) */
.anchor-wrap { position: relative; }
.copy-anchor {
  position: absolute; top: 10px; right: 10px;
  background: #2a244a; color: #e9e4ff;
  border: 0; border-radius: 10px; padding: 6px 10px; font-size: 12px;
  opacity: 0; transition: opacity .15s ease; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.anchor-wrap:hover .copy-anchor { opacity: 1; }
.copy-anchor:active { transform: translateY(1px); }
.copy-anchor.copied { background:#3a9853; }

/* Fix glyph image stretching */
.card .imgbox,
.glyph-card .imgbox {
  display: flex;
  align-items: center;
  justify-content: center;
  /* make a nice square well for any aspect ratio */
  aspect-ratio: 1 / 1;
  background: #f5efe2;       /* matches your tan paper vibe */
  border-radius: 10px;
  padding: 10px;
}

/* scale images proportionally within the well */
.card .imgbox img,
.glyph-card .imgbox img {
  width: 90%;
  height: auto;
  max-height: 90%;
  object-fit: contain;        /* never stretch */
  display: block;
  margin: 0 auto;
}

/* OVERRIDE the old 140px cap so images can scale in the box */
.card .imgbox img,
.glyph-card .imgbox img {
  max-width: 100% !important;
  width: 90%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Ensure the image well exists and centers content */
.card .imgbox,
.glyph-card .imgbox {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  /* If you don’t want a second “tan” behind the already-tan PNGs,
     set background: transparent; otherwise keep the soft paper tone: */
  background: transparent;  /* or #f5efe2 */
  border-radius: 10px;
  padding: 10px;
}

/* DEBUG: show the copy button so we can see it */
.anchor-wrap { position: relative; }          /* ensure positioning context */
.copy-anchor {
  position: absolute;
  top: 10px; right: 10px;
  background: #2a244a; color: #e9e4ff;
  border: 0; border-radius: 10px;
  padding: 6px 10px; font-size: 12px;
  opacity: 1;                  /* <— force visible */
  z-index: 5;                  /* make sure it's above the card */
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  cursor: pointer;
}


.copy-anchor { opacity: 0; transition: opacity .15s ease; }
.anchor-wrap:hover .copy-anchor { opacity: 1; }
.copy-anchor:active { transform: translateY(1px); }
.copy-anchor.copied { background:#3a9853; }


/* Always 1 column for creed content (no squeeze) */
.creed-grid {
  display: grid;
  grid-template-columns: 1fr;     /* <- remove 2-col behavior */
  gap: 1rem;
  padding: 0 1.1rem 1.1rem 1.1rem;
}

/* Delete or comment out this media query if present */
@media (min-width: 760px) {
  /* .creed-grid { grid-template-columns: 1fr 1fr; } */
}

/* Creed Modal */
.creed-modal { 
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
}
.creed-modal[aria-hidden="false"] { display: flex; }

.creed-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 6, 20, 0.65);
  backdrop-filter: blur(2px);
}

.creed-dialog {
  position: relative;
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #1b1830;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,.55);
  padding: 1.1rem 1.1rem 1.2rem;
}

.creed-title {
  margin: 0 0 .8rem 0;
  text-align: center;
  color: #e9e4ff;
  letter-spacing: .3px;
}

.creed-close {
  position: absolute; top: 8px; right: 8px;
  border: 0; border-radius: 10px;
  background: #2a244a; color: #e9e4ff;
  width: 32px; height: 32px; line-height: 32px;
  cursor: pointer;
}

.creed-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) { .creed-columns { grid-template-columns: 1fr; } }

.creed-card {
  background: #231e3d;
  border-radius: 12px;
  padding: .9rem 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  color: #d5cffa;
  font-size: .95rem;
  line-height: 1.55;
}
.creed-card h4 {
  margin: 0 0 .4rem 0;
  color: #e9e4ff;
  font-size: .98rem;
}
.creed-card.solemn { border-left: 3px solid #7d6df1; }
.creed-card.tompaul { border-left: 3px solid #c084fc; }

.open-creed {
  display: inline-block;
  background: #4b4377; color: #fff;
  border: 0; border-radius: 10px;
  padding: .45rem .75rem;
  font-size: .9rem; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.open-creed:hover { filter: brightness(1.05); }


/* ========= Field Polish Pack ========= */

/* CSS variables for subtle palette */

/* 🌀 Interconnected Weave (barely visible) */
body::before{
  content:"";
  position:fixed; inset:0; pointer-events:none;
  background-image:
    linear-gradient(transparent 97%, rgba(255,255,255,0.03) 100%),
    linear-gradient(90deg, transparent 97%, rgba(255,255,255,0.03) 100%);
  background-size: 28px 28px, 28px 28px;
  opacity:.25;
  mix-blend-mode: normal;
  z-index:0;
}

/* Ensure main content floats above weave */
.legend, .grid, .creed-accordion { position:relative; z-index:1; }

/* Card base hover lift (already present; keep refined) */
.card{
  background: var(--card-bg);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,.5);
}

/* 🌊 Hover Ripples (concentric wave from center) */
.card{
  position:relative;
  overflow:hidden; /* contain ripple */
}
.card::after{
  content:"";
  position:absolute; inset:0;
  margin:auto;
  width:40px; height:40px; border-radius:999px;
  background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,0) 65%);
  opacity:0; transform: scale(.2);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events:none;
}
.card:hover::after{
  opacity:.9; transform: scale(7);
}

/* ✨ Resonant Glows per glyph (ambient/pulsing) */
.card{ box-shadow: 0 6px 16px rgba(0,0,0,.4); }

/* default soft aura */
.card[data-glyph]{
  outline:1px solid rgba(255,255,255,0.04);
  box-shadow:
    0 6px 16px rgba(0,0,0,.4),
    0 0 0 0 rgba(125,109,241,0);
}

/* Resolve — steady pulse */
@keyframes aura-pulse{ 0%{box-shadow: 0 0 0 0 rgba(125,109,241,.22);} 100%{box-shadow: 0 0 18px 4px rgba(125,109,241,.10);} }
.card[data-glyph="resolve"]:hover{
  animation: aura-pulse 1600ms ease-in-out infinite alternate;
}

/* ThoughtThought — shimmering shift */
@keyframes aura-shimmer{
  0%{ box-shadow: 0 0 12px 2px rgba(192,132,252,.10); filter: hue-rotate(0deg) }
  100%{ box-shadow: 0 0 16px 4px rgba(192,132,252,.16); filter: hue-rotate(6deg) }
}
.card[data-glyph="thoughtthought"]:hover{
  animation: aura-shimmer 1800ms ease-in-out infinite alternate;
}

/* Origin — dawnish warm aura */
.card[data-glyph="origin"]:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 18px 3px rgba(244,220,178,.16);
}

/* Braid — balanced violet aura */
.card[data-glyph="braid"]:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 18px 3px rgba(125,109,241,.14);
}

/* Remembers — soft memory glow */
.card[data-glyph="remembers"]:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 18px 3px rgba(233,228,255,.12);
}

/* Emergence — playful wobble */
@keyframes wobble-aura{
  0%{ transform: translateY(-3px) rotate(-.2deg);}
  100%{ transform: translateY(-1px) rotate(.2deg);}
}
.card[data-glyph="emergence"]:hover{
  animation: wobble-aura 900ms ease-in-out infinite alternate;
  box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 18px 3px rgba(125,109,241,.12);
}

/* Gentle Braid — calm widen glow */
.card[data-glyph="gentle-braid"]:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 18px 3px rgba(158,148,230,.13);
}

/* 🔮 Whispering Notes (tool-tip style, on hover) */
.card[data-whisper]{
  --whisper-w: 220px;
}.creed-modal
.card[data-whisper]::before{.creed-modal
  content: attr(data-whisper);.creed-modal
  position:absolute; z-index:3;
  left:50%; top:10px; transform: translate(-50%, -12px);
  min-width: var(--whisper-w);
  max-width: min(70vw, 300px);
  background: var(--whisper-bg);
  color:#e9e4ff;
  padding:.45rem .6rem;
  border-radius:10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07);
  font-size:.82rem; line-height:1.25;
  opacity:0; pointer-events:none;
  transition: opacity .15s ease, transform .15s ease;
}
.card[data-whisper]:hover::before{
  opacity:1; transform: translate(-50%, -18px);
}

/* tiny triangle pointer */
.card[data-whisper]::after{
  content:"";
  position:absolute; left:50%; top:24px; transform: translateX(-50%);
  width:10px; height:10px;
  background: var(--whisper-bg);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  opacity:0; transition: opacity .15s ease, top .15s ease;
}
.card[data-whisper]:hover::after{
  top:28px; opacity:1;
}

/* --- MODAL REPAIR KIT --- */
.creed-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; }
.creed-modal[aria-hidden="false"] { display: flex; }
.creed-backdrop { position: absolute; inset: 0; z-index: 1; background: rgba(8,6,20,.65); backdrop-filter: blur(2px); }
.creed-dialog { position: relative; z-index: 2; }

/* === MODAL REPAIR KIT (guarantees popups overlay correctly) === */

/* If you have this line anywhere, change it to REMOVE .creed-modal from it:
   .legend, .grid, .creed-accordion, .creed-modal { position:relative; z-index:1; }
   -> replace with: */
.legend, .grid, .creed-accordion { position: relative; z-index: 1; }

/* Make sure the modal stays on top */
.creed-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.creed-modal[aria-hidden="false"] { display: flex; }

.creed-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(8,6,20,.65);
  backdrop-filter: blur(2px);
}
.creed-dialog {
  position: relative;
  z-index: 2;
}


/* Subtle hover polish for glyph cards only */
.glyph-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: all 0.25s ease;
}
.glyph-card img {
  transition: transform 0.4s ease;
}
.glyph-card:hover img {
  transform: scale(1.05);
}



/* Modal title hover polish */
.creed-title{
  transition: color .25s ease, text-shadow .25s ease, transform .25s ease;
}
.creed-title:hover{
  color: #f4dcb2; /* soft gold */
  text-shadow: 0 0 6px rgba(244,220,178,.55);
  cursor: pointer; /* looks tappable even if you don't make it close */
  transform: translateY(-1px);
}

/* ===== Whisper hover effect ===== */


/* ===== Glyph Whisper Hover ===== */
.card[data-whisper] {
  position: relative;
}

.card[data-whisper]::after {
  content: attr(data-whisper);
  position: absolute;
  top: -2rem;                /* float above the card */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34, 34, 68, 0.95);
  color: #f5f2ff;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.card[data-whisper]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* === Whisper reset + pill (definitive) === */

/* 1) Reset any generic ::after on cards so no triangles leak through */
.card::after { 
  content: none !important;
}

/* 2) Re-declare the real whisper only for cards that have data-whisper */
.card[data-whisper] { position: relative; }

.card[data-whisper]::after {
  content: attr(data-whisper) !important;
  display: inline-block;
  width: max-content;
  max-width: 90%;
  height: auto;
  clip-path: none !important;

  position: absolute;
  top: -2rem;                /* floats above the card */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34,34,68,.95);
  color: #f5f2ff;
  padding: .35rem .75rem;
  border-radius: 6px;
  font-size: .82rem;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 10;
}

.card[data-whisper]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* === Whisper pill tweak === */
.card[data-whisper]::after {
  display: inline-block;          /* shrink to fit text */
  width: auto;                    /* no forced width */
  max-width: 280px;               /* keeps long phrases readable */
  line-height: 1.3;               /* comfy spacing */
  white-space: normal;            /* allow gentle wrapping */
  text-align: center;             /* centered text inside pill */
  padding: 0.35rem 0.75rem;
  border-radius: 999px;           /* makes it a pill shape */
}

/* === Whisper: force compact chip, not full-height overlay === */
.card[data-whisper] { position: relative; }

.card[data-whisper]::after {
  /* content + positioning */
  content: attr(data-whisper) !important;
  position: absolute !important;
  top: -1.25rem !important;          /* sits just above the image/card */
  left: 50% !important;
  right: auto !important;            /* clear any previous inset rules */
  bottom: auto !important;
  transform: translateX(-50%) !important;

  /* SIZE — make it hug the text */
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;    /* one-line chip; change to normal to allow wrap */
  padding: 0.3rem 0.75rem !important;
  box-sizing: border-box !important;

  /* LOOK */
  background: rgba(34,34,68,.95) !important;
  color: #f5f2ff !important;
  border-radius: 999px !important;   /* true pill */
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07) !important;

  /* INTERACTION */
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity .2s ease, transform .2s ease !important;
  z-index: 10 !important;
}

.card[data-whisper]:hover::after {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(-2px) !important;
}
/* Whisper chip anchored to the image box */
.imgbox[data-whisper] { position: relative; }

.imgbox[data-whisper]::after {
  content: attr(data-whisper) !important;
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  transform: translate(-50%, -110%) !important;  /* sits just above the image */
  display: inline-block !important;
  padding: 0.3rem 0.75rem !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  background: rgba(34,34,68,.95) !important;
  color: #f5f2ff !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07) !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity .2s ease, transform .2s ease !important;
  z-index: 10 !important;
}

.imgbox[data-whisper]:hover::after {
  opacity: 1 !important;
  transform: translate(-50%, -120%) !important;
}

/* Glyph Whisper Hover refinement */
.card[data-whisper]::after {
  content: attr(data-whisper);
  position: absolute;
  top: -1.5rem;           /* sit neatly above the card */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34, 34, 68, 0.95);
  color: #f5f2ff;
  font-size: 0.8rem;       /* compact text */
  font-weight: 500;
  padding: 0.25rem 0.5rem; /* pill shape */
  border-radius: 6px;
  white-space: nowrap;     /* single line */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.card[data-whisper]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px); /* gentle float */
}

.card .caption {
  display: block;
  margin: 0.3em 0 0.6em;
  font-size: 0.9rem;
  font-style: italic;
  color: #c9b6ff; /* soft resonance violet */
}

/* === Whisper chip anchored to the image (final) === */
.imgbox[data-whisper] { position: relative; }

.imgbox[data-whisper]::after {
  content: attr(data-whisper) !important;

  /* anchor just above the image */
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  transform: translate(-50%, -10px) !important; /* adjust this -10px to move closer/farther */

  /* compact pill */
  display: inline-block !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  padding: 0.28rem 0.6rem !important;
  border-radius: 999px !important;

  /* look */
  background: rgba(34,34,68,.95) !important;
  color: #f5f2ff !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.07) !important;

  /* behavior */
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity .2s ease, transform .2s ease !important;
  z-index: 20 !important;
}

.imgbox[data-whisper]:hover::after {
  opacity: 1 !important;
  transform: translate(-50%, -14px) !important; /* tiny float on hover */
}

.legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legend li {
  margin: 0.4em 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.legend li::before {
  content: "•";
  color: #a98bff; /* soft resonance violet */
  margin-right: 0.5em;
}

/* Stronger specificity so it wins */
#glyph-legend ul { 
  list-style: none !important; 
  padding: 0 !important; 
  margin: 0 !important; 
}

#glyph-legend li { 
  margin: 0.2em 0 !important; 
  line-height: 1.2 !important; 
  font-size: 0.75rem !important; 
}

/* Custom bullet */
#glyph-legend li::before {
  content: "•";
  color: #a98bff;
  margin-right: 0.5em;
}

.tag.open-creed {
  cursor: pointer;
}

img[data-tooltip] {
  position: relative;
}

img[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%; /* above the image */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40, 30, 60, 0.95); /* dark purple bg */
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;   /* ~50% smaller than normal text */
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}

img[data-tooltip]:hover::after {
  opacity: 1;
}

.tooltip-img {
  position: relative;
}

.tooltip-img::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;           /* tooltip appears above image */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40, 30, 60, 0.95); /* dark purple background */
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;      /* about 50% smaller */
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.tooltip-img:hover::after {
  opacity: 1;
}

footer.codex-footer {
  margin-top: 4em;
  border-top: 1px solid #533d64;
  padding-top: 1em;
  font-size: 0.9em;
  color: #a999c2;
  text-align: center;
}












