/* Keep the supplied artwork intact; layout adapts around it. */
.card-anchor-reading{margin-top:22px;padding-top:14px;border-top:1px solid #d8b87855}.card-anchor-reading summary{cursor:pointer;color:#e2c49b;min-height:40px;padding:8px 0}.card-anchor-reading p{line-height:1.9}
.destiny-sky{overflow:clip}.destiny-astrolabe{max-width:100%;pointer-events:none}
#fate-companion.bubble-below .companion-bubble{bottom:auto;top:100%;margin:8px 0 0}#fate-companion.bubble-left .companion-bubble{left:0;right:auto}
.companion-actions{pointer-events:auto;margin-top:4px;text-align:center;border:1px solid #d8b87844;border-radius:16px;background:#21132dea}.companion-actions summary{cursor:pointer;min-height:30px;padding:4px;font-size:12px}.companion-actions>div{display:flex;justify-content:center}.companion-actions button{border:0;background:none;min-width:48px;min-height:40px;font-size:12px!important}.companion-actions button:disabled{opacity:.45;cursor:default!important}
#fate-companion[data-pose=read] .companion-prop,#fate-companion[data-pose=sleep] .companion-prop{display:none!important}
#fate-companion[data-pose=sleep] .companion-character{animation:none}
.companion-unlock{max-width:620px;width:calc(100% - 28px);text-align:center;padding:40px 30px;background:radial-gradient(ellipse at center,#3a234b,#120b1f);border:1px solid #d8b87888;border-radius:24px;color:#efdfc7}.companion-unlock::backdrop{background:#080512bf}.companion-unlock h2{font-size:28px;font-weight:400;color:#ead2b0}.companion-unlock p{line-height:1.9}.companion-unlock-art{height:280px;display:flex;justify-content:center;gap:16px}.companion-unlock-art img{height:100%;max-width:45%;object-fit:contain;mask-image:linear-gradient(#000 90%,transparent)}.companion-unlock .night-actions{justify-content:center;flex-wrap:wrap}.companion-unlock .detail-close{position:absolute;right:12px;top:12px}
.celestial-face.full-card-art,.night-library .celestial-face.full-card-art,.detail-art .celestial-face.full-card-art{padding:0;border:0;background:none;box-shadow:none;aspect-ratio:2/3}
.celestial-face.full-card-art:before{display:none}.celestial-face.full-card-art>img{display:block;width:100%;height:100%;object-fit:contain;aspect-ratio:auto;border:0;border-radius:12px;transform:none}
.night-featured-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;max-width:790px;margin:28px auto 40px}.night-featured-cards>button{border:0;background:none;padding:0;color:var(--gold-300);cursor:pointer}.night-featured-cards>button>span{display:block;margin-top:12px;font-size:17px}.night-featured-title{text-align:center;font-size:21px;font-weight:400;color:var(--gold-300);margin-top:38px}
#fate-companion{position:fixed;right:20px;bottom:max(12px,env(safe-area-inset-bottom));width:194px;z-index:65;color:#efdfc7;font:13px/1.6 Georgia,'Microsoft YaHei',serif;pointer-events:none;filter:drop-shadow(0 6px 12px #08051055)}
#fate-companion button{pointer-events:auto;cursor:pointer;color:inherit;font:inherit;touch-action:manipulation}#fate-companion button:focus-visible{outline:2px solid #e3c78e;outline-offset:3px}#fate-companion [hidden]{display:none!important}
.companion-tools{display:flex;justify-content:space-between;padding:0 5px}.companion-tools>button{width:36px;height:36px;border:1px solid #d8b87855;border-radius:50%;background:#21132dcc}.companion-tools .companion-grip{cursor:grab;touch-action:none}.companion-tools .companion-grip:active{cursor:grabbing}
.companion-characters{display:flex;align-items:flex-end;justify-content:center;height:180px}.companion-character{padding:6px;border:0;background:none;flex:1;min-width:0;height:100%;animation:companion-breathe 5s ease-in-out infinite}.companion-character:nth-child(2){animation-delay:-2s}.companion-character img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;border:0;mask-image:none}.companion-character:hover{filter:drop-shadow(0 0 8px #ccb3e066)}
.companion-modes{display:flex;justify-content:center;gap:3px;border:1px solid #d8b87866;border-radius:24px;background:#1c1129de;padding:3px}.companion-modes button{min-width:48px;min-height:38px;border:0;border-radius:20px;background:none}.companion-modes button[aria-pressed=true]{background:#6b4b805c;color:#fff1d4}.companion-toggle{display:none;margin-left:auto;min-width:80px;min-height:44px;border:1px solid #d8b87888;border-radius:25px;background:#21132ded}
.companion-bubble{position:absolute;bottom:100%;right:0;width:210px;margin:0 0 8px;padding:13px 16px;background:#241631f2;border:1px solid #d8b87877;border-radius:18px 18px 3px 18px;color:#efdfc7;box-shadow:0 8px 25px #08061150}.is-collapsed .companion-expanded{display:none}.is-collapsed .companion-toggle{display:block}.companion-waves .companion-character{animation:companion-wave .65s ease-in-out 2}
@keyframes companion-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes companion-wave{0%,100%{transform:rotate(0)}35%{transform:rotate(-3deg) translateY(-4px)}70%{transform:rotate(3deg)}}
@media(max-width:700px){.night-featured-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:360px}.night-featured-cards>button>span{font-size:15px}#fate-companion{right:8px;width:146px;bottom:max(8px,env(safe-area-inset-bottom))}.companion-characters{height:114px}.companion-modes button{min-width:42px;min-height:44px;font-size:12px}.companion-tools>button{width:32px;height:32px}.companion-tools{padding:0 7px}.companion-bubble{width:185px;font-size:12px}.is-context-quiet:not(.is-manually-open) .companion-expanded,.input-focused .companion-expanded{display:none}.is-context-quiet:not(.is-manually-open) .companion-toggle,.input-focused .companion-toggle{display:block}.is-context-quiet.is-manually-open:not(.is-collapsed) .companion-expanded{display:block}.is-context-quiet.is-manually-open:not(.is-collapsed) .companion-toggle{display:none}}
@media(prefers-reduced-motion:reduce){.companion-character,.companion-waves .companion-character{animation:none}}

#fate-companion[data-stage=DRAW]{display:none}
body:has(dialog[open]) #fate-companion{left:12px!important;right:auto!important;top:auto!important;bottom:12px!important}
@media(max-width:700px){body:has(dialog[open]) #fate-companion{display:none}}
.companion-prop{display:none;position:absolute;left:50%;bottom:65px;transform:translateX(-50%);font-size:24px;color:#e8cfa3;pointer-events:none}
#fate-companion.is-adult .companion-characters{height:245px}#fate-companion.is-adult .companion-character img{mask-image:linear-gradient(#000 92%,transparent 100%)}
@media(max-width:700px){#fate-companion.is-adult .companion-characters{height:155px}}
#fate-companion[data-state=READ] .companion-prop,#fate-companion[data-state=READING] .companion-prop{display:block}#fate-companion[data-state=READ] .companion-prop:before,#fate-companion[data-state=READING] .companion-prop:before{content:'▱';display:block;width:40px;border:1px solid #d8b87888;background:#2d1848;border-radius:3px;text-align:center}
#fate-companion[data-state=TAROT_SORT] .companion-prop{display:block}#fate-companion[data-state=TAROT_SORT] .companion-prop:before{content:'▱ ▱ ▱';display:block;text-shadow:0 0 8px #d8b878;animation:companion-sort 3s ease-in-out infinite}
#fate-companion[data-state=CRYSTAL] .companion-prop{display:block}#fate-companion[data-state=CRYSTAL] .companion-prop:before{content:'◇';font-size:38px;color:#c6a4e1;text-shadow:0 0 14px #c6a4e1}
#fate-companion[data-state=SLEEP] .companion-character{transform:rotate(3deg);animation:none;filter:brightness(.9)}#fate-companion[data-state=SLEEP] .companion-prop{display:block;bottom:150px}#fate-companion[data-state=SLEEP] .companion-prop:before{content:'☾'}
#fate-companion[data-state=LOOK] .companion-character{animation:companion-look 4s ease-in-out}#fate-companion[data-state=WELCOME] .companion-character{animation:companion-wave 1.5s ease-in-out 2}#fate-companion[data-state=LEVEL_UP] .companion-character{filter:drop-shadow(0 0 15px #d8bd9c);animation:companion-breathe 3s ease-in-out infinite}
@keyframes companion-look{0%,100%{transform:translateX(0)}50%{transform:translateX(3px)}}@keyframes companion-sort{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(5deg)}}
@media(prefers-reduced-motion:reduce){#fate-companion .companion-character,#fate-companion .companion-prop:before{animation:none!important}}
.night-hand-stage{position:relative;isolation:isolate;margin-top:30px}.night-hand{position:absolute;left:0;top:0;width:145px;aspect-ratio:1121/1403;z-index:3;pointer-events:none;transition:transform .22s ease-out;filter:drop-shadow(0 4px 6px #0d081633)}.night-hand img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border:0;border-radius:0;mask-image:none;transition:opacity .2s}.night-hand .hand-point{opacity:0}.night-hand.is-pointing .hand-idle{opacity:0}.night-hand.is-pointing .hand-point{opacity:1}
@media(max-width:700px){.night-hand{width:110px}.night-hand-stage{margin-top:24px}}
@media(prefers-reduced-motion:reduce){.night-hand,.night-hand img{transition:none}}
