/* A faint constellation of people, with one colour portrait when selected. */
.character-gallery{position:fixed;z-index:2;left:0;top:0;width:0;height:0;pointer-events:none;isolation:isolate}
.character-gallery[hidden]{display:none}
.character-ensemble{position:absolute;left:0;top:0;width:0;height:0;transition:opacity 1s ease}
.character-choice{position:absolute;width:calc(var(--character-size,450px)*.65);height:calc(var(--character-size,450px)*.86);transform:translate(-50%,-50%);padding:0;border:0;background:transparent;color:#b9cad3;pointer-events:auto;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:none}
.character-choice[hidden]{display:none}
.character-choice img{position:absolute;left:50%;top:50%;height:var(--character-size,450px);width:auto;max-width:none;transform:translate(-50%,-50%);opacity:.10;filter:url('#character-outline');pointer-events:none;transition:opacity .65s ease;mask-image:linear-gradient(#000 0%,#000 74%,transparent 100%)}
.character-choice:hover img,.character-choice:focus-visible img{opacity:.19}
.character-choice:focus-visible{outline:1px solid #d9c79c55;outline-offset:8px;border-radius:45%}
.character-gallery.has-character .character-choice img{opacity:.045}
.character-gallery.has-character .character-choice[aria-pressed="true"] img{opacity:.10}
.character-gallery.revealed .character-choice[aria-pressed="true"] img{opacity:0}
.character-focus{position:fixed;left:50%;top:45%;width:0;height:0}
.character-view{position:absolute;left:0;top:0;width:min(520px,49vh,62vw,calc(100vh - 400px));margin:0;transform:translate(-50%,-50%) scale(.99);opacity:0;transition:transform 1.6s cubic-bezier(.22,.61,.28,1),opacity 1.4s cubic-bezier(.33,0,.33,1);pointer-events:none}
.character-view.visible{transform:translate(-50%,-50%) scale(1);opacity:1}
.character-view.departing{transform:translate(-50%,-50%) scale(.99);opacity:0;transition-duration:1.25s;pointer-events:none}
.character-view img{display:block;width:100%;height:auto;max-height:60vh;object-fit:contain;filter:drop-shadow(0 0 18px #d4d2b40c);mask-image:linear-gradient(#000 0%,#000 82%,transparent 100%)}
.character-view figcaption{position:relative;left:50%;transform:translateX(-50%);width:min(440px,88vw);text-align:center;margin:var(--orbit-caption-gap,80px) 0 0}
.character-view h2{margin:0;font:400 clamp(22px,2.7vw,30px)/1.4 "KaiTi","STKaiti","Songti SC",serif;letter-spacing:.38em;text-indent:.38em;color:#e0d3b3;text-shadow:0 0 24px #c2ac7526}
.character-identity{margin:8px 0 0;color:#c9bea6;font:400 13px/1.8 "Songti SC","SimSun",serif;letter-spacing:.12em}
.character-introduction{max-width:32em;margin:10px auto 0;font:400 14px/1.9 "Songti SC","SimSun",serif;letter-spacing:.04em;color:#c3beb0;text-wrap:pretty}
.character-introduction strong{font-weight:400;color:#deccb0}
.character-art{position:relative}
.character-orbit{position:absolute;inset:0;pointer-events:none}
.character-gua{position:absolute;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid #bca57630;border-radius:50%;background:#080f205c;color:#cfb889;font:400 25px/1 "Segoe UI Symbol",serif;pointer-events:auto;cursor:pointer;touch-action:manipulation;transition:color .3s,border-color .3s,background .3s;-webkit-tap-highlight-color:transparent}
.character-gua:hover,.character-gua[aria-expanded="true"],.character-gua:focus-visible{color:#f1ddb5;border-color:#d3b87999;background:#142031d9;outline:none}
.character-skill-panel{position:fixed;z-index:6;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;min-height:64px;overflow:visible;padding:10px 12px;border:1px solid #bda77b50;background:#07111bf5;box-shadow:0 8px 44px #0005;backdrop-filter:blur(10px);pointer-events:auto;color:#d4d0c2;text-align:center}
.character-skill-panel[hidden]{display:none}
.character-gallery.mobile-skill-open .character-introduction{visibility:hidden}
.character-skill-panel h3{margin:0 0 9px;font:400 18px/1.5 "KaiTi","STKaiti",serif;letter-spacing:.1em;color:#e2cba0}
.character-skill-panel p{margin:0;font:400 14px/1.85 "Songti SC","SimSun",serif;white-space:pre-wrap;overflow-wrap:anywhere}
.character-actions{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom,0px));display:flex;gap:16px;transform:translateX(-50%);pointer-events:auto;transition:opacity .4s}
.character-actions[hidden]{display:none}
.character-actions button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #b8a47845;border-radius:50%;color:#d0bc96;background:#080f2070;cursor:pointer;-webkit-tap-highlight-color:transparent}
.character-actions button:hover{border-color:#d6c39a80;background:#17202aa6}
.character-actions button:focus-visible{outline:1px solid #e0c99c;outline-offset:4px}
body.character-mode .portrait-prompt{opacity:0;visibility:hidden;animation:none}
@media(max-width:600px){.character-choice img{opacity:.10}.character-actions{gap:14px}.character-view{width:min(68vw,40vh,calc(100vh - 420px))}.character-view img{max-height:40vh}.character-view figcaption{margin-top:var(--orbit-caption-gap,52px)}.character-introduction{font-size:13px;letter-spacing:.02em}.character-gua{width:38px;height:38px;font-size:23px}}
@media(prefers-reduced-motion:reduce){.character-choice img,.character-view,.character-view figcaption,.character-actions{transition:none}}
@media(max-width:600px){.character-skill-panel{padding:8px 12px}.character-skill-panel h3{margin-bottom:4px;font-size:16px;line-height:1.4}.character-skill-panel p{line-height:1.7}}
@media(max-width:600px) and (max-height:620px){.character-introduction{font-size:11px;line-height:1.65}.character-view h2{font-size:21px}.character-identity{margin-top:6px;font-size:12px;line-height:1.65}.character-actions{bottom:calc(70px + env(safe-area-inset-bottom,0px))}}
@media(max-width:340px){.character-skill-panel{padding:6px 8px}.character-skill-panel h3{margin-bottom:3px;letter-spacing:.04em}}
