/* The first playable frame is an illustrated chapter opening, not a small alert. */
.modal-root:has(.intro-screen){padding:0;background:#080514;backdrop-filter:none;align-items:stretch}
.modal-box:has(.intro-screen){position:relative;width:min(100%,480px);height:100dvh;max-height:none;min-height:0;margin:auto;padding:0;overflow-x:hidden;overflow-y:auto;border:0;border-radius:0;background:#160c29;color:#f7e7c8;text-align:center;box-shadow:0 0 0 1px #dcb37366,0 0 80px #6d367e55;overscroll-behavior:contain}
.modal-box:has(.intro-screen):before{content:'';position:absolute;inset:0 0 auto;height:min(66vh,650px);background:linear-gradient(#180a2de8 0%,#240e38ad 20%,#1a0a2d66 47%,#1c0b2ee8 80%,#1a0b2d 100%),url('assets/world-map-v4.webp') center 13%/cover;pointer-events:none}
.modal-box:has(.intro-screen):after{content:'';position:absolute;top:12px;bottom:12px;left:11px;right:11px;border:1px solid #dfb87075;border-radius:25px;pointer-events:none;box-shadow:inset 0 0 0 4px #41235160}
.intro-screen{position:relative;z-index:1;display:flex;flex-direction:column;min-height:100dvh;padding:calc(22px + env(safe-area-inset-top,0px)) 20px calc(27px + env(safe-area-inset-bottom,0px));background:radial-gradient(ellipse at 50% 55%,transparent 12%,#180b2a55 65%,#13091f 100%)}
.intro-heading{position:relative;z-index:3}.intro-kicker{display:block;color:#f1ce88;letter-spacing:.25em;font-size:10px;font-weight:800;text-shadow:0 1px 7px #0b0419}.intro-heading h2{margin:12px 0 0;font-family:Georgia,'Noto Serif KR',serif;font-size:clamp(38px,10vw,50px);font-weight:700;line-height:1.13;letter-spacing:.07em;color:#fff1c9;text-shadow:0 3px 2px #24102d,0 0 24px #eab96a9c}.intro-divider{display:flex;align-items:center;gap:12px;width:70%;max-width:260px;margin:15px auto 10px;color:#f9d28c;font-size:13px}.intro-divider:before,.intro-divider:after{content:'';height:1px;flex:1;background:linear-gradient(90deg,transparent,#f9d28c)}.intro-divider:after{transform:rotate(180deg)}
.modal-box .intro-heading p{margin:0;color:#f8e8cc;font-size:14px;line-height:1.7;font-weight:600;text-shadow:0 2px 6px #0b0317}
.intro-tableau{position:relative;height:clamp(190px,30vh,265px);margin:7px -8px -8px;flex:none;isolation:isolate}.intro-tableau:before{content:'';position:absolute;inset:25% 2% 3%;border-radius:50%;background:radial-gradient(ellipse,#ecb3675e 0,#cb80da4d 38%,transparent 70%);filter:blur(20px);z-index:-1}.intro-halo{position:absolute;width:min(66%,260px);height:38%;bottom:10%;left:50%;transform:translateX(-50%) rotate(-8deg);border:2px solid #f6c984a6;border-radius:50%;box-shadow:0 0 16px #e9a95b9c,inset 0 0 18px #f0bc7877}.intro-halo:before{content:'';position:absolute;inset:8px;border:1px dashed #fff0b088;border-radius:50%}
.intro-tableau>.creature-art{position:absolute;display:block;filter:drop-shadow(0 12px 9px #100519) drop-shadow(0 0 12px #d090e066);transform-origin:bottom center}.intro-tableau>.intro-left{width:39%;height:78%;left:0;bottom:5%;transform:rotate(-11deg)}.intro-tableau>.intro-center{width:47%;height:100%;left:26%;bottom:2%;z-index:2}.intro-tableau>.intro-right{width:39%;height:76%;right:0;bottom:5%;transform:rotate(9deg)}
.intro-story{position:relative;margin:0 -20px;padding:14px 29px 18px;background:linear-gradient(180deg,#220d33df,#170a25f7);border-top:1px solid #d6a76b88;border-bottom:1px solid #ab7a5077;box-shadow:0 -9px 24px #210d38ad}.intro-story>span{color:#f6ce84;font-family:Georgia,'Noto Serif KR',serif;font-size:13px;letter-spacing:.08em}.modal-box .intro-story p{margin:8px 0 0;color:#e7d1dd;font-size:12px;line-height:1.65}
.intro-choice-heading{display:flex;justify-content:space-between;align-items:center;margin:17px 1px 9px;text-align:left}.intro-choice-heading strong{font-family:Georgia,'Noto Serif KR',serif;font-size:19px;color:#ffe9b9}.intro-choice-heading small{color:#cfafd2;font-size:10px}
.intro-screen .starter-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0}.intro-screen .intro-choice{display:flex;flex-direction:column;align-items:center;gap:0;min-width:0;min-height:181px;padding:9px 5px 10px;position:relative;border:1px solid #b88c58;border-radius:12px;background:radial-gradient(ellipse at 50% 27%,var(--portrait-tint,#50305c) 0,transparent 72%),linear-gradient(165deg,#492751,#21102d);color:#ffeac5;box-shadow:inset 0 0 0 3px #d3a56025,0 5px 12px #08030d8c;transition:transform .16s,box-shadow .16s}.intro-screen .intro-choice:before{content:'';position:absolute;inset:4px;border:1px solid #e9c17a41;border-radius:8px;pointer-events:none}.intro-screen .intro-choice:hover,.intro-screen .intro-choice:focus-visible{transform:translateY(-4px);border-color:#ffe4a8;box-shadow:inset 0 0 0 3px #d3a56033,0 0 19px #e5a36588}.intro-choice-art{display:grid;place-items:center;width:100%;height:88px;filter:drop-shadow(0 5px 6px #0c0418)}.intro-screen .intro-choice .creature-art{width:100%;height:88px;max-width:none;margin:0;background:none}.intro-choice-name{font-family:Georgia,'Noto Serif KR',serif;font-size:16px;font-weight:800;color:#fff0c4;white-space:nowrap}.intro-choice-role{font-size:10px;color:#e0b983;margin:2px 0}.intro-screen .intro-choice small{font-size:9px;color:#dec6e1;white-space:nowrap}.intro-choice-action{display:block;width:calc(100% + 2px);margin-top:auto;padding:7px 0 0;border-top:1px solid #d8aa6670;color:#ffdf9d;font-size:9px;font-weight:800}
.modal-box .intro-footnote{margin:12px 0 0;color:#bd9fc8;font-size:10px}
@media(max-width:360px){.intro-screen{padding-inline:16px}.intro-screen .starter-choices{gap:6px}.intro-screen .intro-choice{padding-inline:3px}.intro-choice-name{font-size:13px}.intro-choice-action{font-size:8px}.intro-story{margin-inline:-16px;padding-inline:21px}.intro-choice-heading strong{font-size:17px}}
@media(max-height:820px){.intro-screen{padding-top:calc(12px + env(safe-area-inset-top,0px));padding-bottom:calc(15px + env(safe-area-inset-bottom,0px))}.intro-heading h2{font-size:38px;margin-top:7px}.intro-divider{margin-block:7px}.modal-box .intro-heading p{font-size:12px}.intro-tableau{height:190px}.intro-story{padding-block:10px}.intro-choice-heading{margin-top:10px}.intro-screen .intro-choice{min-height:158px}.intro-choice-art,.intro-screen .intro-choice .creature-art{height:70px}}
@media(prefers-reduced-motion:reduce){.intro-screen .intro-choice{transition:none}}
/* The active companion remains visible in the world, with a one-thumb party shortcut. */
.map-companion{position:absolute;right:0;bottom:calc(100% + 12px);z-index:4;display:grid;justify-items:center;width:93px;min-height:103px;padding:4px 4px 7px;border:1px solid #efcb89;border-radius:13px;background:radial-gradient(ellipse at 50% 38%,var(--portrait-tint,#51315d),transparent 85%),linear-gradient(#4e2b62ed,#21102eea);color:#ffe8bc;box-shadow:inset 0 0 0 3px #cda0642b,0 0 14px #d995ca47,0 5px 10px #0a031abb;backdrop-filter:blur(5px)}
.map-companion:before{content:'';position:absolute;inset:4px;border:1px solid #f9d79751;border-radius:9px;pointer-events:none}.map-companion-art{width:77px;height:72px;display:grid;place-items:center;filter:drop-shadow(0 5px 5px #0b0317)}.map-companion .creature-art{width:77px;height:72px;max-width:none;margin:0}.map-companion-name{font-family:Georgia,'Noto Serif KR',serif;font-size:10px;max-width:86px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-companion:hover,.map-companion:focus-visible{box-shadow:inset 0 0 0 3px #cda06440,0 0 22px #ffe4a37a}
@media(max-width:360px){.map-companion{width:78px;min-height:90px}.map-companion-art,.map-companion .creature-art{width:67px;height:62px}.map-companion-name{font-size:8px;max-width:73px}}
