/* The hidden interaction is made from the frame itself. */
.dungeon-frame { position: relative; }
.loose-stone { position:absolute; right:24px; bottom:-23px; width:52px; height:44px; padding:0; border:0; background:none; cursor:pointer; color:var(--border-color); z-index:2; }
.loose-stone::before { content:''; position:absolute; top:20px; left:7px; width:38px; height:5px; background:var(--bg-darker); }
.loose-stone span { position:absolute; left:7px; top:23px; width:38px; height:2px; background:currentColor; opacity:.85; transition:transform .3s ease; }
.loose-stone span::before,.loose-stone span::after { content:''; position:absolute; width:1px; height:3px; background:currentColor; bottom:0; }
.loose-stone span::before { left:0; }.loose-stone span::after { right:0; }
.loose-stone:hover span { transform:translateY(2px); }
.frame-open .loose-stone span { transform:translate(8px,5px) rotate(-5deg); }
.stone-recess { position:relative; margin:64px -2px -17px auto; width:min(290px,100%); padding:8px 13px 9px; background:#0a0c0a; border:1px solid var(--border-color); border-bottom:0; color:var(--text-primary); box-shadow:inset 0 5px 14px #0009; }
.stone-recess[hidden],.stone-recess [hidden] { display:none; }
.stone-recess form { display:flex; align-items:center; gap:10px; min-height:40px; }
.stone-recess label { font:22px 'VT323',monospace; }
.stone-recess input { min-width:0; width:100%; background:none; border:none; border-radius:0; color:var(--text-primary); font:18px 'VT323',monospace; outline:none; caret-color:var(--text-primary); }
.stone-recess input::placeholder { color:var(--text-secondary); }
.stone-recess button { flex:0 0 40px; height:40px; border:0; background:none; color:var(--text-primary); font:22px monospace; cursor:pointer; }
.stone-footnote { display:block; font:10px/1.4 'Courier Prime',monospace; color:var(--text-secondary); }
#stone-reply { font:17px/1.5 'VT323',monospace; padding:9px 0; }
.loose-stone:focus-visible,.stone-recess button:focus-visible { outline:1px dashed var(--text-primary); outline-offset:2px; }
.stone-recess:focus-within { border-color:var(--text-primary); }
.stone-golem { position:absolute; left:14px; top:-49px; width:42px; height:49px; color:#9bb58e; pointer-events:none; transition:transform 2.4s linear; }
.stone-golem svg { display:block; overflow:visible; fill:#0a0c0a; stroke:currentColor; stroke-width:1.05; stroke-linecap:square; stroke-linejoin:miter; }
.golem-rock-detail { fill:none; stroke-width:.7; opacity:.65; }
.golem-eyes { fill:currentColor; stroke:none; transform:translate(var(--eye-x,0px),var(--eye-y,0px)); }
.golem-blink .golem-eyes { transform:translate(var(--eye-x,0px),var(--eye-y,0px)) scaleY(.16); transform-origin:25px 20px; }
.golem-scratch-fingers { display:none; fill:none; }
.golem-scratching .golem-arm-right { animation:golem-scratch 1.6s ease-in-out; transform-origin:37px 34px; }
.golem-scratching .golem-scratch-fingers { display:block; }
.golem-scratching .golem-head { animation:golem-tilt 1.6s ease-in-out; transform-origin:25px 29px; }
.golem-walking .golem-foot-left { animation:golem-step .48s steps(2,end) infinite; }
.golem-walking .golem-foot-right { animation:golem-step .48s steps(2,end) -.24s infinite; }
.golem-walking .golem-body { animation:golem-bob .48s steps(2,end) infinite; }
.golem-arriving { overflow:hidden; }
.golem-arriving svg { animation:golem-emerge 1.7s ease-in-out both; }
.golem-arriving .golem-arm-left { animation:golem-climb-left 1.7s ease-in-out; transform-origin:12px 34px; }
.golem-arriving .golem-arm-right { animation:golem-climb-right 1.7s ease-in-out; transform-origin:37px 34px; }
.golem-listening .golem-head { animation:golem-listen 1.6s ease-in-out; transform-origin:25px 29px; }
.golem-curious .golem-head { animation:golem-curious 1.8s ease-in-out; transform-origin:25px 29px; }
.golem-listening .golem-eyes,.golem-curious .golem-eyes { --eye-x:1px; --eye-y:1px; }
.golem-nodding .golem-head { animation:golem-nod 1.8s ease-in-out; transform-origin:25px 29px; }
.golem-nodding .golem-eyes { --eye-x:0px; --eye-y:1.4px; }
@keyframes golem-emerge { 0% { transform:translateY(49px); } 22%,53% { transform:translateY(29px); } 88%,100% { transform:translateY(0); } }
@keyframes golem-climb-left { 22%,58% { transform:rotate(25deg); } }
@keyframes golem-climb-right { 22%,58% { transform:rotate(-25deg); } }
@keyframes golem-listen { 25%,70% { transform:rotate(16deg) translate(2px,2px); } }
@keyframes golem-curious { 25%,68% { transform:rotate(-14deg) translateY(-2px); } }
@keyframes golem-nod { 22%,60% { transform:translateY(6px) rotate(10deg); } 40%,78% { transform:translateY(-1px) rotate(0deg); } }
@keyframes golem-step { 50% { transform:translateY(-2px); } }
@keyframes golem-bob { 50% { transform:translateY(-.6px); } }
@keyframes golem-tilt { 25%,75% { transform:rotate(-4deg); } }
@keyframes golem-scratch { 0%,100% { transform:rotate(0); } 25%,45%,65% { transform:rotate(-138deg); } 35%,55%,75% { transform:rotate(-126deg); } }
@media(min-width:768px) { .stone-recess { margin-bottom:-22px; } }
@media(prefers-reduced-motion:reduce) { .loose-stone span,.stone-golem { transition:none; } .stone-golem * { animation:none !important; } }
