/* Brighter engraved runes frame content through protected negative space. */
:root {
  --rune-colour:#647f0a;
  --rune-gold:#ae680c;
  --rune-rest:.20;
  --rune-peak:.67;
}
:root[data-theme="night"] {
  --rune-colour:#ccff00;
  --rune-gold:#ffc526;
  --rune-rest:.18;
  --rune-peak:.72;
}
.rune-section { position:relative; }
/* No section stacking context: semantic labels stay above the shared WebGL canvas. */
.rune-field { position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; user-select:none; }
.ambient-rune {
  position:absolute;
  top:var(--rune-y);
  width:min(var(--rune-size), 3.5vw);
  aspect-ratio:1;
  height:auto;
  overflow:visible;
  fill:none;
  stroke:currentColor;
  stroke-width:1.55;
  stroke-linecap:square;
  stroke-linejoin:miter;
  color:var(--rune-colour);
  opacity:var(--rune-rest);
  filter:drop-shadow(0 0 3px currentColor);
  animation:rune-ember var(--rune-duration) ease-in-out var(--rune-delay) infinite;
  animation-play-state:paused;
}
.rune-left { left:.5%; }
.rune-right { right:.5%; }
.rune-gold { color:var(--rune-gold); }
.rune-crown,.rune-floor { left:var(--rune-x); width:34px; transform:translateX(-50%); }
.rune-crown { top:12px; }
.rune-floor { top:auto; bottom:14px; }
.hero .rune-crown { top:6px; width:28px; }
.clearing-section .rune-floor { width:26px; bottom:8px; }
.runes-visible .ambient-rune { animation-play-state:running; }
.closing .rune-field { --rune-colour:#ccff00; --rune-gold:#ffc526; --rune-rest:.18; --rune-peak:.72; }
@keyframes rune-ember {
  0%, 16%, 79%, 100% { opacity:var(--rune-rest); }
  43%, 52% { opacity:var(--rune-peak); }
}
[data-motion="paused"] .ambient-rune,
.runes-dormant .ambient-rune { animation:none; opacity:var(--rune-rest); }
@media (max-width:780px) {
  .ambient-rune { width:min(18px,4vw); stroke-width:1.8; --rune-peak:.68; filter:drop-shadow(0 0 1px currentColor); }
  .rune-left { left:0; }
  .rune-right { right:0; }
  .rune-crown,.rune-floor { width:21px; }
  .rune-crown,.hero .rune-crown { top:5px; width:21px; }
  .rune-floor,.clearing-section .rune-floor { bottom:6px; width:21px; }
}
@media (prefers-reduced-motion:reduce) {
  .ambient-rune { animation:none !important; opacity:var(--rune-rest); filter:none; }
}
@media (forced-colors:active), print {
  .rune-field { display:none; }
}
