#xearith-beacon[hidden]{display:none!important}
#xearith-beacon{position:relative;flex:0 0 78px;width:78px;height:78px;border:3px solid #f0d190;border-radius:50%;padding:0;background:radial-gradient(circle at 40% 25%,#9868b8,#35233e 72%);box-shadow:0 0 0 4px #6b4c73,0 5px 15px #102e3855;cursor:pointer;overflow:visible;transition:transform .2s}
#xearith-beacon:hover{transform:translateY(-3px)}#xearith-beacon:focus-visible{outline:3px solid #bcf1ff;outline-offset:6px}
#xearith-beacon img{width:100%;height:100%;object-fit:cover;object-position:52% 14%;border-radius:50%;object-view-box:inset(2% 28% 54% 20%)}
#xearith-beacon>span{position:absolute;bottom:-12px;left:50%;transform:translateX(-50%);padding:3px 8px;border:1px solid #e2c185;border-radius:9px;background:#392c42;color:#ffedc6;font:700 12px 'Nunito';white-space:nowrap}
#xearith-beacon.xearith-unread:after{content:'✦';position:absolute;right:-7px;top:-10px;border:2px solid #e6c58c;border-radius:50%;width:24px;height:24px;background:#a16bd3;color:#fff0b9;line-height:24px}
#modal.xearith-modal{width:min(1080px,calc(100vw - 28px));max-width:1080px;max-height:calc(100dvh - 36px);padding:0;border:2px solid #d4b27c;border-radius:25px;background:#201e32;box-shadow:0 30px 100px #080d23aa;overflow:auto}
#modal.xearith-modal::backdrop{background:#0e1826c9;backdrop-filter:blur(6px)}
.xearith-modal #close{position:absolute;top:16px;right:16px;z-index:5}
.xearith-modal #modal-content{padding:0}
.xearith-scene{position:relative;isolation:isolate;min-height:620px;display:grid;grid-template-columns:44% 56%;overflow:hidden;border-radius:23px;background:radial-gradient(ellipse at 20% 48%,#76528e99,transparent 47%),linear-gradient(125deg,#1a2338,#372942 68%,#211d30);color:#fff0d9}
.xearith-sky{position:absolute;inset:0;z-index:-1;opacity:.55;background-image:radial-gradient(1.5px 1.5px at 12% 18%,#f8dcad 70%,transparent),radial-gradient(1px 1px at 32% 70%,#ffe3c4 70%,transparent),radial-gradient(2px 2px at 82% 18%,#cbb4f9 70%,transparent),radial-gradient(1px 1px at 64% 82%,#b5d8ff 70%,transparent);background-size:160px 170px,220px 200px,270px 270px,190px 230px;pointer-events:none}
.xearith-art{position:relative;display:flex;align-items:flex-end;justify-content:center;min-width:0;overflow:hidden}
.xearith-art>span{position:absolute;top:70px;left:10%;font:400 330px/1 Georgia;color:#d6b8f01c;transform:rotate(-14deg)}
.xearith-art img{position:relative;width:128%;max-width:none;height:590px;object-fit:contain;object-position:center bottom;align-self:flex-end;filter:drop-shadow(0 8px 24px #17142e77);transform:translateX(9%)}
.xearith-conversation{position:relative;padding:55px 42px 32px 0;display:flex;flex-direction:column;justify-content:center;min-width:0}
.xearith-kicker{font:800 12px/1.5 'Nunito';letter-spacing:2px;color:#d2b7e5}
.xearith-conversation header h2{font:500 48px/1.15 'Fredoka';margin:8px 0;color:#f7dba6;text-shadow:0 2px 16px #b887b733}
.xearith-role{display:block;font:400 14px/1.6 'Nunito';color:#d4c2d6}
.xearith-speech{position:relative;min-height:230px;margin:25px 0 20px;padding:34px 26px 20px;border:1px solid #e7c38b;border-radius:7px 23px 23px 23px;background:linear-gradient(145deg,#fff3d7,#e8d0a3);box-shadow:0 8px 24px #15132744;color:#463348}
.xearith-speech:before{content:'';position:absolute;left:-13px;top:28px;width:22px;height:22px;transform:rotate(45deg);border-bottom:1px solid #e7c38b;border-left:1px solid #e7c38b;background:#fcf0d3}
.xearith-quote{position:absolute;top:5px;left:20px;font:44px Georgia;color:#a680a9}
.xearith-speech #xearith-text{position:relative;font:600 20px/1.65 'Nunito';margin:0;min-height:140px;color:#463348;overflow-wrap:anywhere}
.xearith-speech #xearith-page{display:block;margin-top:14px;color:#866b83;font:700 12px/1.5 'Nunito';letter-spacing:.3px}
.xearith-controls{display:flex;gap:10px;min-height:52px;align-items:center;flex-wrap:wrap}
.xearith-controls .gold-btn{font:800 16px 'Nunito';padding:12px 17px;margin:0;flex:1;min-height:49px;white-space:normal}
.xearith-controls .xearith-challenge{background:linear-gradient(#d8c3e5,#ac8fc4);border-color:#6e4b83;color:#392944}
.xearith-replay{color:#cbbbd3;font:400 13px/1.6 'Nunito';margin:20px 0 0;max-width:410px}
.xearith-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){#xearith-beacon{width:62px;height:62px;flex-basis:62px}#xearith-beacon>span{font-size:11px}.xearith-scene{grid-template-columns:1fr;min-height:0}.xearith-art{height:245px}.xearith-art img{height:370px;width:100%;object-position:50% 8%;object-fit:cover;transform:none;align-self:flex-start;mask-image:linear-gradient(#000 78%,transparent)}.xearith-art>span{font-size:240px;top:10px;left:20%}.xearith-conversation{padding:0 22px 25px;margin-top:-18px}.xearith-conversation header h2{font-size:38px}.xearith-kicker{font-size:11px}.xearith-speech{margin:18px 0 15px;min-height:210px;padding:28px 21px 17px}.xearith-speech:before{display:none}.xearith-speech #xearith-text{font-size:18px;min-height:125px}.xearith-controls{align-items:stretch}.xearith-controls .gold-btn{font-size:14px;min-width:130px}.xearith-replay{font-size:12px;margin-top:16px}}
@media(prefers-reduced-motion:reduce){#xearith-beacon{transition:none}}
/* The dialogue nameplate is separate from the game's navigation header. */
.xearith-conversation>header{all:unset;display:block}

.xearith-warm{background:radial-gradient(ellipse at 25% 45%,#bb8c9755,transparent 50%),linear-gradient(125deg,#32283c,#48314a 68%,#292039)}
.xearith-stern{background:radial-gradient(ellipse at 25% 45%,#93447766,transparent 50%),linear-gradient(125deg,#171b32,#30203c 68%,#181527)}
/* Blend the supplied dark-backed portrait into the night scene. */
.xearith-stern .xearith-art img{mix-blend-mode:screen}
/* Chapter one keeps portraits, speech and choices in the same visual novel frame. */
@keyframes chapter-beacon-pulse{50%{box-shadow:0 0 0 6px #b88ad066,0 0 30px #e6bd74cc;filter:brightness(1.15)}}
#xearith-beacon.chapter-pulse{animation:chapter-beacon-pulse 1.6s ease-in-out infinite}
.chapter-ayxhan{background:radial-gradient(ellipse at 25% 42%,#42745499,transparent 55%),linear-gradient(125deg,#172c29,#293c37 68%,#191f32)}
.chapter-ayxhan .xearith-art img{transform:none;width:115%}
.chapter-hub{padding:25px 15px;text-align:center;max-width:650px;margin:auto}
.chapter-hub h2{font:500 38px 'Fredoka';color:#6b487b;margin:12px 0}
.chapter-hub p{font:600 16px/1.7 'Nunito'}
.chapter-hub>.gold-btn{margin:8px;min-height:48px}
.chapter-cast{display:flex;align-items:center;justify-content:center;gap:16px;border-radius:20px;background:radial-gradient(ellipse,#604f71,#202b31);overflow:hidden;height:230px;color:#ffe4a0;font-size:32px}
.chapter-cast img{width:42%;height:100%;object-fit:cover;object-position:50% 8%}
@media(max-width:700px){.chapter-cast{height:180px}.chapter-ayxhan .xearith-art img{object-position:center 8%;width:100%}}
@media(prefers-reduced-motion:reduce){#xearith-beacon.chapter-pulse{animation:none;box-shadow:0 0 0 6px #b88ad066,0 0 24px #e6bd74}}
