/* Oracle Chur Rune Decode V138.
   Chur seal -> runes -> words. One animation layer only. */

/* Kill old rune decode visual layers if cached */
body.oracle-clean-v7b .oracle-rune-decode-shell-v133,
body.oracle-clean-v7b .oracle-rune-decode-shell-v134,
body.oracle-clean-v7b .oracle-rune-wait-v134,
body.oracle-clean-v7b .oracle-v135-wait,
body.oracle-clean-v7b .oracle-v135-shell{
  display:none !important;
}

/* Keep result blocks growing naturally. No inner scroll circus. */
body.oracle-clean-v7b .oracle-output,
body.oracle-clean-v7b [data-oracle-output],
body.oracle-clean-v7b [data-oracle-result-output],
body.oracle-clean-v7b .oracle-result,
body.oracle-clean-v7b .oracle-chur-v138-shell,
body.oracle-clean-v7b .oracle-chur-v138-wait{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow-y:visible !important;
  overscroll-behavior-y:auto !important;
  touch-action:pan-y !important;
}

/* Hide raw old output while Chur ritual owns this stage */
body.oracle-clean-v7b .oracle-output.oracle-chur-v138-capture > *:not(.oracle-chur-v138-wait):not(.oracle-chur-v138-shell),
body.oracle-clean-v7b [data-oracle-output].oracle-chur-v138-capture > *:not(.oracle-chur-v138-wait):not(.oracle-chur-v138-shell),
body.oracle-clean-v7b [data-oracle-result-output].oracle-chur-v138-capture > *:not(.oracle-chur-v138-wait):not(.oracle-chur-v138-shell),
body.oracle-clean-v7b .oracle-result.oracle-chur-v138-capture > *:not(.oracle-chur-v138-wait):not(.oracle-chur-v138-shell){
  visibility:hidden !important;
  opacity:0 !important;
  animation:none !important;
  transition:none !important;
}

/* Waiting container */
body.oracle-clean-v7b .oracle-chur-v138-wait{
  position:relative;
  min-height:310px;
  display:grid;
  place-items:center;
  padding:30px 24px 34px;
  border-radius:30px;
  border:1px solid rgba(233,210,160,.28);
  background:
    radial-gradient(circle at 50% 38%, rgba(233,210,160,.12), transparent 34%),
    radial-gradient(circle at 50% 46%, rgba(0,0,0,.76), rgba(8,12,22,.62) 38%, rgba(5,10,20,.90) 100%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.10));
  box-shadow:
    0 24px 70px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.045);
  overflow:hidden !important;
}

/* faint ritual lines */
body.oracle-clean-v7b .oracle-chur-v138-wait::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(120deg, transparent 0 47%, rgba(233,210,160,.045) 48%, transparent 50%),
    linear-gradient(60deg, transparent 0 49%, rgba(151,191,230,.035) 50%, transparent 52%);
  opacity:.42;
  pointer-events:none;
}

body.oracle-clean-v7b .oracle-chur-v138-stage{
  position:relative;
  width:260px;
  height:230px;
  display:grid;
  place-items:center;
  z-index:2;
}

body.oracle-clean-v7b .oracle-chur-v138-seal{
  position:relative;
  width:142px;
  height:188px;
  transform-origin:center;
  animation:
    oracleChurBreathV138 2.8s ease-in-out infinite,
    oracleChurSwayV138 5.8s ease-in-out infinite;
  filter:drop-shadow(0 0 18px rgba(233,210,160,.22));
}

body.oracle-clean-v7b .oracle-chur-v138-seal svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  overflow:visible;
}

body.oracle-clean-v7b .oracle-chur-v138-line{
  fill:none;
  stroke:#dfbc78;
  stroke-width:4.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.88;
  filter:drop-shadow(0 0 8px rgba(233,210,160,.24));
  stroke-dasharray:420;
  stroke-dashoffset:420;
  animation:oracleChurDrawV138 1.25s cubic-bezier(.22,.84,.24,1) forwards;
}

body.oracle-clean-v7b .oracle-chur-v138-line:nth-child(2){ animation-delay:.10s; }
body.oracle-clean-v7b .oracle-chur-v138-line:nth-child(3){ animation-delay:.20s; }
body.oracle-clean-v7b .oracle-chur-v138-line:nth-child(4){ animation-delay:.30s; }
body.oracle-clean-v7b .oracle-chur-v138-line:nth-child(5){ animation-delay:.40s; }

body.oracle-clean-v7b .oracle-chur-v138-node{
  position:absolute;
  left:var(--x);
  top:var(--y);
  transform:translate(-50%, -50%) scale(.88);
  color:#f4e2b8;
  font-size:var(--s);
  line-height:1;
  text-shadow:
    0 0 12px rgba(233,210,160,.55),
    0 0 26px rgba(207,161,91,.18);
  opacity:0;
  animation:oracleChurRuneArriveV138 .9s cubic-bezier(.2,.82,.22,1) forwards;
  animation-delay:var(--d);
}

body.oracle-clean-v7b .oracle-chur-v138-halo{
  position:absolute;
  width:190px;
  height:190px;
  border-radius:50%;
  border:1px solid rgba(233,210,160,.16);
  box-shadow:
    0 0 38px rgba(233,210,160,.12),
    inset 0 0 38px rgba(0,0,0,.30);
  opacity:.62;
  animation:oracleChurHaloV138 3.2s ease-in-out infinite;
}

/* Flying runes at release stage */
body.oracle-clean-v7b .oracle-chur-v138-flight{
  position:absolute;
  left:50%;
  top:48%;
  color:#f4e2b8;
  font-size:16px;
  line-height:1;
  text-shadow:
    0 0 14px rgba(233,210,160,.68),
    0 0 32px rgba(207,161,91,.25);
  opacity:0;
  pointer-events:none;
  transform:translate(-50%, -50%);
}

body.oracle-clean-v7b .oracle-chur-v138-shell.is-releasing .oracle-chur-v138-flight{
  animation:oracleChurFlightV138 1.25s cubic-bezier(.19,.82,.24,1) forwards;
  animation-delay:var(--d);
}

/* Waiting text */
body.oracle-clean-v7b .oracle-chur-v138-wait-text{
  position:absolute;
  left:22px;
  right:22px;
  bottom:24px;
  z-index:3;
  text-align:center;
  color:rgba(255,241,210,.78);
  line-height:1.55;
}

body.oracle-clean-v7b .oracle-chur-v138-wait-text b{
  display:block;
  margin-bottom:5px;
  font-family:Forum, Georgia, serif;
  font-size:28px;
  font-weight:400;
  color:#fff0c8;
}

body.oracle-clean-v7b .oracle-chur-v138-wait-text span{
  display:block;
  font-size:14px;
  color:rgba(255,241,210,.68);
}

body.oracle-clean-v7b .oracle-chur-v138-wait-text button{
  margin-top:13px;
  min-height:36px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(233,210,160,.34);
  background:rgba(0,0,0,.22);
  color:#ffe8ad;
  cursor:pointer;
}

/* Final shell */
body.oracle-clean-v7b .oracle-chur-v138-shell{
  position:relative;
  padding:8px 0 0;
  overflow:visible !important;
}

body.oracle-clean-v7b .oracle-chur-v138-head{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 20px;
  animation:oracleChurHeadInV138 .75s ease both;
}

body.oracle-clean-v7b .oracle-chur-v138-mini{
  flex:0 0 auto;
  width:44px;
  height:58px;
  opacity:.72;
  filter:drop-shadow(0 0 12px rgba(233,210,160,.18));
}

body.oracle-clean-v7b .oracle-chur-v138-mini svg{
  width:100%;
  height:100%;
  overflow:visible;
}

body.oracle-clean-v7b .oracle-chur-v138-mini path{
  fill:none;
  stroke:#dfbc78;
  stroke-width:5;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.82;
}

body.oracle-clean-v7b .oracle-chur-v138-note{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(233,210,160,.30);
  background:rgba(0,0,0,.20);
  color:#ffe8ad;
  font-size:12px;
  letter-spacing:.13em;
  text-transform:uppercase;
}

body.oracle-clean-v7b .oracle-chur-v138-block{
  position:relative;
  margin:0 0 1.18em;
  overflow:visible;
}

body.oracle-clean-v7b .oracle-chur-v138-cloud{
  position:absolute;
  left:0;
  top:.08em;
  right:0;
  color:rgba(244,226,184,.56);
  letter-spacing:.16em;
  line-height:1.65;
  white-space:nowrap;
  overflow:hidden;
  opacity:0;
  filter:blur(.4px);
  pointer-events:none;
  animation:oracleChurCloudV138 2.4s ease forwards;
  animation-delay:var(--delay);
}

body.oracle-clean-v7b .oracle-chur-v138-text{
  position:relative;
  margin:0;
  color:rgba(255,242,216,.94);
  font-size:19px;
  line-height:1.74;
  text-shadow:0 0 10px rgba(233,210,160,.055);
  opacity:0;
  transform:translateY(10px);
  filter:blur(5px);
  clip-path:inset(0 100% 0 0);
  animation:
    oracleChurTextInV138 1.05s ease forwards,
    oracleChurTextRevealV138 2.65s cubic-bezier(.19,.82,.22,1) forwards;
  animation-delay:calc(var(--delay) + 1.05s), calc(var(--delay) + 1.05s);
}

body.oracle-clean-v7b .oracle-chur-v138-block:nth-of-type(n+6) .oracle-chur-v138-cloud{
  display:none;
}

body.oracle-clean-v7b .oracle-chur-v138-block:nth-of-type(n+6) .oracle-chur-v138-text{
  clip-path:none;
  animation:
    oracleChurTextInV138 .95s ease forwards;
  animation-delay:calc(var(--delay) + .35s);
}

/* Animations */
@keyframes oracleChurDrawV138{
  to{stroke-dashoffset:0;}
}

@keyframes oracleChurRuneArriveV138{
  0%{
    opacity:0;
    transform:translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(.72) rotate(-12deg);
    filter:blur(4px);
  }
  70%{
    opacity:1;
    transform:translate(-50%, -50%) scale(1.08) rotate(0);
    filter:blur(0);
  }
  100%{
    opacity:.88;
    transform:translate(-50%, -50%) scale(1) rotate(0);
    filter:blur(0);
  }
}

@keyframes oracleChurBreathV138{
  0%,100%{transform:scale(1);}
  50%{transform:scale(1.018);}
}

@keyframes oracleChurSwayV138{
  0%,100%{rotate:-2deg;}
  50%{rotate:2deg;}
}

@keyframes oracleChurHaloV138{
  0%,100%{opacity:.42; transform:scale(.96);}
  50%{opacity:.88; transform:scale(1.05);}
}

@keyframes oracleChurFlightV138{
  0%{
    opacity:0;
    transform:translate(-50%, -50%) scale(.82) rotate(-12deg);
  }
  18%{
    opacity:1;
  }
  100%{
    opacity:0;
    transform:translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.04) rotate(var(--rot));
  }
}

@keyframes oracleChurHeadInV138{
  from{opacity:0; transform:translateY(8px); filter:blur(3px);}
  to{opacity:1; transform:translateY(0); filter:blur(0);}
}

@keyframes oracleChurCloudV138{
  0%{opacity:0; transform:translateY(12px) scale(.98); filter:blur(4px);}
  24%{opacity:.9; transform:translateY(0) scale(1); filter:blur(.4px);}
  74%{opacity:.58;}
  100%{opacity:0; transform:translateY(-7px) scale(1.01); filter:blur(5px);}
}

@keyframes oracleChurTextInV138{
  from{opacity:0; transform:translateY(10px); filter:blur(5px);}
  to{opacity:1; transform:translateY(0); filter:blur(0);}
}

@keyframes oracleChurTextRevealV138{
  from{clip-path:inset(0 100% 0 0);}
  to{clip-path:inset(0 0 0 0);}
}

@media (max-width:760px){
  body.oracle-clean-v7b .oracle-chur-v138-wait{
    min-height:280px;
    padding:24px 18px 32px;
  }

  body.oracle-clean-v7b .oracle-chur-v138-stage{
    width:210px;
    height:200px;
  }

  body.oracle-clean-v7b .oracle-chur-v138-seal{
    width:104px;
    height:138px;
  }

  body.oracle-clean-v7b .oracle-chur-v138-halo{
    width:150px;
    height:150px;
  }

  body.oracle-clean-v7b .oracle-chur-v138-text{
    font-size:17px;
    line-height:1.68;
  }

  body.oracle-clean-v7b .oracle-chur-v138-wait-text b{
    font-size:24px;
  }
}

@media (prefers-reduced-motion: reduce){
  body.oracle-clean-v7b .oracle-chur-v138-line,
  body.oracle-clean-v7b .oracle-chur-v138-node,
  body.oracle-clean-v7b .oracle-chur-v138-seal,
  body.oracle-clean-v7b .oracle-chur-v138-halo,
  body.oracle-clean-v7b .oracle-chur-v138-flight,
  body.oracle-clean-v7b .oracle-chur-v138-cloud,
  body.oracle-clean-v7b .oracle-chur-v138-text,
  body.oracle-clean-v7b .oracle-chur-v138-head{
    animation:none !important;
    opacity:1 !important;
    transform:none !important;
    filter:none !important;
    clip-path:none !important;
  }
}
