/* ───────────────────────────────────────────────
   CODEX RUNARUM
   ─────────────────────────────────────────────── */

.codex-runarum .content-box{
  background: rgba(0,0,0,.34);
}

.codex-runarum .codex-label{
  color:#d8d8e8;
}

.codex-runarum .section-label{
  color:#cfd2ff;
}

.runarum-intro{
  margin-top:.6rem;
  text-align:center;
}

.runarum-lede{
  max-width:74ch;
  margin:.75rem auto 0;
  color:rgba(230,231,232,.82);
  font-size:.98rem;
  line-height:1.55;
}

.runarum-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  margin-top:1.2rem;
}

@media (min-width: 980px){
  .runarum-grid{
    grid-template-columns:1fr 1fr;
    gap:1.2rem;
  }
  .runarum-span-2{
    grid-column:1 / -1;
  }
}

.runarum-note{
  margin-top:0;
  color:rgba(230,231,232,.78);
  font-size:.95rem;
  line-height:1.55;
}

.runarum-quiet-note{
  text-align:center;
  opacity:.86;
}

.runarum-aett-intro{
  margin-top:.35rem;
  color:rgba(230,231,232,.76);
  font-size:.94rem;
  line-height:1.55;
}

.runarum-panels{
  display:grid;
  gap:1rem;
  margin-top:.8rem;
}

.runarum-panel{
  border-radius:14px;
  border:1px solid rgba(252,234,187,.12);
  background:rgba(0,0,0,.10);
  overflow:hidden;
}

.runarum-panel[open]{
  border-color:rgba(252,234,187,.20);
  box-shadow:0 8px 18px rgba(0,0,0,.20);
}

.runarum-panel > summary{
  list-style:none;
  cursor:pointer;
  padding:.85rem .95rem;
  display:flex;
  align-items:center;
  gap:.6rem;
  user-select:none;
  font-weight:600;
  letter-spacing:.01em;
}

.runarum-panel > summary::-webkit-details-marker{
  display:none;
}

.runarum-panel > summary::marker{
  content:"";
}

.panel-dot{
  width:.55rem;
  height:.55rem;
  border-radius:999px;
  background:rgba(252,234,187,.60);
  box-shadow:0 0 10px rgba(252,234,187,.14);
  flex:0 0 auto;
}

.panel-content{
  padding:.2rem .95rem 1rem;
  color:rgba(230,231,232,.84);
}

.grid-two{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
}

@media (min-width: 860px){
  .grid-two{
    grid-template-columns:1fr 1fr;
  }
}

.aett-label{
  font-weight:600;
  letter-spacing:.01em;
}

.aett-sub{
  color:rgba(230,231,232,.72);
  font-size:.92rem;
  margin-left:.35rem;
}

.runarum-mirror-box{
  margin:1rem 0 0;
}

.micro-note{
  margin:.25rem 0 .6rem;
  color:rgba(230,231,232,.72);
  font-size:.92rem;
}

.mirror-meta{
  color:rgba(230,231,232,.78);
  font-size:.95rem;
  line-height:1.5;
}

.reveal-btn{
  display:inline-block;
  padding:.8rem 1.2rem;
  border-radius:999px;
  border:1px solid #6a5f4c;
  background:#524632;
  color:#fceabb;
  cursor:pointer;
  transition: transform .08s ease-in-out;
  margin-top:.6rem;
}

.reveal-btn:active{
  transform: scale(.98);
}

.flip-stage{
  perspective: 900px;
  width:100%;
  display:flex;
  justify-content:center;
}

.rune-glyph{
  font-size:4rem;
  line-height:1;
  margin:.25rem auto .75rem;
  user-select:none;
  display:inline-block;
  transform-style:preserve-3d;
}

.rune-glyph.flip{
  animation: coinflip .45s ease-in-out both;
}

@keyframes coinflip {
  0%   { transform: rotateY(0deg) scale(1); filter:brightness(1); }
  50%  { transform: rotateY(90deg) scale(0.98); filter:brightness(1.15); }
  100% { transform: rotateY(180deg) scale(1); filter:brightness(1); }
}

.save-box{
  margin-top:1rem;
  text-align:left;
}

.save-box textarea{
  width:100%;
  min-height:88px;
  resize:vertical;
  background:#15130f;
  color:#f7f4e9;
  border:1px solid #555;
  border-radius:10px;
  padding:.6rem;
  font-family:Georgia,serif;
}

.save-row{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  align-items:center;
  margin-top:.6rem;
}

.save-row .btn{
  cursor:pointer;
  background:#524632;
  color:#fceabb;
  border:1px solid #6a5f4c;
  padding:.55rem .9rem;
  border-radius:999px;
  white-space:nowrap;
}

.btn.btn-ghost{
  background:transparent;
}

.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:1.2rem;
  background:#2c2520;
  color:#f7f4e9;
  border:1px solid #5a5146;
  padding:.55rem .8rem;
  border-radius:9px;
  display:none;
  z-index:9999;
}

@media (max-width:640px){
  .rune-glyph{
    font-size:3.25rem;
  }
  .save-row .btn{
    width:100%;
    text-align:center;
  }
}

.rune-scroll-head-box{
  text-align:center;
  border-left:3px solid rgba(252,234,187,.20);
}

.rune-header-mark{
  font-size:2.8rem;
  line-height:1;
  margin:0 0 .35rem;
  color:#e7e7f2;
}

.rune-scroll-title{
  margin:.1rem 0 0;
  color:#fceabb;
  font-size:1.35rem;
}

.rune-subtitle{
  max-width:58ch;
  margin:.5rem auto 0;
  color:rgba(230,231,232,.80);
  line-height:1.55;
}

/* ───────────────────────────────────────────────
   RUNARUM HEADER MARK
   ─────────────────────────────────────────────── */

.runarum-mark-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:999px;
  padding:.35rem;
  margin-bottom:.35rem;
}

.runarum-mark-link:focus-visible{
  outline:2px solid rgba(252,234,187,.85);
  outline-offset:4px;
  border-radius:999px;
}

.runarum-mark{
  position:relative;
  width:138px;
  height:138px;
  display:inline-block;
  border-radius:50%;
  filter:drop-shadow(0 0 10px rgba(207,210,255,.10));
}

.runarum-ring,
.runarum-aura,
.runarum-axis,
.runarum-star{
  position:absolute;
  display:block;
  box-sizing:border-box;
}

.runarum-ring-outer{
  top:0;
  right:0;
  bottom:0;
  left:0;
  border:2px solid rgba(207,210,255,.82);
  border-radius:50%;
  opacity:.95;
}

.runarum-ring-inner{
  top:11px;
  right:11px;
  bottom:11px;
  left:11px;
  border:1px solid rgba(207,210,255,.32);
  border-radius:50%;
  opacity:.9;
}

.runarum-aura{
  top:50%;
  left:50%;
  width:86px;
  height:86px;
  margin-left:-43px;
  margin-top:-43px;
  border-radius:50%;
  background:radial-gradient(
    circle,
    rgba(207,210,255,.12) 0%,
    rgba(207,210,255,.06) 38%,
    rgba(207,210,255,0) 72%
  );
  animation:runarum-breathe 8.4s ease-in-out infinite;
}

.runarum-axis{
  top:24px;
  left:50%;
  width:1px;
  height:90px;
  margin-left:-0.5px;
  background:linear-gradient(
    to bottom,
    rgba(207,210,255,0) 0%,
    rgba(207,210,255,.45) 24%,
    rgba(207,210,255,.82) 50%,
    rgba(207,210,255,.34) 78%,
    rgba(207,210,255,0) 100%
  );
  border-radius:999px;
  opacity:.9;
}

.runarum-glyph-mark{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  color:#e7e7f2;
  font-size:3.2rem;
  line-height:1;
  text-shadow:
    0 0 10px rgba(207,210,255,.14),
    0 0 22px rgba(207,210,255,.08);
  animation:runarum-glyph-pulse 7.2s ease-in-out infinite;
}

.runarum-star{
  width:4px;
  height:4px;
  border-radius:50%;
  background:#fceabb;
  box-shadow:0 0 8px rgba(252,234,187,.22);
  animation:runarum-twinkle 6.6s ease-in-out infinite;
}

.runarum-star-1{
  top:31px;
  right:34px;
  animation-delay:.3s;
}

.runarum-star-2{
  top:45px;
  left:36px;
  animation-delay:1.4s;
}

.runarum-star-3{
  bottom:34px;
  left:50%;
  margin-left:-2px;
  animation-delay:2.6s;
}

.runarum-mark::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:96px;
  height:96px;
  margin-left:-48px;
  margin-top:-48px;
  border:1px solid rgba(207,210,255,.10);
  border-radius:50%;
  animation:runarum-breathe 10.2s ease-in-out infinite;
}

.runarum-mark-link:hover .runarum-mark,
.runarum-mark-link:focus-visible .runarum-mark{
  filter:drop-shadow(0 0 16px rgba(207,210,255,.12));
}

@keyframes runarum-breathe{
  0%,100%{
    transform:scale(1);
    opacity:.74;
  }
  50%{
    transform:scale(1.05);
    opacity:1;
  }
}

@keyframes runarum-glyph-pulse{
  0%,100%{
    transform:translate(-50%,-50%) scale(1);
    opacity:.88;
  }
  50%{
    transform:translate(-50%,-50%) scale(1.05);
    opacity:1;
  }
}

@keyframes runarum-twinkle{
  0%,100%{
    opacity:.28;
    transform:scale(1);
  }
  50%{
    opacity:.82;
    transform:scale(1.22);
  }
}

@media (prefers-reduced-motion: reduce){
  .runarum-aura,
  .runarum-glyph-mark,
  .runarum-star,
  .runarum-mark::before{
    animation:none !important;
  }
}