/* Full-height character illustration beside the title. The painting keeps its
   natural proportions; every pose is visible from head ornament to footwear. */
body #title-screen.title-screen{
  position:absolute;top:clamp(82px,9vh,124px);bottom:76px;left:6.5vw;right:3vw;
  width:auto;height:auto;max-height:none;padding:0;transform:none;overflow:visible;
  display:grid;grid-template-columns:minmax(300px,.83fr) minmax(0,1.17fr);
  column-gap:2vw;align-items:center;text-align:left;isolation:isolate;
}
body #title-screen.title-screen:before{
  inset:-20vh -9vw;background:linear-gradient(90deg,#07151af2 0%,#091b20b8 35%,#0c252833 68%,#07151a55 100%);
}
#title-screen .menu-copy{grid-column:1;grid-row:1;position:relative;z-index:2;max-width:460px;align-self:center;padding-bottom:18px}
#title-screen .menu-copy>.overline{margin:0 0 16px;font-size:clamp(9px,.8vw,12px);letter-spacing:.27em}
#title-screen .menu-copy>.title-rule{width:56px;margin:0 0 20px}
#title-screen .menu-copy>h1{font-size:clamp(68px,min(7.1vw,10.8vh),126px);line-height:1.07;letter-spacing:.10em;margin:0}
#title-screen .menu-copy>h1 span{display:block;padding-left:.85em}
#title-screen .menu-copy>.title-poem{font-size:clamp(13px,1.1vw,18px);line-height:2.1;letter-spacing:.20em;margin:22px 0 24px}
#title-screen .menu-copy>.main-menu{width:clamp(280px,26vw,400px);max-width:100%;margin:0;gap:5px;text-align:left}
#title-screen .main-menu button{border-left:1px solid #d4b68035;border-right:1px solid transparent;border-radius:2px;padding:13px 20px;font-size:clamp(17px,1.3vw,22px);transition:background .2s,border-color .2s,transform .2s}
#title-screen .main-menu button:hover,#title-screen .main-menu button:focus-visible{border-color:#d4b68077;background:linear-gradient(90deg,#b79a653f,#0c222c33);transform:translateX(4px)}
#title-screen .main-menu button small{font-size:9px;letter-spacing:.14em}
#title-screen .main-menu .primary-menu{box-shadow:inset 0 1px #e0c58333;padding-block:15px;margin-bottom:4px}
#title-screen .main-menu .continue-journey{font-size:20px;padding-block:11px}
#title-screen .main-menu .continue-journey small{letter-spacing:.04em}
#title-screen .menu-copy>.edition{margin:25px 0 0;font-size:10px;letter-spacing:.10em;opacity:.8}
#title-screen .menu-showcase{grid-column:2;grid-row:1;position:relative;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;isolation:isolate}
body #title-screen.title-screen .menu-art{position:relative;inset:auto;flex:1 1 0;width:100%;min-height:0;border:0;border-radius:0;overflow:visible;background:none;box-shadow:none;z-index:0;display:flex;align-items:center;justify-content:center;mask-image:linear-gradient(to bottom,transparent,#000 5%,#000 97%,transparent);mask-composite:add}
#title-screen .menu-art:after{display:none}
#title-screen .menu-art #menu-portrait{display:block;width:auto;max-width:100%;height:100%;padding:0;margin:0;object-fit:contain;object-position:center bottom;filter:none;mask-image:linear-gradient(to right,transparent,#000 10%,#000 90%,transparent);mask-composite:add}
#title-screen .menu-gallery{position:relative;left:auto;bottom:auto;transform:none;flex:0 0 auto;width:min(90%,560px);margin:14px auto 0;z-index:2;text-align:left}
#title-screen .menu-gallery-heading{font-size:13px;margin-bottom:9px}
#title-screen .menu-portrait-choices{gap:8px}
#title-screen .menu-portrait-choices button{padding:5px 3px;gap:4px;border-color:#bca16a26;background:#0c21286b}
#title-screen .menu-portrait-choices img{width:38px;height:43px}
#title-screen .menu-portrait-choices span{font-size:11px}
#title-screen .menu-portrait-timer{margin-top:8px;height:1px}
body:has(#title-screen:not([hidden])) #presentation-art,body:has(#title-screen:not([hidden])) .landscape-caption{display:none!important}
@media(min-width:761px) and (max-height:820px){
 body #title-screen.title-screen{top:78px;bottom:58px}
 #title-screen .menu-copy{padding-bottom:0}
 #title-screen .menu-copy>.overline{margin-bottom:9px}
 #title-screen .menu-copy>.title-rule{margin-bottom:12px}
 #title-screen .menu-copy>h1{font-size:clamp(56px,9.4vh,82px)}
 #title-screen .menu-copy>.title-poem{margin:12px 0 14px;line-height:1.8}
 #title-screen .main-menu button{padding-block:10px}
 #title-screen .main-menu .primary-menu{padding-block:12px}
 #title-screen .menu-copy>.edition{margin-top:16px}
 #title-screen .menu-gallery{margin-top:8px}
 #title-screen .menu-portrait-choices img{height:36px;width:32px}
}
@media(max-width:760px){
 body #title-screen.title-screen{top:78px;bottom:62px;left:0;right:0;width:100%;height:auto;max-height:none;transform:none;padding:4px 22px 28px;box-sizing:border-box;display:flex;flex-direction:column;gap:20px;overflow-y:auto;overflow-x:hidden;text-align:center;justify-content:flex-start}
 #title-screen .menu-showcase{order:0;width:100%;height:auto;flex:0 0 auto}
 body #title-screen.title-screen .menu-art{height:clamp(220px,38dvh,370px);flex:none;width:100%}
 #title-screen .menu-gallery{width:100%;max-width:410px;margin-top:6px}
 #title-screen .menu-gallery-heading{font-size:11px}
 #title-screen .menu-portrait-choices{gap:5px}
 #title-screen .menu-portrait-choices img{width:28px;height:31px}
 #title-screen .menu-portrait-choices button{padding:4px 1px;gap:3px}
 #title-screen .menu-portrait-choices span{font-size:10px}
 #title-screen .menu-copy{order:1;padding:0;width:100%;max-width:410px;align-self:center}
 #title-screen .menu-copy>.overline,#title-screen .menu-copy>.title-rule{display:none}
 #title-screen .menu-copy>h1{display:flex;justify-content:center;gap:9px;font-size:40px;letter-spacing:4px}
 #title-screen .menu-copy>h1 span{display:inline;padding:0}
 #title-screen .menu-copy>.title-poem{font-size:11px;line-height:1.8;margin:10px 0 15px;letter-spacing:.12em}
 #title-screen .menu-copy>.main-menu{width:100%;max-width:none}
 #title-screen .main-menu button{font-size:17px;padding:10px 16px}
 #title-screen .main-menu .primary-menu{padding-block:12px}
 #title-screen .menu-copy>.edition{font-size:9px;margin:18px 0 0}
}
@media(max-height:530px) and (min-width:761px){
 body:has(#title-screen:not([hidden])) .stage-frame{min-height:0}
 body #title-screen.title-screen{top:76px;bottom:40px;overflow:visible;align-items:start}
 #title-screen .menu-copy{align-self:start}
 #title-screen .menu-copy>h1{font-size:38px;display:flex;gap:8px;margin-bottom:10px}
 #title-screen .menu-copy>h1 span{padding:0}
 #title-screen .menu-copy>.overline,#title-screen .menu-copy>.title-rule,#title-screen .menu-copy>.edition,#title-screen .menu-copy>.title-poem{display:none}
 #title-screen .main-menu{gap:3px}
 #title-screen .main-menu button,#title-screen .main-menu .primary-menu,#title-screen .main-menu .continue-journey{font-size:14px;line-height:1.3;padding-block:6px;margin-bottom:0}
 #title-screen .main-menu button small{font-size:8px}
 #title-screen .menu-showcase{height:calc(100dvh - 120px);min-height:0}
 #title-screen .menu-portrait-choices img{height:24px;width:24px}
 #title-screen .menu-gallery-heading{font-size:10px;margin-bottom:5px}
 body:has(#title-screen:not([hidden])) .menu-footer{left:22px;right:22px;bottom:12px;font-size:8px}
}
@media(prefers-reduced-motion:reduce){#title-screen .main-menu button{transition:none}}

/* The artwork now spans the viewport; the chooser floats above it. */
#title-screen .menu-showcase{position:fixed;inset:0 0 0 auto;width:56vw;height:100dvh;display:block;z-index:0}
body #title-screen.title-screen .menu-art{position:absolute;inset:0;width:100%;height:100%;display:flex;mask-image:linear-gradient(0deg,transparent,#000 3%,#000 98%,transparent)}
#title-screen .menu-art #menu-portrait{height:100%;max-width:100%;width:auto;object-fit:contain;object-position:center;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 94%,transparent)}
#title-screen .menu-gallery{position:absolute;left:50%;bottom:100px;transform:translateX(-50%);width:min(88%,540px);margin:0;padding:16px 18px 12px;border:1px solid #d1b7853b;border-radius:4px;background:linear-gradient(140deg,#10242beb,#091a23f2);box-shadow:0 16px 45px #020b1555;backdrop-filter:blur(22px);transition:opacity .28s,translate .28s,visibility .28s;box-sizing:border-box}
#title-screen .menu-gallery[data-hidden=true]{opacity:0;translate:0 10px;visibility:hidden;pointer-events:none}
#title-screen .menu-gallery-heading{font-size:12px}
#title-screen .menu-portrait-choices img{width:38px;height:43px}
#title-screen .menu-gallery-toggle{position:absolute;right:12%;bottom:54px;padding:9px 15px;z-index:3;border:1px solid #cfb37a66;border-radius:3px;background:#0b2025b8;color:#e4cda4;font:12px DreamSerif,serif;letter-spacing:.12em;backdrop-filter:blur(12px);cursor:pointer}
#title-screen .menu-gallery-toggle:focus-visible{outline:2px solid #e4cda4;outline-offset:4px}
@media(max-width:760px){
 body #title-screen.title-screen{top:86px;bottom:60px;padding:12px 22px 20px;text-align:left;display:block;overflow-y:auto;isolation:auto}
 body #title-screen.title-screen:before{position:fixed;inset:0;background:linear-gradient(90deg,#07171cf7,#091c21b8 48%,#091a2033 80%);z-index:0;pointer-events:none}
 #title-screen .menu-showcase{position:fixed;inset:0;width:100vw;height:100dvh;z-index:-1}
 body #title-screen.title-screen .menu-art{position:absolute;inset:0;width:100%;height:100dvh;opacity:.9}
 #title-screen .menu-art #menu-portrait{width:100%;height:auto;max-height:100%;object-fit:contain;object-position:center;mask-image:linear-gradient(0deg,transparent,#000 9%,#000 91%,transparent)}
 #title-screen .menu-copy{position:relative;z-index:2;width:min(100%,310px);margin:3vh 0 0;text-align:left}
 #title-screen .menu-copy>h1{display:block;font-size:clamp(46px,13vw,62px);line-height:1.12;letter-spacing:.13em}
 #title-screen .menu-copy>h1 span{display:block;padding-left:.8em}
 #title-screen .menu-copy>.title-poem{font-size:12px;margin:16px 0 26px;letter-spacing:.13em;line-height:2}
 #title-screen .menu-copy>.main-menu{width:100%}
 #title-screen .main-menu button{background:linear-gradient(90deg,#081b20b3,transparent);font-size:18px;padding:13px 14px}
 #title-screen .main-menu button small{font-size:8px}
 #title-screen .menu-gallery{position:fixed;left:16px;right:16px;bottom:98px;transform:none;width:auto;max-width:none;padding:14px;z-index:8}
 #title-screen .menu-gallery-toggle{position:fixed;right:18px;bottom:56px;z-index:8}
 #title-screen .menu-portrait-choices img{width:32px;height:36px}
 #title-screen .menu-gallery-heading{font-size:11px}
}
@media(max-height:530px) and (min-width:761px){
 #title-screen .menu-showcase{height:100dvh}
 #title-screen .menu-gallery{bottom:74px;padding:10px 12px}
 #title-screen .menu-gallery-toggle{bottom:34px;padding:6px 10px;font-size:10px}
 #title-screen .menu-portrait-choices img{height:27px;width:27px}
}
@media(prefers-reduced-motion:reduce){#title-screen .menu-gallery{transition:none}}
/* Mobile portrait stage: scale by height, keeping broad silhouettes inside the
   viewport where a full-height crop would remove skirts or Huaying's wings. */
@media(max-width:760px){
 body #title-screen.title-screen:before{background:linear-gradient(90deg,#07171c80 0%,#091c212e 48%,transparent 82%)}
 body #title-screen.title-screen .menu-art{opacity:1;overflow:hidden;mask-image:none}
 #title-screen .menu-art #menu-portrait{flex:none;width:auto;height:100dvh;max-height:none;max-width:none;object-fit:contain;mask-image:none}
 #title-screen .menu-art #menu-portrait[src*="lankui.webp"],
 #title-screen .menu-art #menu-portrait[src*="xuejian.webp"],
 #title-screen .menu-art #menu-portrait[src*="hongkui.webp"],
 #title-screen .menu-art #menu-portrait[src*="jingtian.webp"],
 #title-screen .menu-art #menu-portrait[src*="chonglou.webp"]{height:min(100dvh,175vw)}
 #title-screen .menu-art #menu-portrait[src*="huaying.webp"]{height:min(100dvh,155vw)}
 #title-screen .menu-art #menu-portrait[src*="zixuan-art-v1"]{height:min(100dvh,185vw)}
 #title-screen .menu-copy{filter:drop-shadow(0 2px 3px #020b10)}
 #title-screen .main-menu button{background:linear-gradient(90deg,#071a20d9,#071a2059 78%,transparent);text-shadow:0 1px 3px #000}
}
@media(max-width:760px){
 #title-screen .menu-art #menu-portrait[src*="lankui.webp"]{height:min(100dvh,150vw)}
 #title-screen .menu-art #menu-portrait[src*="xuejian.webp"],
 #title-screen .menu-art #menu-portrait[src*="hongkui.webp"],
 #title-screen .menu-art #menu-portrait[src*="chonglou.webp"],
 #title-screen .menu-art #menu-portrait[src*="zixuan-art-v1"]{height:min(100dvh,165vw)}
 #title-screen .menu-showcase{display:contents}
 body #title-screen.title-screen .menu-art{position:fixed;z-index:-1;pointer-events:none}
 #title-screen .menu-gallery,#title-screen .menu-gallery-toggle{pointer-events:auto}
}
@media(max-width:760px){
 #title-screen .menu-art #menu-portrait{mask-image:linear-gradient(0deg,transparent,#000 4%,#000 96%,transparent)}
}
