/* Standalone title screen. Placeholder art only; no user character assets. */
.title-gate[hidden]{display:none!important}
.title-gate{position:fixed;inset:0;z-index:250;background:radial-gradient(circle at 50% 40%,#31493b,#0b1816 76%);display:grid;place-items:center;overflow-y:auto;overscroll-behavior:contain;padding:max(10px,env(safe-area-inset-top)) 12px max(10px,env(safe-area-inset-bottom));box-sizing:border-box}
body.title-gate-open{overflow:hidden}
.title-gate-art{position:relative;isolation:isolate;display:grid;grid-template-areas:"heading avatar" "copy avatar" "prompt avatar";grid-template-columns:1.1fr .9fr;grid-template-rows:1fr auto 1fr;align-items:center;text-align:left;width:min(94vw,calc(84svh * 16 / 9),1200px);aspect-ratio:16/9;max-height:84svh;overflow:hidden;padding:clamp(20px,4vw,60px);border:2px solid #c4a566;border-radius:12px;box-shadow:0 20px 65px #000b,inset 0 0 0 4px #142b23;background:radial-gradient(ellipse at 82% 48%,#5672559a,transparent 56%),linear-gradient(136deg,#10261f,#223c2b 52%,#111a20);color:#fffdf2;font-family:system-ui,-apple-system,"Yu Gothic",Meiryo,sans-serif;cursor:pointer;touch-action:manipulation}
.title-gate-art::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.16;background-image:linear-gradient(90deg,#ebd4a7 1px,transparent 1px),linear-gradient(#ebd4a7 1px,transparent 1px);background-size:clamp(25px,4.2vw,49px) clamp(25px,4.2vw,49px);mask-image:linear-gradient(90deg,transparent,#000 72%)}
.title-gate-art::after{content:"";position:absolute;inset:10px;border:1px solid #edd7a64f;border-radius:5px;pointer-events:none}
.title-gate-art:focus-visible{outline:4px solid #f8efbd;outline-offset:5px}
.title-gate-heading{grid-area:heading;align-self:end;z-index:1;min-width:0}
.title-gate-heading strong{display:block;font-family:"Kaisei Tokumin","Yu Mincho","Noto Serif JP",serif;font-size:clamp(28px,5.2vw,72px);font-weight:900;line-height:1.3;letter-spacing:-.04em;white-space:nowrap;text-shadow:3px 4px 0 #0009,0 0 20px #0008}
.title-gate-copy{grid-area:copy;z-index:1;align-self:center;margin-top:clamp(8px,2vw,25px);font-size:clamp(17px,2.25vw,34px);font-weight:850;letter-spacing:.055em;color:#ffe4a2;text-shadow:0 2px 7px #000c;white-space:nowrap}
.title-gate-avatar{grid-area:avatar;z-index:1;position:relative;justify-self:center;align-self:center;display:grid;place-items:center;width:min(100%,350px);height:84%;border:2px dashed #ead4a88f;border-radius:42% 42% 12px 12px;background:radial-gradient(circle at 48% 30%,#91a78b71 0%,transparent 57%),linear-gradient(145deg,#50664e9e,#18322988);box-shadow:inset 0 0 30px #e3d9b518}
.title-gate-avatar::before{content:"";position:absolute;top:14%;width:37%;aspect-ratio:1;border-radius:50%;background:#9caa91a6;box-shadow:0 0 19px #e3dca74f}
.title-gate-avatar::after{content:"";position:absolute;bottom:0;width:74%;height:51%;border-radius:48% 48% 5% 5%;background:#647f6fbd}
.title-gate-avatar span{position:relative;z-index:2;align-self:end;margin-bottom:14px;padding:7px 13px;border-radius:6px;background:#111c20d9;border:1px solid #d6c6a477;color:#ffedc8;font-size:clamp(12px,1.4vw,18px);font-weight:800;text-align:center}
.title-gate-prompt{grid-area:prompt;align-self:end;z-index:1;display:block;padding:8px 0;color:#f5f3e2;font-size:clamp(13px,1.35vw,18px);font-weight:900;letter-spacing:.24em;text-shadow:0 2px 8px #000c}
.title-gate-prompt::after{content:"　›";font-size:1.15em}
@media(max-width:650px){
 .title-gate{padding:max(7px,env(safe-area-inset-top)) 8px max(7px,env(safe-area-inset-bottom))}
 .title-gate-art{width:min(92vw,calc(87svh * 9 / 16),455px);max-height:87svh;aspect-ratio:9/16;grid-template-areas:"heading" "avatar" "copy" "prompt";grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) auto auto;text-align:center;padding:clamp(17px,5vw,26px) clamp(13px,5vw,26px);border-radius:10px}
 .title-gate-art::before{mask-image:linear-gradient(transparent,#000 58%,transparent)}
 .title-gate-heading{align-self:center;padding:8px 0 12px}
 .title-gate-heading strong{font-size:clamp(29px,8.2vw,49px);white-space:nowrap}
 .title-gate-avatar{width:min(88%,300px);height:92%;min-height:0;align-self:center}
 .title-gate-avatar span{font-size:12px;margin-bottom:8px}
 .title-gate-copy{font-size:clamp(15px,4.1vw,21px);margin:10px 0 12px}
 .title-gate-prompt{font-size:clamp(11px,3.2vw,14px);padding:7px 0;letter-spacing:.16em}
}
@media(max-width:360px){.title-gate-heading strong{font-size:clamp(25px,8vw,31px)}}
@media(prefers-reduced-motion:reduce){.title-gate-art{scroll-behavior:auto}}

/* Uploaded title artwork, swapped by <picture> at 650px.
   The original placeholder stays usable until both images are committed. */
.title-gate-placeholder{display:contents}
.title-gate-picture{position:absolute;inset:0;width:100%;height:100%;z-index:3;visibility:hidden;pointer-events:none}
.title-gate-image{display:block;width:100%;height:100%;object-fit:contain;object-position:center;user-select:none;-webkit-user-drag:none}
.title-gate-art.has-title-image{padding:0;border:0;background:transparent;box-shadow:0 14px 45px #0003}
.title-gate-art.has-title-image::before,.title-gate-art.has-title-image::after{display:none}
.title-gate-art.has-title-image .title-gate-picture{visibility:visible}
.title-gate-art.has-title-image .title-gate-placeholder{visibility:hidden}
.title-gate-art.has-title-image:focus-visible{outline:4px solid #214b33;outline-offset:5px}


/* Image remains fully visible; label is a small, accessible overlay. */
.title-gate-start-hint{
 position:absolute;left:50%;bottom:clamp(10px,2.1vw,24px);z-index:5;
 transform:translateX(-50%);display:flex;flex-direction:column;
 align-items:center;gap:2px;white-space:nowrap;pointer-events:none;
 background:rgba(17,36,28,.87);border:1px solid rgba(247,229,182,.62);
 border-radius:10px;padding:8px clamp(14px,2.2vw,25px);
 box-shadow:0 3px 16px rgba(0,0,0,.28);
 font-family:system-ui,-apple-system,"Yu Gothic",Meiryo,sans-serif;
 color:#fff6de;letter-spacing:.065em
}
.title-gate-start-hint strong{font-weight:850;font-size:clamp(13px,1.55vw,19px);line-height:1.35}
.title-gate-start-hint small{font-size:clamp(10px,1vw,12px);font-weight:650;line-height:1.35;letter-spacing:.02em}
.title-gate-arrow{display:inline-block;margin-left:3px;font-size:1.2em}
.title-gate-start-mobile{display:none}
@media(max-width:650px){
 .title-gate-start-hint{bottom:12px;border-radius:8px;padding:6px 15px}
 .title-gate-start-desktop{display:none}
 .title-gate-start-mobile{display:inline}
 .title-gate-start-hint strong{font-size:clamp(12px,3.7vw,16px)}
 .title-gate-start-hint small{font-size:clamp(9px,2.5vw,11px)}
}
