/* station 10: questions */
details{border-top:1px solid #E6EBF2;text-align:left}
details:last-of-type{border-bottom:1px solid #E6EBF2}
summary{list-style:none;cursor:pointer;padding:15px 34px 15px 0;font-size:20px;font-weight:600;position:relative}
summary::-webkit-details-marker{display:none}
summary::after{content:"";position:absolute;right:6px;top:50%;width:9px;height:9px;border-right:1.5px solid var(--dusty);border-bottom:1.5px solid var(--dusty);transform:translateY(-70%) rotate(45deg);transition:transform .3s}
details[open] summary::after{transform:translateY(-30%) rotate(-135deg)}
details .a{padding:0 0 16px;color:var(--ink-soft);font-size:18px}

/* ---------- the wishing tree: each question is a paper tag on a blue silk ribbon (qa.js) ---------- */
#st-qa .st-art{width:min(300px,76%)}
#st-qa .st-art img{display:block}
/* the Pumpkin's spot up in the tree (the game puts its button in here) */
#st-qa .pk-spot{position:absolute;left:47.9%;top:69.4%;width:0;height:0;z-index:3}

#st-qa .qa-bough{max-width:420px;margin:2px auto -6px;height:40px;position:relative;z-index:2}
#st-qa .qa-bough svg{display:block;width:100%;height:100%}

#st-qa details{--tilt:-.6deg;position:relative;isolation:isolate;max-width:430px;margin:0 auto 20px;border:0;
  perspective:900px;transform:rotate(var(--tilt));transform-origin:50% -12px;transition:transform .6s var(--ease-out)}
#st-qa details:nth-of-type(even){--tilt:.7deg}
#st-qa details:nth-of-type(3n){--tilt:-.3deg}
#st-qa details:last-of-type{border:0;margin-bottom:6px}
#st-qa details[open]{transform:none}
/* the ribbon each tag hangs from */
#st-qa details::before{content:"";position:absolute;left:50%;top:-24px;width:4px;height:38px;margin-left:-2px;z-index:-1;border-radius:2px;
  background:linear-gradient(90deg,#8FAAD0,#DCE8F6 45%,#A7BEDF 70%,#8FAAD0);box-shadow:0 0 0 .5px rgba(74,108,159,.35)}

/* the tag: ivory card stock, notched top corners, fine ink edge */
#st-qa summary{display:block;text-align:center;font-family:var(--serif);font-size:20px;font-weight:600;color:var(--navy);line-height:1.3;
  padding:8px 30px 6px;border:solid transparent;border-width:16px 10px 10px;min-height:44px;
  border-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M.6 15.4L14.6 .6H45.4L59.4 15.4V59.4H.6Z' fill='%23FCF9F2' stroke='%23A3967F' stroke-width='1.1'/%3E%3Cpath d='M3.4 16.4L15.8 3.4H44.2L56.6 16.4V56.6H3.4Z' fill='none' stroke='%23E1D7C4' stroke-width='.8'/%3E%3C/svg%3E") 16 10 10 fill / 16px 10px 10px;
  filter:drop-shadow(0 3px 3px rgba(27,42,74,.1))}
#st-qa summary:focus-visible{outline:2px solid var(--dusty);outline-offset:3px}
/* the brass eyelet the ribbon goes through */
#st-qa summary::before{content:"";position:absolute;left:50%;top:-12px;width:11px;height:11px;margin-left:-5.5px;border-radius:50%;
  background:radial-gradient(circle,#A7BEDF 0 2.2px,transparent 2.5px),radial-gradient(circle,transparent 0 2.6px,#9C7B43 2.9px 3.6px,#E4CF98 3.9px 4.6px,#A58550 5px)}
#st-qa summary::after{right:2px;border-color:#7E7566}

/* the answer: the lower half of the tag, folded up behind it, unfolds in 3D */
#st-qa details .a{position:relative;margin:-1px 6px 0;padding:14px 18px 16px;font-size:18px;color:var(--ink-soft);text-align:center;
  background:linear-gradient(to bottom,#F4EEE1,#FBF8F1 22%,#FCF9F2);
  box-shadow:inset 0 0 0 1px rgba(163,150,127,.55),0 6px 10px -6px rgba(27,42,74,.25);
  transform-origin:50% 0;backface-visibility:hidden}
#st-qa details .a::before{content:"";position:absolute;left:8px;right:8px;top:0;border-top:1px dashed rgba(126,117,102,.55)}
#st-qa details[open] .a{animation:qa-unfold .8s cubic-bezier(.2,.8,.25,1.15) both}
@keyframes qa-unfold{0%{transform:rotateX(-96deg);opacity:.15}55%{opacity:1}100%{transform:none;opacity:1}}

/* a slow, small sway while on screen (closed tags only). A tag holds still while it's hovered, focused or touched,
   so it's never a moving target; reduced motion never adds .qa-live, so the tags hang still */
#st-qa.qa-live details:not([open]){animation:qa-sway 8s ease-in-out infinite}
#st-qa.qa-live details:nth-of-type(2n):not([open]){animation-duration:9.4s;animation-delay:-2.2s}
#st-qa.qa-live details:nth-of-type(3n):not([open]){animation-duration:7.2s;animation-delay:-4.1s}
#st-qa.qa-live details:is(:hover,:focus-within,.qa-held){animation-play-state:paused}
@keyframes qa-sway{0%,100%{transform:rotate(var(--tilt))}50%{transform:rotate(calc(var(--tilt) * .35))}}

@media (max-width:360px){#st-qa summary{padding:8px 24px 6px;font-size:19px}#st-qa details .a{padding:12px 12px 14px}}
