/* Requested fixes, only chapter four plus supplied banquet costumes. */
#stage.z4Fixed #hud .chapter{left:auto!important;right:3%!important;top:14%!important;text-align:right!important;max-width:18%;pointer-events:none;z-index:52}
#stage.z4Fixed #hud .chapter:before,#stage.z4Fixed #chapterSmall{white-space:nowrap}
#stage.z4Fixed #q4Deduction .m4Header{left:2%;right:2%;top:1%;height:12%}
#stage.z4Fixed #cast .actor[data-character="裴清"]{display:block!important;z-index:12!important}
#stage.z4Fixed #cast .actor{transition:left .65s ease,opacity .38s ease!important;will-change:left,opacity}
#stage.z4Fixed #cast .actor[data-character="阿蘅"]{z-index:5!important}
#stage.z4Fixed #q4Deduction[data-x4-type=sealLab] .m4Header{left:2.5%;right:2.5%;top:1%;height:10%;pointer-events:none}
#stage.z4Fixed #q4Deduction[data-x4-type=sealLab] .m4Header h2{visibility:hidden}
#stage.z4Fixed #q4Deduction[data-x4-type=sealLab] .m4Header nav{position:absolute;right:0;top:0;pointer-events:auto}
.z4SealStatus{position:absolute;left:24%;right:21%;top:1%;height:9%;display:flex;align-items:center;gap:12px;background:#e8dfc7eF;border-top:1px solid #b59b6b;border-bottom:1px solid #b59b6b;box-sizing:border-box;padding:3px 8px;z-index:16;color:#294b39;font:500 clamp(12px,1.15vw,18px) QFSystem}
.z4SealStatus>b{white-space:nowrap;font-size:1.1em}.z4SealStatus nav{display:flex;flex:1;gap:4px;min-width:0}.z4SealStatus nav button{flex:1;min-width:0;padding:5px 4px!important;border:0!important;background:transparent!important;color:#3b513c;border-bottom:2px solid transparent!important;font:500 inherit;white-space:nowrap}.z4SealStatus nav button.active{border-bottom-color:#9b7f4b!important;background:#d9ccb055!important}.z4SealStatus strong{font-weight:500;white-space:nowrap;font-size:.9em}
.z4Seal .x4SealInstruction{left:25%;right:24%;top:12%;min-height:11%;padding:6px 9px;background:#e7dfc2eF;box-shadow:none}.z4Seal .x4SealInstruction b{font-size:clamp(13px,1.3vw,20px)}
.z4Seal .x4SealPrompt{height:15%;top:63%;line-height:1.5}
.z4SealTarget{position:absolute;transform:translate(-50%,-50%);z-index:11;pointer-events:none;border:0;background:transparent;box-sizing:border-box}
.z4SealTarget>span{position:absolute;left:50%;bottom:calc(100% + 4px);transform:translateX(-50%);white-space:nowrap;background:#eddfbfe8;color:#36523c;padding:3px 8px;border-bottom:1px solid #a68c59;font:500 clamp(10px,1vw,15px) QFSystem}
.z4TargetHalo{position:absolute;inset:0;border:1px dashed #f7e7b4b0;border-radius:50%;box-shadow:0 0 12px #e0d18755;animation:z4Halo 1.7s ease-in-out infinite}
@keyframes z4Halo{50%{scale:1.08;opacity:.5}}.z4Aligned .z4TargetHalo{border-color:#fff2c4;box-shadow:0 0 20px #f1d98c99}
.z4Seal .x4SealSample{border:0!important;box-shadow:none!important;border-radius:0}.z4Seal .x4SealSample.active{filter:drop-shadow(0 0 6px #d6c39288)}
.z4Seal .x4SealSample span{border:0;background:#e8dec5eF;border-bottom:1px solid #a78d60;color:#2c4b39}.z4Seal .x4SealSample.active span{background:#d5c9a9!important;color:#254333}
.z4DragGuide{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:8;overflow:visible}.z4DragGuide path{fill:none;stroke:#d7c58d;stroke-width:2;stroke-dasharray:.012 .008;opacity:.8;animation:z4GuideDash 5s linear infinite;filter:drop-shadow(0 1px 2px #173a29)}@keyframes z4GuideDash{to{stroke-dashoffset:-.2}}
.z4Seal[data-found=true] .z4DragGuide{display:none}.z4Seal .ppInk{position:absolute;inset:-12%;width:124%;height:124%;pointer-events:none;overflow:visible;filter:drop-shadow(.5px 1px .6px #7a241b44)}
.z4Seal .ppInk path{fill:none;stroke:#ab352a;stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:0}.z4Seal .ppInk .ppInkDry{stroke-width:1.3;opacity:.46}.z4Seal .ppInkNew path{animation:z4InkWrite .82s cubic-bezier(.27,.1,.42,1) both}.z4Seal .ppInkNew .ppInkDry{animation-delay:.42s;animation-duration:.4s}@keyframes z4InkWrite{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.z4SealOpen{position:absolute;left:27%;right:28%;bottom:.5%;padding:6px!important;background:#e7d6adeF!important;color:#34503a;border:1px solid #aa915e!important;z-index:18;font:500 clamp(12px,1.2vw,19px) QFSystem}.z4SealOpen:disabled{opacity:.45}.z4Seal .x4SealNext{top:80%;background:#e4d5b4!important}
.z4Route{position:absolute;inset:0;overflow:hidden;background:#1a3027}.z4RouteArt{width:100%;height:100%;object-fit:cover!important}.z4Route svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.z4Road{fill:none;stroke:#e3c98b;stroke-width:3;stroke-linecap:round;stroke-dasharray:1;animation:z4DrawRoute 2.1s ease both;filter:drop-shadow(0 2px 2px #142d23)}@keyframes z4DrawRoute{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.z4RouteNames{position:absolute;left:9%;right:9%;top:10%;display:flex;justify-content:space-between;pointer-events:none;color:#e3d6b2;font:500 clamp(13px,1.3vw,22px) QFSystem}.z4RouteNames span{background:#1a382ce6;padding:5px 9px;border-bottom:1px solid #af9867}.z4Route p{position:absolute;left:0;right:0;bottom:0;margin:0;padding:6px 10px;text-align:center;background:#203e30eF;color:#e8d9b7;font:500 clamp(11px,1vw,16px) QFSystem}
.z4ArchiveBrief{position:absolute;inset:0;display:grid;grid-template-columns:58% 38%;gap:4%;min-height:0}.z4ArchiveBrief>div{min-height:0}.z4ArchiveBrief aside{display:flex;flex-direction:column;justify-content:center;gap:20px;font:500 clamp(16px,1.6vw,25px)/1.8 QFSystem;color:#e1cda2}.z4ArchiveBrief aside>span{color:#c5c8a9;font-size:.8em}.z4LockedRecords{font-size:clamp(36px,5vw,70px);color:#e3c27e;border-top:1px solid #a1895d;border-bottom:1px solid #a1895d;padding:10px}.z4LockedRecords em{display:block;font:400 17px QFSystem;color:#c9ba91}
.z4Seal .x4SealZoom .ppInk{inset:0;width:100%;height:100%}.z4Seal .x4SealZoom .ppInk path{stroke-width:4.1}.z4SealTarget .ppInk{inset:-15%;width:130%;height:130%}
.z4Seal .x4SealInstruction span{font-size:clamp(10px,1vw,15px)}
.z4Seal .x4SealInstruction{min-height:0;height:auto;padding:3px 7px;background:transparent;border:0;top:12%}.z4Seal .x4SealInstruction span{display:none}
.z4Seal .x4SealInstruction{display:none}
#stage.z4Fixed .z4CitizenGroup{background:linear-gradient(0deg,#16342644,transparent 65%)}
#stage.z4Fixed #q4Deduction .m4Header{padding:0!important}#stage.z4Fixed #q4Deduction .m4Header nav{margin-right:0}
#z4Citizens{position:absolute;inset:0;pointer-events:none;z-index:60;overflow:hidden}#z4Citizens:empty{display:none}.z4Citizen{position:absolute;pointer-events:none}.z4Citizen img{display:block;width:100%;height:auto;max-width:none;object-fit:contain;filter:drop-shadow(0 6px 6px #173b2980)}
#stage.z4Fixed #dialogue{z-index:85!important}#stage.z4Fixed #q4Deduction{z-index:55!important}
/* Keep the original panel geometry; only reserve the portrait's existing occupied area. */
#stage.z4Fixed .x4MatchFooter{left:23%!important;width:auto!important}
@media(max-width:900px){.z4SealStatus{left:23%;right:20%;gap:4px;padding:2px 4px;font-size:10px}.z4SealStatus nav{gap:1px}.z4SealStatus nav button{padding:3px 1px!important;font-size:10px}.z4SealStatus>b{display:none}}

/* Preserve original artwork proportions, including the courier inside SVG. */
.z4Route svg{object-fit:contain}.z4Route svg image{preserve-aspect-ratio:xMidYMid meet}
#stage.z4Fixed .x4SealArt{background-size:contain!important;background-repeat:no-repeat!important;background-position:center!important}
