[data-fufu-panel]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
[data-fufu-panel] button,[data-fufu-panel] select{user-select:none;-webkit-user-select:none}
.fufu-drag-handle{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.fufu-drag-handle.is-dragging{cursor:grabbing}.fufu-drag-handle button,.fufu-drag-handle a{cursor:pointer}
body.fufu-card-active #input-bar,body.fufu-card-active #input-container{visibility:hidden!important;pointer-events:none!important;opacity:0!important}
@media(prefers-reduced-motion:reduce){.fufu-drag-handle,body #history-toggle{animation:none!important;transition:none!important}}

/* A continuous sheet of glass; the navigation edge appears only over scrolling content. */
.fufu-drag-handle{isolation:isolate}
.fufu-drag-handle::before{content:"";position:absolute;inset:0 0 -22px;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(241,253,247,.46),rgba(226,245,234,.24) 62%,rgba(228,246,236,0));backdrop-filter:blur(20px) saturate(130%);-webkit-backdrop-filter:blur(20px) saturate(130%);mask-image:linear-gradient(#000 54%,transparent);-webkit-mask-image:linear-gradient(#000 54%,transparent);opacity:0;transition:opacity .22s ease}
.fufu-panel-scrolled>.fufu-drag-handle::before{opacity:1}
/* The clear 32px hit area surrounds a smaller, softly lit glass lens. */
body [data-fufu-panel] button.fufu-close-button,#fufu-card-close,#fufu-bond-root #bond-close,#fufu-bond-root #bond-notes-close{position:relative;isolation:isolate;display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;color:#486157!important;cursor:pointer;transition:transform .18s cubic-bezier(.2,.8,.2,1),color .18s}
body [data-fufu-panel] button.fufu-close-button::before,#fufu-card-close::before,#fufu-bond-root #bond-close::before,#fufu-bond-root #bond-notes-close::before{content:"";position:absolute;inset:3px;width:auto;height:auto;transform:none;opacity:1;z-index:-1;pointer-events:none;border:1px solid rgba(255,255,255,.64);border-radius:50%;background:radial-gradient(ellipse at 29% 12%,rgba(255,255,255,.73),rgba(255,255,255,0) 58%),linear-gradient(145deg,rgba(255,255,255,.36),rgba(222,241,231,.14));box-shadow:inset 0 1px 1px #ffffffe0,inset 0 -1px 1px #6d9b8330,0 2px 7px #4c785013;backdrop-filter:blur(10px) saturate(125%);-webkit-backdrop-filter:blur(10px) saturate(125%);transition:background .18s,box-shadow .18s,transform .18s}
body [data-fufu-panel] button.fufu-close-button svg,#fufu-card-close svg,#fufu-bond-root #bond-close svg,#fufu-bond-root #bond-notes-close svg{position:relative;width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 0 #ffffffa8);opacity:.9}
body [data-fufu-panel] button.fufu-close-button:hover,#fufu-card-close:hover,#fufu-bond-root #bond-close:hover,#fufu-bond-root #bond-notes-close:hover{background:transparent;color:#233d38!important}
body [data-fufu-panel] button.fufu-close-button:hover::before,#fufu-card-close:hover::before,#fufu-bond-root #bond-close:hover::before,#fufu-bond-root #bond-notes-close:hover::before{background:radial-gradient(ellipse at 29% 12%,rgba(255,255,255,.9),rgba(255,255,255,0) 62%),linear-gradient(145deg,rgba(255,255,255,.48),rgba(220,240,226,.22));box-shadow:inset 0 1px 1px #fff,inset 0 -1px 1px #6d9b8330,0 3px 10px #4c78501b}
body [data-fufu-panel] button.fufu-close-button:active,#fufu-card-close:active,#fufu-bond-root #bond-close:active,#fufu-bond-root #bond-notes-close:active{transform:scale(.92);background:transparent}
body [data-fufu-panel] button.fufu-close-button:focus-visible,#fufu-card-close:focus-visible,#fufu-bond-root #bond-close:focus-visible,#fufu-bond-root #bond-notes-close:focus-visible{outline:2px solid #486157;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.fufu-drag-handle::before,#fufu-card-close,#bond-close,#bond-notes-close,#fufu-card-close::before,#bond-close::before,#bond-notes-close::before{transition:none!important}}


/* Visibility and stacking fixes only; legacy star/mineral artwork stays unchanged. */
#mineral-card[hidden],#astro-overlay[hidden]{display:none!important}
#mineral-card[data-fufu-panel]{z-index:18200}
#astro-overlay[data-fufu-panel]{z-index:19100}
#aspect-popup{z-index:19200}
#fufu-info-card{scrollbar-width:none}
#fufu-info-card::-webkit-scrollbar{width:0;height:0;display:none}

/* Only visible while a legacy card is being dismissed; no permanent card chrome. */
.fufu-crystal-closing{pointer-events:none!important}
.fufu-crystal-closing::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(112deg,transparent 26%,#effffb00 37%,#effffbad 48%,#c6f2ff55 51%,transparent 66%);clip-path:polygon(0 0,100% 0,100% 100%,0 100%);mix-blend-mode:screen;animation:fufu-dismiss-glimmer .32s ease-out both;z-index:100}
@keyframes fufu-dismiss-glimmer{from{opacity:0;transform:translateX(-38%)}35%{opacity:.7}to{opacity:0;transform:translateX(38%)}}
@media(prefers-reduced-motion:reduce){.fufu-crystal-closing::after{display:none;animation:none}}

/* Quiet corner controls, retaining their full hit area and keyboard focus. */
#fufu-card-close,#fufu-bond-root #bond-close,#fufu-bond-root #bond-notes-close{opacity:.48;transition:opacity .18s ease,transform .18s ease;color:#486157!important}
#fufu-card-close:hover,#fufu-bond-root #bond-close:hover,#fufu-bond-root #bond-notes-close:hover,
#fufu-card-close:focus-visible,#fufu-bond-root #bond-close:focus-visible,#fufu-bond-root #bond-notes-close:focus-visible{opacity:1}
.fufu-card-head{padding-right:44px}
#fufu-card-close{position:absolute!important;right:5px;top:5px}
#fufu-bond-root #bond-close,#fufu-bond-root #bond-notes-close{position:absolute!important;right:5px;top:calc(5px - var(--bond-panel-pad))}
#fufu-bond-root .bond-head{padding-right:44px}
@media(hover:none){#fufu-card-close,#fufu-bond-root #bond-close,#fufu-bond-root #bond-notes-close{opacity:.78}}
@media(prefers-contrast:more){#fufu-card-close,#fufu-bond-root #bond-close,#fufu-bond-root #bond-notes-close{opacity:1}}
/* Restore the existing conversation bubbles as a selectable reading surface. */
#history-panel[hidden]{display:none!important}
#history-panel{z-index:18150;overscroll-behavior:contain}
#history-toggle.active{z-index:18160}
#history-panel,.history-card,.history-card * ,#bubble-content,#bubble-inner{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default;cursor:text}
#mineral-card .mc-title,#mineral-card .mc-subtitle,#mineral-card .sigil-header,#soul-card .soul-card-title,#soul-card .soul-card-tag{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
#mineral-card.is-dragging,#soul-card.is-dragging{cursor:grabbing}
