/* SVG source windows preserve every pose's framing at any responsive height. */
.yy-event-character>svg,.house-cutscene-character>svg,.house-letter-actor>svg{display:block;width:100%;height:100%;overflow:hidden}
#yunyi-preview .yy-event-character,.house-cutscene-character{background:none;max-height:68svh;mask-image:radial-gradient(ellipse 78% 77% at 50% 45%,#000 57%,transparent 88%)}
.house-actor-head,.house-actor-body{display:none}
#yunyi-preview .house-event-casting{position:relative;top:auto;right:auto;margin:0 0 25px auto;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
#yunyi-preview .house-event-phases{display:flex;gap:8px;justify-content:flex-end}
#yunyi-preview .house-event-casting button{font-size:13px;padding:10px 20px;border:1px solid #b89d7c88;border-radius:22px;background:#49392ab8;color:#ead9c5}
#yunyi-preview .house-event-casting button[aria-pressed="true"]{background:#dbc1a5;color:#49382b}
#yunyi-preview .yy-event-screen{overflow:clip;padding:32px 6% 60px;min-height:calc(100svh - 170px)}
#yunyi-preview .yy-event-back{top:40px}
#yunyi-preview .yy-event-frame{min-height:500px}
#yunyi-preview .house-event-playback,#yunyi-preview .yy-event-choice{position:relative;bottom:auto;left:auto;right:auto;margin:20px auto 0}
#yunyi-preview .yy-event-choice{max-width:1050px;gap:8px}
#yunyi-preview .yy-event-choice button{border-radius:18px;padding:10px 17px}
/* A personal invitation, displayed above the finished board. */
#yunyi-preview .house-rematch{position:fixed;inset:0;z-index:20;height:100dvh;align-self:stretch;width:auto;max-width:none;display:flex;align-items:center;justify-content:center;gap:0;padding:80px 5%;border:0;border-radius:0;background:#21180f70;backdrop-filter:blur(6px);box-shadow:none;overflow-y:auto}
.house-letter-actor{width:min(31vw,320px);height:auto;aspect-ratio:3/4;flex-shrink:0;mask-image:radial-gradient(ellipse 76% 80% at 50% 45%,#000 50%,transparent 84%);animation:house-letter-poke 2.8s ease-in-out infinite;transform-origin:75% 70%;margin-right:12px;z-index:1;pointer-events:none}
#yunyi-preview .house-letter-paper{display:block;position:relative;width:min(490px,70vw);min-height:460px;padding:36px 38px;box-sizing:border-box;border:1px solid #e8d8b9;background:repeating-linear-gradient(2deg,#cbb68f0b 0 1px,transparent 1px 5px),linear-gradient(145deg,#f3e7ce,#dbc3a2);color:#594332;box-shadow:0 18px 70px #130d0966,4px 5px 0 #b49b7b;rotate:-1deg}
#yunyi-preview .house-letter-paper:before{content:'';position:absolute;inset:14px;border:1px solid #92795540;pointer-events:none}
#yunyi-preview .house-letter-paper h2,#yunyi-preview .house-letter-paper p{font-family:'House JinXuan',serif;font-weight:500;color:#594332;letter-spacing:1px;text-shadow:none;white-space:pre-line}
#yunyi-preview .house-letter-paper h2{font-weight:700;font-size:29px;line-height:1.4;margin:12px 0 20px}
#yunyi-preview .house-letter-paper p{font-size:18px;line-height:1.6;margin:13px 0}
.house-letter-kicker{font-size:10px;letter-spacing:5px;color:#927653}
#house-letter-from{text-align:right;padding-top:6px}
.house-letter-signature{font:400 34px/1.4 'House Liao',serif;min-height:48px;text-align:right;color:#604633}
#yunyi-preview .house-letter-paper>div:not(.house-letter-signature){display:flex;gap:10px;flex-wrap:wrap}
#yunyi-preview .house-letter-paper button{font-size:12px;padding:10px 14px;border:1px solid #987f6066;background:#c4aa8340;color:#57412c;border-radius:20px}
#yunyi-preview .house-letter-paper button:first-child{background:#715642;color:#f8ead3}
#house-letter-status{display:block;color:#8a7159;line-height:1.7;font-size:11px;margin-top:18px}
#yunyi-preview .house-rematch[data-response] button{pointer-events:none;opacity:.5}
.house-letter-embers{display:none!important;position:absolute;width:400px;height:450px;pointer-events:none;left:52%;top:32%;z-index:2}
#yunyi-preview .house-rematch[data-response="decline"] .house-letter-embers{display:block!important}
.house-letter-embers:before{content:'';position:absolute;inset:40% 0 5%;background:radial-gradient(ellipse,#fff0bfb0,#e5771e77 25%,transparent 68%);filter:blur(18px);animation:house-letter-flame 1.4s ease-in forwards}
.house-letter-embers i{position:absolute;left:30%;top:90%;width:5px;height:9px;background:#ffc56c;border-radius:50%;box-shadow:0 0 8px #ff7b22;animation:house-letter-ember 1.4s ease-out forwards}
.house-letter-embers i:nth-child(2){left:50%;animation-delay:.1s}.house-letter-embers i:nth-child(3){left:65%;animation-delay:.2s}.house-letter-embers i:nth-child(4){left:20%;animation-delay:.3s}.house-letter-embers i:nth-child(5){left:75%;animation-delay:.15s}.house-letter-embers i:nth-child(6){left:40%;animation-delay:.25s}
@keyframes house-letter-poke{0%,65%,100%{transform:translateX(0) scale(1)}25%{transform:translateX(12px) scale(1.04)}42%{transform:translateX(3px) scale(.99)}}
@keyframes house-letter-flame{0%{opacity:0;translate:0 40px}30%{opacity:1}100%{opacity:0;translate:0 -200px}}
@keyframes house-letter-ember{0%{opacity:0;transform:translate(0,0) scale(.4)}20%{opacity:1}100%{opacity:0;transform:translate(50px,-280px) scale(.1)}}
@media(max-width:700px){
 #yunyi-preview .yy-event-screen{padding:28px 20px 40px}#yunyi-preview .yy-event-back{top:26px;left:20px;font-size:11px}
 #yunyi-preview .house-event-casting{margin-bottom:22px}#yunyi-preview .house-event-casting button{font-size:11px;padding:9px 12px}
 #yunyi-preview .yy-event-frame{min-height:510px}#yunyi-preview .yy-event-character{width:270px;max-height:390px}
 #yunyi-preview .house-rematch{align-items:center;padding:55px 18px;flex-direction:column}
 .house-letter-actor{position:absolute;right:5px;top:5px;width:145px;opacity:.85;margin:0}
 #yunyi-preview .house-letter-paper{width:100%;max-width:450px;padding:30px 25px;min-height:0;z-index:2;rotate:0deg}
 #yunyi-preview .house-letter-paper h2{font-size:25px}#yunyi-preview .house-letter-paper p{font-size:17px}
 .house-letter-embers{left:10%;width:80%;top:28%}
}
@media(prefers-reduced-motion:reduce){.house-letter-actor{animation:none}.house-letter-embers{display:none!important}}
#yunyi-preview .yy-event-screen:not([hidden]){display:block}
#yunyi-preview .house-event-casting{width:max-content}
#yunyi-preview .yy-event-frame{width:100%;margin:0 auto}
#yunyi-preview .house-event-genders button,#yunyi-preview .house-event-casting button{white-space:nowrap}

#yunyi-preview .yy-event-frame{min-height:460px}
#yunyi-preview .yy-event-character{max-height:min(52svh,460px);width:min(100%,380px)}
#yunyi-preview .house-event-casting{position:sticky;top:12px;z-index:5}

#yunyi-preview .house-letter-name{font-family:'House Liao',serif;font-weight:400;font-size:1.3em}
#house-rematch-title>span{display:inline-block;transform-origin:50% 70%}
.house-performance[data-emotion="joy"] h2{--emotion-glow:#e6b66e}
.house-performance[data-emotion="sad"] h2{--emotion-glow:#aaa7b4}
.house-performance[data-emotion="heartbeat"] h2{--emotion-glow:#d99483}
.house-performance[data-emotion="surprise"] h2{--emotion-glow:#d9a0a3}
.house-performance[data-emotion] h2{text-shadow:2px 5px 0 #6d4933,0 0 32px color-mix(in srgb,var(--emotion-glow,#e0c4a0) 35%,transparent)}
/* Strong milk-tea glass keeps records readable across every landscape. */
#yunyi-preview .yy-account-wrap{max-width:1120px;padding:30px 4% 60px}
#yunyi-preview .yy-journal{padding:38px 42px;background:linear-gradient(135deg,#e2d5c8f5,#cdbbaaed);backdrop-filter:blur(32px) saturate(.65);-webkit-backdrop-filter:blur(32px) saturate(.65);color:#43372f}
#yunyi-preview[data-weather="night"] .yy-journal{background:linear-gradient(135deg,#51453df5,#3e342eF2);color:#f0e2d3;--yy-sub:#d4c0ae;--yy-ink:#f0e2d3}
#yunyi-preview .yy-account-identity h2{font-family:'House Liao',serif;font-weight:400;font-size:36px}
#yunyi-preview .yy-account-stats{padding:26px 0 22px}
#yunyi-preview .yy-account-stats dd{font-family:'House JinXuan',serif;font-size:42px}
#yunyi-preview .yy-record{min-height:68px;font-size:14px}
#yunyi-preview .yy-record-opponent{font-size:21px}
#yunyi-preview .yy-record-duration,#yunyi-preview .yy-record-opponent small,#yunyi-preview .yy-record-columns{font-size:13px}
#yunyi-preview .yy-record-list{min-height:340px}
@media(max-width:620px){#yunyi-preview .yy-account-wrap{padding:18px 16px 36px}#yunyi-preview .yy-journal{padding:26px 22px}#yunyi-preview .yy-account-identity h2{font-size:29px}#yunyi-preview .yy-account-stats dd{font-size:34px}#yunyi-preview .yy-record-opponent{font-size:19px}}
