/* Portrait game cover: full bleed artwork, no card frame, all original character pixels. */
main:has(#intro:not([hidden])){position:relative;padding:0;max-width:510px;min-height:100dvh;background:#401437;overflow:hidden}
main:has(#intro:not([hidden]))>header,main:has(#intro:not([hidden]))>footer{display:none}
.opening{position:relative;isolation:isolate;width:100%;height:100dvh;min-height:480px;overflow:hidden;text-align:center;background:#43153d;color:#fff0d9}
.opening::before{content:"";position:absolute;inset:-55px;z-index:-3;background:url(cover.png) center 40%/cover no-repeat;filter:blur(32px);opacity:.68}
.opening::after{content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;background:linear-gradient(180deg,#391039 0%,#50205155 29%,transparent 50%,#44163c22 67%,#36112f 100%)}
.opening-nav{position:absolute;z-index:10;top:max(10px,env(safe-area-inset-top));left:17px;right:13px;display:flex;align-items:center;justify-content:space-between;height:44px}
.opening-nav .brand{font-size:23px;text-shadow:0 2px 6px #230a26}
.opening-menu{margin:0;padding:0;border:0;position:relative;text-align:left;background:none}
.opening-menu summary{display:grid;place-items:center;list-style:none;width:44px;height:44px;border:1px solid #ffe4dc66;border-radius:50%;background:#39153bb8;cursor:pointer;color:#fff0d9}
.opening-menu summary::-webkit-details-marker{display:none}
.opening-menu[open] summary{background:#71385e}
.opening-menu .menu-items{position:absolute;right:0;top:50px;width:210px;padding:8px;background:#3e1737;border:1px solid #e8a7cd99;border-radius:13px;box-shadow:0 9px 24px #220b28b3}
.opening-menu .menu-items a,.opening-menu .menu-items button{display:flex;align-items:center;width:100%;padding:12px 9px;min-height:44px;font:700 13px/1.3 system-ui;text-decoration:none;color:#fff0d9;border:0;border-radius:7px;background:transparent;text-align:left;cursor:pointer}
.opening-menu .menu-items button:disabled{opacity:.55}
.opening-menu .menu-items a:hover,.opening-menu .menu-items button:hover{background:#78355b}
.opening-head{position:absolute;z-index:3;top:clamp(54px,9.5dvh,92px);left:0;right:0;padding:0 10px}
.opening-head h1{font:700 clamp(48px,15.3vw,82px)/.86 Georgia,"Times New Roman",serif;letter-spacing:-.075em;margin:0;color:#ffe4ad;transform:rotate(-4deg);text-shadow:0 3px #ab4562,0 6px #421633,0 8px 18px #30102f}
.opening-head h1 em{display:block;color:#ffb8cb;font-size:1.04em;text-shadow:0 3px #ad456f,0 6px #421633,0 8px 18px #30102f}
.opening-head p{font-size:clamp(13px,3.8vw,16px);font-weight:750;color:#ffe1bd;margin:13px 0 0;text-shadow:0 2px 5px #31102b}
.opening-art{position:absolute;z-index:0;left:50%;top:51%;transform:translate(-50%,-46%);width:113%;aspect-ratio:1;pointer-events:none;overflow:hidden;-webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 8%,#000 77%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0%,#000 8%,#000 77%,transparent 100%)}
.opening-art img,.opening-art canvas{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:fill;pointer-events:none}
.opening-vignette{display:none}
.opening-action{position:absolute;z-index:4;bottom:max(28px,calc(env(safe-area-inset-bottom) + 18px));left:0;right:0;padding:34px 26px 0;background:linear-gradient(transparent,#37122fd9 70%,#37122f)}
.opening-play{width:100%;min-height:63px;border-radius:34px;font-size:25px;letter-spacing:-.035em;box-shadow:0 6px 0 #7d9138,0 10px 0 #32132e,inset 0 2px 0 #fbffd4;max-width:400px;margin:auto}
.opening-play:active{transform:translateY(4px) scale(.99)}
.opening-meta{font-size:13px;font-weight:850;margin:17px 0 0;color:#ffdfbd}
.opening-hint{font-size:11px;margin:6px 0 0;color:#f0d0e4;font-weight:650}
.opening.entered .opening-head{animation:head-enter .52s cubic-bezier(.16,.88,.25,1.14) both}
.opening.entered .opening-action{animation:action-enter .42s .13s ease-out both}
@keyframes head-enter{from{transform:translateY(-13px) scale(.96);opacity:.2}to{transform:none;opacity:1}}
@keyframes action-enter{from{transform:translateY(9px)}to{transform:none}}
@media(max-height:710px){.opening-head{top:54px}.opening-head h1{font-size:clamp(40px,13vw,60px)}.opening-head p{margin:9px 0 0;font-size:13px}.opening-art{top:52%;width:108%;transform:translate(-50%,-45%)}.opening-action{bottom:max(15px,calc(env(safe-area-inset-bottom) + 8px));padding:22px 22px 0}.opening-play{min-height:52px;font-size:22px}.opening-meta{margin-top:12px;font-size:12px}.opening-hint{margin-top:4px}}
@media(min-width:650px){main:has(#intro:not([hidden])){margin:0 auto;border:0;border-radius:0;min-height:100dvh}.opening-head h1{font-size:82px}}
@media(prefers-reduced-motion:reduce){.opening *{animation:none!important;transition:none!important}}
.opening button:focus-visible,.opening a:focus-visible,.opening summary:focus-visible{outline:2px solid #fff3bd;outline-offset:3px}

.opening-menu .menu-note{margin:5px 9px 7px;font-size:11px;line-height:1.35;color:#e3b9d1}
