:root{font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#27212b;background:#e9e1e8;--ink:#28202b;--rose:#e95a8e;--edge:#d4c5d0}*{box-sizing:border-box}html,body{margin:0;min-height:100%;overscroll-behavior:none}body{min-height:100vh}button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible,.dialogbox:focus-visible{outline:3px solid #1888db;outline-offset:2px}[hidden]{display:none!important}
.app{height:100vh;height:100dvh;max-width:690px;margin:0 auto;display:flex;flex-direction:column;position:relative;overflow:hidden;background:#fff8fa;box-shadow:0 0 50px #51334228}.topbar{flex:none;display:flex;gap:7px;align-items:center;padding:calc(env(safe-area-inset-top) + 5px) 10px 7px;background:#fff;border-bottom:2px solid var(--ink);min-height:59px}.brand{font-size:clamp(12px,3.2vw,17px);font-weight:1000;line-height:1.25;letter-spacing:-.055em;flex:1}.brand span{color:#dc427c}.pill{background:#fff;border:2px solid var(--ink);border-radius:11px;font-size:12px;font-weight:850;padding:8px 7px;white-space:nowrap;min-height:37px;box-shadow:2px 2px #eac6d4}.timeline{flex:none;display:flex;justify-content:space-between;align-items:center;padding:6px 14px;background:#342a36;color:#fff;font-size:12px;font-weight:800;min-height:29px}.step{font-size:11px;letter-spacing:.06em}.progressTrack{flex:none;height:4px;background:#efc5d5}.progressFill{height:100%;width:0;background:#e35488;transition:width .22s}
.stage{flex:1 1 auto;position:relative;overflow:hidden;min-height:100px;background:#f4e7ce}.sceneBackdrop{position:absolute;inset:0;pointer-events:none}.sceneBackdrop svg{height:100%;width:100%;display:block}.spriteHolder{position:absolute;left:50%;bottom:-1px;transform:translateX(-50%);width:min(100%,440px);height:min(100%,550px);display:flex;justify-content:center;align-items:flex-end;pointer-events:none}.spriteHolder canvas,.spriteHolder img{display:block;width:auto;max-width:100%;height:100%;object-fit:contain;object-position:center bottom;image-rendering:pixelated;filter:drop-shadow(0 5px 3px #3c2b3033)}.sceneStamp{position:absolute;top:15px;right:12px;background:#342c39;color:white;padding:7px 11px;font-weight:900;font-size:12px}
.interaction{position:relative;flex:none;background:#fff9fc;border-top:3px solid var(--ink);padding:9px 12px calc(env(safe-area-inset-bottom) + 9px);height:227px;min-height:0;display:flex;flex-direction:column;gap:7px}.dialogbox{position:relative;height:128px;min-height:128px;background:white;border:2px solid #453746;border-radius:9px;padding:7px 12px 20px;box-shadow:3px 3px 0 #e8b8ce;outline:0}.speaker{font-size:13px;font-weight:950;color:#b53673;min-height:20px}.dialogText{font-size:clamp(14px,4.1vw,18px);font-weight:750;line-height:1.48;height:80px;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}.dialogIndicator{position:absolute;bottom:2px;right:12px;color:#b83e74;font-size:13px;animation:bob 1.2s infinite}.choiceArea{margin-top:-1px}.choiceArea p{font-size:12px;text-align:center;font-weight:900;margin:0 0 6px}.choiceButtons{display:grid;grid-template-columns:1fr 1fr;gap:10px}.choice{min-height:58px;border:2px solid #362837;border-radius:9px;font-size:clamp(13px,4vw,17px);font-weight:1000;box-shadow:2px 3px #413044}.yes{background:#f98eb7}.no{background:#b6e6e6}.afterArea{display:flex;gap:7px}.wideButton{width:100%;padding:10px;border:2px solid #362837;background:#f9afce;border-radius:9px;font-weight:900;font-size:14px;box-shadow:2px 2px #43313d}.interactionFoot{text-align:right;min-height:14px;color:#847783;font-size:10px;font-weight:800;margin-top:auto;padding:0 2px}.interactionFoot span{margin-left:10px;font-variant-numeric:tabular-nums}@keyframes bob{50%{transform:translateY(3px)}}
.interaction.is-choice .dialogbox{height:64px;min-height:64px}.interaction.is-choice .speaker{display:none}.interaction.is-choice .dialogText{height:auto;text-align:center;font-size:14px}.interaction.is-choice .dialogIndicator{display:none}.interaction.is-ending .dialogbox{min-height:128px}
.overlay{position:absolute;z-index:40;inset:0;background:#291f2ac9;display:grid;place-items:center;padding:13px;overscroll-behavior:contain}.sheet{background:#fffafc;border:3px solid #2b2330;box-shadow:5px 6px #e25991;width:100%;max-width:530px;max-height:92%;max-height:92dvh;overflow-y:auto;padding:20px 17px 24px}.sheet h2{font-size:25px;line-height:1.35;margin:3px 0 12px}.sheet p{font-size:14px;line-height:1.8}.sheet .tiny{font-size:12px;color:#726271}.sheet .sectionLabel{font-size:11px;letter-spacing:.12em;font-weight:900;color:#e34c88}.modalButton{display:block;width:100%;margin-top:12px;min-height:46px;border:2px solid #2b2330;border-radius:8px;font-size:15px;font-weight:900;background:#f4a1bf;box-shadow:2px 3px #2b2330}.modalButton.alt{background:#e4f1f1}.bookGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:13px 0}.bookEntry{min-height:69px;border:1px solid #cbb9c4;border-radius:9px;padding:8px 4px;background:#fff;text-align:center;font-size:11px;font-weight:750}.bookEntry strong{display:block;font-size:13px;margin-bottom:4px}.bookEntry.locked{color:#948b93;background:#f3eff2}.bookDetail{background:#fff;border-left:4px solid #e46c9b;padding:11px;font-size:13px;line-height:1.7;white-space:pre-wrap}.smallAction{background:#fff;border:1px solid #aea0aa;border-radius:7px;padding:8px;font-weight:850;font-size:12px}.debug{position:absolute;z-index:50;bottom:0;left:0;right:0;padding:8px;background:#261d2bdd;color:white;font-size:11px;max-height:45vh;overflow:auto}.debugLine{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}.debug select{min-width:50px;max-width:40vw;flex:1}.debug button{font-size:11px;padding:6px}
@media(min-width:850px){.app{max-width:min(1110px,98vw);height:min(95vh,850px);min-height:620px;flex-direction:column;margin:2.5vh auto}.spriteHolder{height:min(100%,590px)}.interaction{height:217px;padding:10px 25px 14px}.dialogbox{height:125px;min-height:125px}.choiceButtons{max-width:670px;margin:0 auto}.brand{font-size:19px}.topbar{padding:9px 16px}.dialogText{font-size:19px}.stage{min-height:230px}}
@media(max-height:680px){.interaction{height:198px;padding-top:6px;gap:5px}.dialogbox{height:102px;min-height:102px;padding-top:5px}.dialogText{font-size:14px;line-height:1.38;height:66px}.choice{min-height:48px}.interaction.is-choice .dialogbox{height:54px;min-height:54px}.interactionFoot{font-size:9px}.timeline{padding-top:3px;padding-bottom:3px}}
@media(max-width:350px){.topbar{padding-right:6px;padding-left:6px;gap:4px}.pill{padding:7px 5px}.pill span{display:none}.interaction{padding-left:8px;padding-right:8px}.choiceButtons{gap:7px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.interaction.is-choice .dialogbox{display:none}.interaction.is-choice .choiceArea{margin:auto 0}.interaction.is-choice .choiceArea p{margin:0 0 14px;font-size:14px}.interaction.is-choice .interactionFoot{margin-top:0}

.sceneBackdrop img{height:100%;width:100%;display:block;object-fit:cover}

.interaction.is-ended .dialogIndicator{display:none}

/* v03 audit: ensure full 3-line dialogue remains inside fixed height, all viewports. */
.pill{min-height:44px;min-width:44px}
.dialogbox{height:134px;min-height:134px;padding:7px 12px 8px}
.dialogText{height:88px}
.dialogIndicator{top:5px;bottom:auto}
.interaction{height:237px}
@media(min-width:850px){.interaction{height:237px}.dialogbox{height:137px;min-height:137px}.dialogText{height:91px}}
@media(max-height:680px){.interaction{height:204px}.dialogbox{height:102px;min-height:102px;padding:4px 10px 5px}.speaker{min-height:16px;font-size:12px}.dialogText{height:65px;line-height:1.38}.dialogIndicator{top:3px;bottom:auto}}
@media(max-width:350px){.pill{padding-left:5px;padding-right:5px}.brand{font-size:12px}}
.bookAvatarWrap{display:flex;justify-content:center;align-items:end;height:190px}
.bookAvatarWrap canvas,.bookAvatarWrap img{display:block;height:185px;max-width:100%;width:auto;object-fit:contain;image-rendering:pixelated}
.resultPreview{display:block;width:min(100%,280px);height:auto;aspect-ratio:4/5;object-fit:contain;margin:6px auto;background:#fff}
.interactionFoot{cursor:pointer}
@media(min-width:850px) and (max-height:680px){.interaction{height:225px}}
/* Compact landscape: keep choice controls reachable without cropping on short screens. */
@media(max-height:500px){
 .app{min-height:0;overflow:hidden}
 .topbar{min-height:46px;padding-top:3px;padding-bottom:3px}
 .timeline{min-height:23px;padding-top:2px;padding-bottom:2px}
 .stage{min-height:48px}
 .interaction{height:162px;padding:4px 10px 4px;gap:4px}
 .dialogbox{height:76px;min-height:76px;padding:3px 10px 4px}
 .speaker{font-size:11px;min-height:15px}
 .dialogText{font-size:13px;line-height:1.25;height:50px}
 .choice{min-height:43px}
 .interaction.is-choice .choiceArea p{margin-bottom:8px;font-size:12px}
 .interactionFoot{font-size:9px}
 .wideButton{padding:7px}
}
@media(min-width:850px) and (max-height:680px){
 .app{height:100dvh;min-height:0;margin:0 auto}
}

/* v05: stable scale for all 20 pair-split assets, responsive with safe-area preserved. */
.spriteHolder img{aspect-ratio:3/4;max-width:100%;height:100%;width:auto;object-fit:contain;object-position:center bottom;image-rendering:pixelated}
.bookAvatarWrap img{aspect-ratio:3/4;height:185px;max-width:100%;object-fit:contain;image-rendering:pixelated}
.sceneBackdrop picture{display:block;width:100%;height:100%}
.sceneBackdrop picture img{width:100%;height:100%;object-fit:cover}
@media(max-width:430px){.spriteHolder{width:min(100%,440px);height:min(100%,550px)}}


/* Short landscape / split-view guard: never clip the choice/continue controls. */
@media(max-height:290px){.stage{min-height:20px}.interaction{height:154px}.dialogbox{height:70px;min-height:70px}.dialogText{height:46px;line-height:1.2}}

/* v07: full-viewport cinematic stage and truly fixed dialogue overlay. */
:root{--dialog-h:137px;--dialog-bottom:calc(env(safe-area-inset-bottom) + 12px);--choice-clearance:0px}
html,body{height:100%;overflow:hidden}body{background:#29262b}.app{width:100%;max-width:none;height:100vh;height:100dvh;min-height:0;margin:0;border:0;box-shadow:none;overflow:hidden;isolation:isolate;background:#fbf3f7;touch-action:manipulation}
.stage{position:absolute;inset:0;z-index:0;min-height:0;overflow:hidden;background:#f1dbc8}
.sceneBackdrop,.sceneBackdrop picture{position:absolute;inset:0}.sceneBackdrop picture img,.sceneBackdrop>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center}
.topbar,.timeline,.progressTrack{position:relative;z-index:3}.topbar{background:#fffcf8e6;min-height:52px;border-bottom:1px solid #473445aa;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.timeline{background:#342a36dc}.progressTrack{height:4px}
.spriteHolder{z-index:1;left:50%;bottom:calc(var(--dialog-bottom) + var(--dialog-h) - 35px);width:min(98vw,550px);height:min(74dvh,733px);max-height:none;min-height:0;transform:translateX(-50%);align-items:flex-end;justify-content:center}
.spriteHolder canvas,.spriteHolder img{display:block;height:100%;max-width:100%;width:auto;object-fit:contain;object-position:center bottom;image-rendering:pixelated}
.interaction{position:absolute;inset:0;z-index:4;width:100%;height:auto!important;min-height:0;padding:0!important;background:transparent;border:0;display:block;pointer-events:none;overflow:visible}
.dialogbox{position:absolute!important;left:clamp(9px,3vw,32px);right:clamp(9px,3vw,32px);bottom:var(--dialog-bottom);width:auto;height:var(--dialog-h)!important;min-height:var(--dialog-h)!important;max-height:var(--dialog-h)!important;overflow:hidden;padding:7px 13px 7px!important;border:3px solid #443342;border-radius:12px;background:#fffafcfa;box-shadow:4px 4px 0 #e7b6c9;pointer-events:auto;touch-action:manipulation}
.speaker{font-size:16px!important;line-height:20px;min-height:21px;font-weight:950}.dialogText{font-size:clamp(20px,5.65vw,25px)!important;line-height:1.3!important;height:calc(var(--dialog-h) - 35px)!important;min-height:0;max-height:calc(var(--dialog-h) - 35px)!important;overflow:hidden;overflow-wrap:anywhere;font-weight:850;letter-spacing:-.035em}.dialogIndicator{top:5px;right:12px;font-size:13px}.interaction.is-choice .dialogbox{display:block!important}.interaction.is-choice .speaker{display:block}.interaction.is-choice .dialogText{font-size:clamp(20px,5.65vw,25px)!important;line-height:1.3!important;height:calc(var(--dialog-h) - 35px)!important;text-align:left}.interaction.is-choice .dialogIndicator{display:none}
.choiceArea,.afterArea{position:absolute;z-index:6;bottom:calc(var(--dialog-bottom) + var(--dialog-h) + var(--choice-clearance));left:clamp(9px,3vw,32px);right:clamp(9px,3vw,32px);width:auto;pointer-events:auto;margin:0!important}
.choiceArea{padding:9px 10px 12px;border-radius:13px;background:#fff8faec;border:2px solid #3e313f;box-shadow:0 4px 15px #25192444}.interaction.is-choice .choiceArea p{margin:0 0 8px;font-size:16px;font-weight:950}.choiceButtons{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:750px;margin:0 auto}.choice{min-height:54px;font-size:clamp(16px,4.3vw,21px);border-width:2px;touch-action:manipulation}.wideButton{min-height:49px;font-size:clamp(13px,3.7vw,18px);padding:8px}.afterArea{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.afterArea .wideButton{flex:1 1 43%;min-width:0}
.interactionFoot{position:absolute;right:clamp(9px,3vw,32px);bottom:calc(var(--dialog-bottom) + var(--dialog-h) + 4px);margin:0;min-height:0;background:#fffbf9d9;padding:2px 6px;border-radius:5px;color:#655561;font-size:11px;pointer-events:auto}.interaction.is-choice .interactionFoot{display:none}.interaction.is-ended .interactionFoot{display:none}.interaction.is-ending .interactionFoot{display:block}
.sceneStamp{z-index:2;top:92px}.overlay{position:absolute;inset:0;z-index:30}.sheet{max-height:92dvh;max-width:min(92vw,620px)}.bookEntry{min-height:62px}.endGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.endTile{background:white;border:2px solid #5c4557;border-radius:8px;padding:7px;text-align:left;font-size:14px;font-weight:850;min-width:0;min-height:90px}.endTile img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;border-radius:5px;margin-bottom:6px}.endTile.locked{color:#79727c;background:#f1eaf0}.endStill{width:100%;height:auto;max-height:70dvh;object-fit:contain;display:block}.endZoom{display:flex;align-items:center;justify-content:center;min-height:40vh;background:#241e26}.debug{z-index:50}
@media (min-width:850px){.app{width:100%;height:100dvh;min-height:0;margin:0;max-width:none}.spriteHolder{width:min(56vw,640px);height:min(79dvh,790px)}.choiceArea,.afterArea,.dialogbox{left:max(calc((100vw - 920px)/2),28px);right:max(calc((100vw - 920px)/2),28px)}.interactionFoot{right:max(calc((100vw - 920px)/2),28px)}.dialogText{font-size:25px!important}.choiceButtons{gap:16px}}
@media (max-width:430px){.spriteHolder{width:98vw;height:min(75dvh,650px)}.topbar{gap:4px;padding-right:5px;padding-left:7px}.pill{padding:5px 6px;font-size:11px}.brand{font-size:12px}}
@media (max-height:520px){:root{--dialog-h:102px;--dialog-bottom:calc(env(safe-area-inset-bottom) + 4px);--choice-clearance:0px}.topbar{min-height:39px;padding:2px 6px}.timeline{min-height:22px;padding:2px 8px}.spriteHolder{height:min(78dvh,430px);bottom:calc(var(--dialog-bottom) + var(--dialog-h) - 18px)}.dialogbox{padding:3px 10px 3px!important}.speaker{font-size:12px!important;line-height:16px;min-height:16px}.dialogText{font-size:clamp(15px,3.5vw,18px)!important;height:calc(var(--dialog-h) - 25px)!important;line-height:1.25!important}.interaction.is-choice .dialogText{font-size:clamp(15px,3.5vw,18px)!important;height:calc(var(--dialog-h) - 25px)!important}.choiceArea{padding:4px 7px 6px}.interaction.is-choice .choiceArea p{font-size:12px;margin-bottom:3px}.choice{min-height:36px;font-size:13px}.wideButton{min-height:36px;padding:4px;font-size:12px}.afterArea .wideButton{flex-basis:27%}.interactionFoot{font-size:10px}.spriteHolder{width:min(95vw,480px)}}
@media (max-height:340px){:root{--dialog-h:82px}.spriteHolder{height:min(72dvh,275px)}.choiceArea{padding:3px 5px}.interaction.is-choice .choiceArea p{font-size:11px}.choice{min-height:30px}.dialogText,.interaction.is-choice .dialogText{font-size:14px!important}.speaker{font-size:11px!important;line-height:14px;min-height:14px}}
@media (prefers-reduced-motion:reduce){.dialogIndicator{animation:none!important}}

/* v07.1: full debug image preview and text-safe dialogue heights. */
.debugImgPair{display:flex;align-items:stretch;gap:10px;justify-content:center;margin-top:6px}.debugImgPair button{flex:1 1 0;min-width:0;background:#fff;border:1px solid #d9b9c7;border-radius:7px;padding:5px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;font-size:12px;color:#362331;font-weight:850}.debugImgPair img{max-width:100%;width:auto;height:105px;object-fit:contain;image-rendering:pixelated}.debugImgPair button:hover{background:#ffe2ee}
.dialogText,.interaction.is-choice .dialogText{height:calc(var(--dialog-h) - 46px)!important;max-height:calc(var(--dialog-h) - 46px)!important}
@media(max-height:520px){.dialogText,.interaction.is-choice .dialogText{height:calc(var(--dialog-h) - 33px)!important;max-height:calc(var(--dialog-h) - 33px)!important}}
@media(max-height:340px){.dialogText,.interaction.is-choice .dialogText{height:calc(var(--dialog-h) - 38px)!important;max-height:calc(var(--dialog-h) - 38px)!important}}

/* v09 debug-only cast browser; not part of the normal game's layout. */
.overlay.debugInspectOverlay{z-index:70}
.debugCastList{display:flex;flex-direction:column;gap:7px}
.debugCastRow{display:flex;align-items:center;gap:12px;width:100%;min-height:82px;text-align:left;border:1px solid #d8adbe;border-radius:8px;background:white;color:#342735;padding:6px 10px;font-weight:800}
.debugCastRow img{height:76px;width:57px;object-fit:contain;flex:none;image-rendering:pixelated}
.debugCastRow span:nth-child(2){flex:1;min-width:0}.debugCastRow small{display:block;color:#786372;font-weight:500;font-size:12px;margin-top:3px}
.debugCastTitle small{display:block;font-size:12px;margin-top:1px;font-weight:750;color:#665767}
.debugCastModes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}
.debugCastModes button{border:1px solid #5b4353;background:#fff;border-radius:6px;font-size:13px;font-weight:850;min-height:43px;padding:6px 3px}
.debugCastModes [aria-pressed=true]{background:#f7abc9;border:2px solid #342330}
.debugCastStage{height:clamp(155px,33dvh,285px);position:relative;overflow:hidden;border:1px solid #b7a0ad;background:#eee2e8;border-radius:6px}
.debugCastBackdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.debugCastPortrait{position:absolute;height:98%;width:auto;max-width:100%;object-fit:contain;left:50%;bottom:0;transform:translateX(-50%);image-rendering:pixelated}
.debugCastDialogue{height:135px;min-height:135px;max-height:135px;overflow:hidden;border:3px solid #443342;border-radius:10px;background:#fffafc;padding:7px 10px;box-shadow:3px 3px #e7b6c9;margin-top:7px;position:relative;cursor:pointer;touch-action:manipulation}
.debugCastSpeaker{font-weight:950;color:#b43d76;font-size:16px;min-height:21px;line-height:20px}
.debugCastText{font-weight:850;font-size:clamp(18px,5.2vw,22px);line-height:1.32;letter-spacing:-.035em;height:88px;white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden}
.debugCastIndicator{position:absolute;right:10px;top:7px;font-size:12px;color:#b83e74;pointer-events:none}
.debugCastPage{text-align:right;margin:3px 0 5px!important;font-size:11px!important;color:#74606e!important;line-height:1.4!important}
.debugCastMini{display:flex;justify-content:center;gap:10px}
.debugCastMini button{display:flex;flex-direction:column;align-items:center;border:1px solid #d8adbe;border-radius:7px;background:white;padding:3px 10px;font-size:11px;min-width:92px}
.debugCastMini img{height:72px;width:auto;max-width:65px;object-fit:contain;image-rendering:pixelated}
.debugCastNav{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:5px;margin:9px 0 4px}
.debugCastNav button{border:1px solid #4a3445;border-radius:6px;background:#f9c1d3;min-height:38px;font-size:12px;font-weight:850;padding:5px}
@media(max-height:550px){.debugCastStage{height:160px}.debugCastDialogue{height:105px;min-height:105px;max-height:105px;padding:4px 9px}.debugCastText{height:69px;font-size:16px;line-height:1.3}.debugCastSpeaker{font-size:12px;line-height:16px;min-height:17px}}

/* v10 UI polish: cinematic background, floating-only controls, no location/count band. */
.topbar{
 position:absolute!important;top:calc(env(safe-area-inset-top) + 9px);right:clamp(7px,2vw,18px);left:auto;
 width:max-content;min-height:0!important;padding:0!important;gap:7px!important;
 border:none!important;background:transparent!important;box-shadow:none!important;
 backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 z-index:12;flex:none;justify-content:flex-end;
}
.topbar .brand{display:none!important}
.topbar .pill{min-height:44px;min-width:44px;font-size:clamp(12px,3vw,15px);padding:7px 9px;
 background:#fffaf6f0;border-radius:12px;box-shadow:2px 2px #eac6d4;}
.timeline,.progressTrack{display:none!important}
/* Reserve actual top space for the hair silhouette, including the iPhone safe area.
 The body and its scale remain the same for every character. */
.spriteHolder{
 height:min(75dvh,650px,calc(100dvh - var(--dialog-bottom) - var(--dialog-h) + 35px - env(safe-area-inset-top) - 64px));
 max-height:none;min-height:0;overflow:visible;
}
.spriteHolder img,.spriteHolder canvas{
 image-rendering:pixelated!important;object-fit:contain;object-position:center bottom;
 filter:none;
}
/* Only the two large actions appear above the dialogue, without a question label. */
.choiceArea{padding:9px 10px 12px!important}
.choiceArea p{display:none!important}
.dialogText{white-space:pre-wrap;line-break:strict;word-break:normal;overflow-wrap:anywhere}
@media(min-width:850px){
 .spriteHolder{height:min(79dvh,790px,calc(100dvh - var(--dialog-bottom) - var(--dialog-h) + 35px - env(safe-area-inset-top) - 66px))}
 .topbar{right:18px}
}
@media(max-height:520px){
 .topbar{top:calc(env(safe-area-inset-top) + 3px);gap:4px!important}
 .topbar .pill{min-height:34px;min-width:38px;padding:4px 7px;font-size:12px}
 .spriteHolder{height:min(78dvh,430px,calc(100dvh - var(--dialog-bottom) - var(--dialog-h) + 18px - env(safe-area-inset-top) - 42px))}
 .choiceArea{padding:5px 8px!important}
}
@media(max-height:340px){
 .spriteHolder{height:min(72dvh,275px,calc(100dvh - var(--dialog-bottom) - var(--dialog-h) + 18px - env(safe-area-inset-top) - 36px))}
 .choiceArea{padding:4px 6px!important}
}
/* The location/time stamp also belongs to the removed top-status UI. */
.sceneStamp{display:none!important}

/* v12 requested adjustments. Preserve the fixed text box height while its
   solid lower panel fully masks the sprite cutoff and Safari safe-area. */
:root{--dialog-bottom:0px;--dialog-extra:calc(env(safe-area-inset-bottom) + 10px)}
.interaction::before{content:"";position:absolute;bottom:0;left:0;right:0;height:calc(var(--dialog-h) + var(--dialog-extra));background:#fffafc;pointer-events:none;z-index:1}
.dialogbox{bottom:0!important;left:0!important;right:0!important;border-radius:14px 14px 0 0!important;border-bottom:0!important;box-shadow:none!important;background:#fffafc!important;height:calc(var(--dialog-h) + var(--dialog-extra))!important;min-height:calc(var(--dialog-h) + var(--dialog-extra))!important;max-height:calc(var(--dialog-h) + var(--dialog-extra))!important;padding-bottom:var(--dialog-extra)!important;z-index:2}
.choiceArea,.afterArea{bottom:calc(var(--dialog-h) + var(--dialog-extra))!important;z-index:3}
.interactionFoot{bottom:calc(var(--dialog-h) + var(--dialog-extra) + 4px)!important;z-index:2}
.spriteHolder{bottom:calc(var(--dialog-h) + var(--dialog-extra) - 35px)!important}
.spriteHolder img{position:absolute;bottom:0;left:50%;transform:translateX(-50%)}
/* No crossfade: exactly one opaque PNG-equivalent sprite is displayed at a time. */
.spriteHolder #customSprite,.spriteHolder #normalSprite{will-change:auto;transition:none!important;animation:none!important}
.roundHud{position:absolute;z-index:3;top:calc(env(safe-area-inset-top) + 10px);left:clamp(9px,2.6vw,19px);display:flex;flex-direction:column;gap:4px;max-width:calc(100vw - 186px);pointer-events:none}
#roundCount{width:fit-content;border-radius:8px;background:#241b29c9;color:#fff;font-size:12px;font-weight:800;letter-spacing:.06em;padding:5px 8px;font-variant-numeric:tabular-nums}
.roundPerson{display:block;width:fit-content;max-width:100%;border-radius:8px;background:#fffaf9ee;color:#362738;border:1px solid #5a4252a8;font-size:12px;font-weight:850;line-height:1.35;padding:5px 8px;overflow-wrap:anywhere}
.endTile img{width:100%!important;height:auto!important;aspect-ratio:4/5!important;object-fit:cover!important}
.endTile.locked>div:first-child{aspect-ratio:4/5!important}
.endZoom{min-height:0!important}
.endStill{width:min(100%,min(55vh,520px)*.8)!important;max-height:min(65dvh,650px)!important;aspect-ratio:4/5!important;height:auto!important;object-fit:cover!important;margin:auto}
@media(max-height:520px){:root{--dialog-extra:calc(env(safe-area-inset-bottom) + 4px)}.roundHud{top:calc(env(safe-area-inset-top) + 3px);gap:2px}#roundCount,.roundPerson{font-size:10px;padding:3px 5px}}

/* Final score: visible only after the ten-line ending script, clear of controls. */
.resultScorePanel{position:absolute;z-index:5;top:calc(env(safe-area-inset-top) + 64px);left:50%;transform:translateX(-50%);width:min(calc(100% - 24px),470px);background:#fffafcf2;border:3px solid #443342;border-radius:13px;box-shadow:4px 4px 0 #e7b6c9;padding:9px 11px;text-align:center;pointer-events:none;color:#342638}.resultScoreLabel{color:#c33c7a;font-weight:950;letter-spacing:.15em;font-size:11px}.resultScoreValue{font-size:clamp(34px,10vw,58px);font-weight:1000;line-height:1.08;font-variant-numeric:tabular-nums}.resultScoreValue small{font-size:clamp(15px,4vw,23px);font-weight:850}.resultCounts{display:flex;justify-content:center;gap:clamp(7px,2vw,19px);flex-wrap:wrap;font-size:clamp(10px,2.85vw,13px);font-weight:900;line-height:1.35}.resultCounts b{font-size:1.1em}.resultScorePanel[hidden]{display:none!important}@media(max-height:520px){.resultScorePanel{padding:3px 8px;top:calc(env(safe-area-inset-top) + 43px)}.resultScoreLabel{font-size:8px}.resultScoreValue{font-size:27px}.resultScoreValue small{font-size:12px}.resultCounts{font-size:10px;gap:7px}}

/* Conversation windows: square corners; keep existing box geometry intact. */
.dialogbox,.debugCastDialogue{border-radius:0!important}

/* Gyaru book: scrollable face list, immediate full profile on tap. */
.bookPortraitList{display:flex;flex-direction:column;gap:9px;margin:14px 0 18px}
.bookPortraitEntry{display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:103px;text-align:left;padding:8px 9px;border:2px solid #d7b0c2;border-radius:4px;background:#fff;color:#332634;touch-action:manipulation}
.bookPortraitEntry:active{background:#fff0f5}
.bookPortraitEntry:focus-visible,.bookBackButton:focus-visible{outline:3px solid #1888db;outline-offset:2px}
.bookThumb{width:84px;height:84px;flex:0 0 84px;position:relative;overflow:hidden;display:block;background:#f6ebef;border:1px solid #e8d2dc;border-radius:2px}
.bookThumb img{position:absolute;top:0;left:50%;width:127px;height:auto;max-width:none;transform:translateX(-50%);image-rendering:pixelated}
.bookImageMissing{font-size:10px;color:#786b77}
.bookEntryText{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;line-height:1.3}
.bookEntryNo{font-size:10px;font-weight:900;letter-spacing:.08em;color:#a84b79}
.bookEntryText strong{font-size:17px;overflow-wrap:anywhere}
.bookEntryText small{font-size:11px;color:#786477;font-weight:650}
.bookEntryStyle{font-size:12px;color:#685461;overflow-wrap:anywhere}
.bookEntrySide{flex:0 0 auto;align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;gap:4px}
.bookSeen{font-size:10px;font-weight:800;color:#796a76;border:1px solid #d5c4cf;border-radius:2px;padding:3px 4px;background:#f5eef2;white-space:nowrap}
.bookSeen.isSeen{background:#ffdeec;color:#953a6b;border-color:#edb9cf}
.bookEntryArrow{font-size:29px;line-height:25px;color:#ab4b76}
.bookProfileNav{position:sticky;top:-20px;z-index:2;background:#fffafc;padding:5px 0 10px;margin:-5px 0 12px;border-bottom:1px solid #ead0dc}
.bookBackButton{min-height:45px;width:100%;border:2px solid #43323e;background:#f6c3d8;color:#342431;font-weight:900;font-size:15px;text-align:left;padding:8px 12px;border-radius:3px}
.bookProfileName{font-size:clamp(24px,6.5vw,32px)!important;margin-bottom:5px!important}
.bookProfileName small{font-size:13px;font-weight:700;color:#7e6878;white-space:nowrap}
.bookProfileStatus{display:inline-block;background:#fff0f5;border:1px solid #e7a9c5;color:#925379;padding:4px 9px;font-size:12px;font-weight:800;margin:0 0 12px}
.bookProfilePortrait{height:clamp(195px,37dvh,300px);width:100%;display:flex;align-items:end;justify-content:center;overflow:hidden;background:#f7eaf0;border:1px solid #dfcbd6}
.bookProfilePortrait img{height:100%;width:auto;max-width:100%;object-fit:contain;object-position:center bottom;image-rendering:pixelated}
.bookProfileInfo{margin:14px 0 9px;display:flex;flex-direction:column;gap:8px}
.bookProfileField{display:flex;flex-direction:column;gap:5px;border-bottom:1px solid #ead6e1;padding:3px 0 10px}
.bookProfileField>span{color:#a54678;font-size:11px;font-weight:900;letter-spacing:.04em}
.bookProfileField strong{font-size:15px;line-height:1.6}
.bookProfileField p{margin:0;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.sheet{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
@media(max-width:359px){.bookPortraitEntry{gap:8px;padding:6px;min-height:91px}.bookThumb{height:75px;width:75px;flex-basis:75px}.bookThumb img{width:115px}.bookEntryText strong{font-size:15px}.bookEntryText small{font-size:10px}.bookSeen{font-size:9px}}

/* Book unlock rules and reaction-face thumbnails; book scrolls, dialogue never does. */
.bookThumb img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;transform:none;image-rendering:pixelated}
.bookPortraitEntry.isLocked{background:#f4eef2;border-color:#d7cbd4;color:#8a7b87;cursor:default}
.bookThumbLocked{display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:900;letter-spacing:.03em;background:repeating-linear-gradient(135deg,#eee4eb 0 10px,#f7f1f5 10px 20px);color:#776b78}
.bookPortraitEntry.isLocked .bookEntryNo{color:#93868f}
.bookPortraitEntry.isLocked .bookEntryStyle{color:#8a7d87}
.bookPortraitEntry.isLocked .bookEntryArrow{font-size:15px}
.bookSeen.isKind,.bookProfileStatus.isKind{background:#ffe0ee;color:#9a356b;border-color:#ebadc8}
.bookSeen.isHarsh,.bookProfileStatus.isHarsh{background:#eee7ef;color:#5a465d;border-color:#c4b7c9}
.dialogbox .dialogText{overflow:hidden!important;overflow-y:hidden!important;overflow-x:hidden!important;overscroll-behavior:none;white-space:pre-wrap;word-break:normal}


/* X reporting is the primary END action: visually largest without changing behaviour. */
.afterArea #shareBtn{
  order:-1;
  flex:0 0 100%;
  min-height:70px;
  padding:12px 16px;
  font-size:clamp(18px,4.8vw,24px);
  font-weight:950;
  touch-action:manipulation;
}
#nativeShare,#endShareHere{
  min-height:64px;
  padding:12px 10px;
  font-size:clamp(18px,4.6vw,22px);
  font-weight:950;
  touch-action:manipulation;
}
@media(max-height:520px){
  .afterArea #shareBtn{min-height:52px;padding:7px 10px;font-size:clamp(16px,3.2vw,19px)}
  #nativeShare,#endShareHere{min-height:52px;font-size:18px}
}
@media(max-height:340px){
  .afterArea #shareBtn{min-height:44px;padding:4px 8px;font-size:16px}
}


/* Heisei 2008 Gyaru / expressive but readable polish. Applies to the game, not debug. */
:root{--gyaru-plum:#51314c;--gyaru-pink:#ef72a8;--gyaru-gold:#f5c981;--gyaru-cream:#fffaf6}
/* 01 / Dialogue: permanent dimensions, delicate gradient, double rule and ribbon nameplate. */
.interaction::before{background:linear-gradient(180deg,#fff4f9 0%,#fff9fb 65%,#fff2f8 100%)}
.dialogbox{
 background:linear-gradient(160deg,#fffcfd 0%,#fff2f8 100%)!important;
 border-top:4px solid #d65e95!important;
 box-shadow:inset 0 4px 0 #ffe0ef!important;
}
.dialogbox::after{
 content:"";position:absolute;inset:7px 7px calc(var(--dialog-extra) + 6px);
 border:1px solid rgba(223,140,175,.25);border-bottom:0;
 pointer-events:none;
}
.speaker{position:relative;display:inline-flex!important;align-items:center;
 min-height:22px!important;padding:0 16px 0 8px!important;margin:0 0 1px -3px;
 color:#7a2f58!important;background:linear-gradient(95deg,#ffd6e8,#fff1f8 95%);
 border-left:3px solid #db5d94;border-radius:2px 10px 10px 2px;
 font-size:clamp(12px,3.6vw,15px)!important;letter-spacing:.03em}
.dialogText{position:relative;z-index:1;font-family:"Hiragino Mincho ProN","Yu Mincho","YuMincho",serif!important;
 font-weight:900!important;color:#2c2130;letter-spacing:-.025em!important}
/* 02 / Keitai-key inspired tactile decisions: same hit targets and layout. */
.choiceArea{background:linear-gradient(180deg,#fffbfdf5,#ffedf6f1)!important;
 border-color:#68435f!important;box-shadow:0 4px 15px #42273844,inset 0 0 0 2px #fff8fd!important}
.choice,.wideButton,.modalButton{position:relative;overflow:hidden;transition:filter .12s ease,box-shadow .12s ease,translate .12s ease}
.choice{border-color:#52314a!important;border-radius:14px!important;
 box-shadow:0 3px 0 #573a50,0 5px 10px #6e34501b,inset 0 2px 0 #ffffffa8!important;
 text-shadow:0 1px 0 #ffffff8c;letter-spacing:.012em}
.choice::before{content:"";position:absolute;inset:3px 5px 51% 5px;
 border-radius:9px 9px 13px 13px;pointer-events:none;
 background:linear-gradient(#ffffff82,#ffffff05)}
.choice.yes{background:linear-gradient(#ffc6df,#f58bb6 65%,#e974a4)!important}
.choice.no{background:linear-gradient(#d8fbfa,#b4e7e8 65%,#95d6da)!important}
.choice:active,.wideButton:active,.modalButton:active{translate:0 2px!important;box-shadow:0 1px 0 #573a50,inset 0 1px 0 #ffffff8c!important;filter:saturate(1.13)}
.choice:focus-visible{outline:3px solid #207bbb;outline-offset:3px}
.wideButton{background:linear-gradient(#ffd2e5,#f5a7c9)!important;border-color:#694459!important;border-radius:12px!important}
/* 03 / Compact glassy floating tool buttons, keep >=44px hit area except short landscape. */
.topbar{gap:6px!important}
.topbar .pill{min-height:44px;min-width:44px;border:1.5px solid #8d5774!important;
 background:linear-gradient(160deg,#fffdfdf5,#ffe7f3f2)!important;color:#512b49;
 box-shadow:0 2px 0 #e0a0bf,0 4px 12px #32132625!important;
 border-radius:13px!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#roundCount{border-radius:13px!important;background:#51314ccf!important;border:1px solid #ffdeed7a;
 box-shadow:0 2px 5px #28172836;letter-spacing:.1em}
.roundPerson{border:1px solid #bf7ca2!important;background:#fffcf9ec!important;
 box-shadow:0 2px 6px #4020382a;border-radius:11px!important;color:#66324f!important}
/* 04 / Arrival only on a new girl; no scale or position changes between expressions. */
@keyframes gyaruArrive{0%{opacity:.15;transform:translate(-50%,8px)}100%{opacity:1;transform:translate(-50%,0)}}
.spriteHolder.character-enter{animation:gyaruArrive .21s cubic-bezier(.22,.75,.3,1) both}
/* 05 / Hearts: 15 fixed markers, updated once per encountered girl. */
.heartProgress{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:1px;
 width:min(181px,calc(100vw - 192px));min-height:22px;align-items:center;
 padding:4px 5px;background:#fffaf7e8;border:1px solid #c188a8;border-radius:10px;
 box-shadow:0 2px 5px #45263a26;line-height:1}
.heartProgress span{text-align:center;font-size:clamp(8px,2.15vw,12px);color:#c7b2c0;filter:drop-shadow(0 1px 0 #fff);font-family:Arial,sans-serif}
.heartProgress span.is-filled{color:#e4488d;text-shadow:0 1px #fff,0 0 3px #ffacd0}
/* 06 / Purikura scrapbook gallery with white photo borders and subtle tape accents. */
.sheet:has(.bookPortraitList){background:repeating-linear-gradient(150deg,#fff9fb 0 19px,#fff2f8 19px 20px,#fff9fb 20px 38px)!important}
.bookPortraitList{gap:11px!important}
.bookPortraitEntry{border:1px solid #e5b1c9!important;border-radius:13px!important;
 background:linear-gradient(112deg,#fff,#fff9fd)!important;box-shadow:2px 3px 0 #edbcd3,0 5px 10px #6a42621c;
 padding:10px!important;position:relative;isolation:isolate;overflow:hidden}
.bookPortraitEntry::before{content:"";position:absolute;right:16px;top:0;width:27px;height:9px;
 background:repeating-linear-gradient(120deg,#f7aac8 0 5px,#ffdce9 5px 10px);
 opacity:.68;transform:rotate(-7deg);pointer-events:none}
.bookPortraitEntry .bookThumb{width:86px!important;height:86px!important;flex:0 0 86px!important;
 border:5px solid #fff!important;border-bottom-width:11px!important;box-shadow:0 1px 6px #54364936;
 border-radius:3px!important;background:#fff0f6!important;transform:rotate(-1.3deg);overflow:hidden}
.bookPortraitEntry:nth-child(even) .bookThumb{transform:rotate(1.4deg)}
.bookThumb img{width:100%!important;height:100%!important;object-fit:cover!important;image-rendering:pixelated}
.bookEntryNo{display:inline-block;width:fit-content;padding:2px 7px;border-radius:7px;
 background:#ffe2ee;color:#9d386c!important;font-size:10px;letter-spacing:.12em}
.bookEntryText strong{color:#552e48;font-size:clamp(15px,4.2vw,18px)}
.bookSeen{border-radius:12px!important}
.bookPortraitEntry.isLocked{opacity:.85;background:linear-gradient(110deg,#f1eaf0,#faf4f7)!important}
.bookThumbLocked{background:repeating-linear-gradient(135deg,#ded2db 0 7px,#eee5ed 7px 14px)!important}
.bookProfilePortrait{border:7px solid white!important;outline:1px solid #e4b2c9;background:linear-gradient(160deg,#fce0ec,#fffafc)!important;
 box-shadow:0 4px 9px #4734452a}
.bookBackButton{border-radius:10px!important;background:linear-gradient(#ffd9e8,#f4b5cf)!important}
/* 07 / Mild tonal balance behind portrait without editing a single source photo. */
.sceneBackdrop::after{content:"";position:absolute;inset:0;pointer-events:none;
 background:radial-gradient(ellipse 59% 61% at 50% 50%,rgba(255,248,246,.035),rgba(60,29,54,.14) 100%)}
/* 08 / Tiny response sparkle, no sprite scaling and no cross-fade. */
@keyframes gyaruReactionGlow{0%,100%{filter:brightness(1)}35%{filter:brightness(1.12)}}
#customSprite.reaction-flash{animation:gyaruReactionGlow .25s ease-out 1}
/* 09 / Purikura final score card: add ornament without covering the existing score. */
.resultScorePanel{background:linear-gradient(130deg,#fffdfef7,#ffdfedf4)!important;
 border:3px double #bb6392!important;border-radius:17px!important;
 outline:2px solid #fff9fc;outline-offset:-8px;
 box-shadow:0 6px 0 #b96091,0 11px 23px #3d25413d!important}
.resultScorePanel::before,.resultScorePanel::after{position:absolute;color:#df64a2;
 font:900 20px Georgia,serif;pointer-events:none;opacity:.85}
.resultScorePanel::before{content:"✧";left:12px;top:8px}.resultScorePanel::after{content:"♡";right:12px;top:6px}
.resultScoreLabel{color:#a53e73!important;letter-spacing:.18em!important}
.resultScoreValue{color:#59314c;text-shadow:2px 2px 0 #ffd6ea;font-size:clamp(22px,6vw,34px);line-height:1.25;padding:3px 0}
.resultCounts{color:#5e4358}
/* Overlay buttons and END collection match the scrapbook tone, retain accessibility. */
.sheet{border-color:#593a50!important;box-shadow:5px 6px #d96b9d!important}
.sheet .sectionLabel{color:#b8467e!important}
.modalButton{border-radius:11px!important}
.endTile{border-radius:12px!important;background:linear-gradient(120deg,#fff,#fff5f9)!important;box-shadow:1px 3px #e9bbd1}
.endTile img{border:5px solid #fff;box-shadow:0 2px 5px #45334340}
@media(max-width:359px){.bookPortraitEntry .bookThumb{width:72px!important;height:72px!important;flex-basis:72px!important}.heartProgress{width:min(165px,calc(100vw - 164px))}.heartProgress span{font-size:8px}}
@media(max-height:520px){.topbar .pill{min-width:38px;min-height:34px}.heartProgress{min-height:17px;padding:2px 4px}.heartProgress span{font-size:9px}.resultScorePanel::before,.resultScorePanel::after{font-size:15px}}
@media(prefers-reduced-motion:reduce){.spriteHolder.character-enter,#customSprite.reaction-flash{animation:none!important}.choice,.wideButton,.modalButton{transition:none!important}}

/* Narrow phones: keep the character name on one line without covering the portrait. */
@media(max-width:430px){.roundPerson{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}}
/* Landscape: keep the two primary choices and top actions easy to tap. */
@media(max-height:520px){.choice{min-height:44px}.topbar .pill{min-height:44px;min-width:44px}}
@media(max-height:340px){.choice{min-height:44px}}

/* Character icons: fixed dimensions; no change to game logic or existing layout. */
.roundPerson{display:inline-flex!important;align-items:center;gap:5px;max-width:calc(100vw - 174px);min-height:35px;white-space:nowrap!important}
.charBadgeIcon{display:block;flex:0 0 27px;width:27px;height:27px;object-fit:contain;image-rendering:pixelated}
.charBadgeName{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bookNameWithIcon{display:flex!important;gap:5px;align-items:center;min-width:0;flex-wrap:wrap}
.bookNameIcon{display:inline-block;flex:none;object-fit:contain;image-rendering:pixelated}
.bookProfileName{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.bookProfileIcon{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}
@media(max-width:359px){.roundPerson{max-width:calc(100vw - 152px);gap:4px}.charBadgeIcon{width:23px;height:23px;flex-basis:23px}.bookNameIcon{width:23px;height:23px}}
@media(max-height:520px){.roundPerson{min-height:28px}.charBadgeIcon{width:22px;height:22px;flex-basis:22px}}

/* 2008 purikura collection; isolated from the existing game and book styles. */
.puriAlbumButton{margin:12px 0 8px;background:linear-gradient(180deg,#ffe8f1,#f7a3c7)!important}
.puriGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 20px}
.puriTile{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0;padding:8px;background:#fff;border:2px solid #e0a8c3;border-radius:12px;box-shadow:0 3px 0 #e9c9d9;color:#54384b;font:inherit;text-align:center;cursor:pointer;touch-action:manipulation}
.puriTile:focus-visible,.puriProfileButton:focus-visible{outline:3px solid #1888db;outline-offset:2px}
.puriPreview{display:block;width:100%;aspect-ratio:4/5;overflow:hidden;border:4px solid white;background:#f9e3ed;box-shadow:0 1px 5px #53334230}
.puriPreview img{display:block;width:100%;height:100%;object-fit:contain}
.puriTile strong{font-size:15px;margin-top:7px}.puriTile small{font-size:11px;color:#9e5080;margin-top:3px}
.puriLocked{background:#f5eef2;border-color:#d8ced7;box-shadow:none;cursor:default;color:#8d7e87}
.puriMissing{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:repeating-linear-gradient(145deg,#eadbe5 0 12px,#f5e9f0 12px 24px)}
.puriMissing span{font-size:38px;color:#b99cae}.puriMissing b{font-size:12px;letter-spacing:.18em;color:#897281}
.puriFullFrame{background:#fff;border:7px solid white;box-shadow:0 3px 10px #55354732;max-width:460px;margin:8px auto 14px}
.puriFullImage{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:contain}
.bookProfilePuri{margin:17px 0 13px;padding:12px;border:1px solid #e4b1c9;border-radius:12px;background:#fff4f8}
.bookProfilePuri .tiny{margin:8px 0 0}.puriProfileButton{display:flex;align-items:center;gap:12px;width:100%;min-height:96px;margin-top:9px;padding:8px;background:white;border:1px solid #e6bfd1;border-radius:10px;font:inherit;font-weight:900;text-align:left;color:#79365c;cursor:pointer}
.puriProfileButton img{display:block;width:66px;height:83px;flex:0 0 66px;object-fit:contain;border:2px solid white;box-shadow:0 1px 4px #42263a3d}
@media(max-width:359px){.puriGrid{gap:7px}.puriTile{padding:5px}.puriTile strong{font-size:13px}.puriTile small{font-size:10px}}

/* Purikura meet reminder: response final line only; never changes dialogue height or touch targets. */
.puriMeetNotice{position:absolute;z-index:5;bottom:calc(var(--dialog-h) + var(--dialog-extra) + 13px);left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px);padding:9px 14px;border:2px solid #b86b95;border-radius:15px;background:#fff8fced;box-shadow:0 3px 8px #43243b38;color:#843d6a;font-size:clamp(12px,3.5vw,15px);font-weight:900;line-height:1.4;text-align:center;pointer-events:none;white-space:normal;text-wrap:balance}
@media(max-height:520px){.puriMeetNotice{bottom:calc(var(--dialog-h) + var(--dialog-extra) + 6px);padding:5px 9px;font-size:11px;line-height:1.25}}

/* v41: third-encounter purikura pop and conversation-only secret collection. */
.puriRevealOverlay .sheet{max-width:min(94vw,495px);padding:14px 14px 17px;animation:puriPopIn .32s cubic-bezier(.2,1.45,.3,1) both}
.puriRevealBox{text-align:center}
.puriRevealBox h2{font-size:clamp(19px,5.1vw,25px);margin:7px 0 10px}
.puriRevealImageButton{display:block;margin:auto;width:min(100%,282px);padding:6px;background:white;border:2px solid #de8fb3;box-shadow:3px 4px #f2beda;border-radius:9px;color:#813b65;font-size:13px;font-weight:900}
.puriRevealImageButton img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:contain}
.puriRevealImageButton span{display:block;padding:5px 1px 2px}
.puriRevealBox p.tiny{line-height:1.45;margin:9px 0}
.puriRevealBox .modalButton{margin-top:8px}
.secretNewBadge{font-size:11px;font-weight:950;color:#c31c66;background:#ffe3ee;border:1px solid #eaa0c0;padding:2px 5px;border-radius:6px;white-space:nowrap}
.secretLinesPanel{background:#fff2f8;border:1px solid #e5b0c8;padding:12px;margin:17px 0;border-radius:12px}
.secretLinesPanel .tiny{margin:5px 0 9px}
.secretLineItem{padding:8px 9px;background:#fff;border:1px solid #eed6e2;border-radius:8px;margin:7px 0;text-align:left;overflow-wrap:anywhere}
.secretLineItem>span{font-size:11px;color:#a43c72;font-weight:950}
.secretLineItem p{font-size:14px;line-height:1.5;margin:4px 0 1px}
.secretLineItem.isLocked{background:#f6f1f5;color:#796c79}
.secretLineItem.isLocked>span{color:#827180}
@keyframes puriPopIn{from{transform:scale(.76) rotate(-3deg);opacity:.25}to{transform:scale(1) rotate(0);opacity:1}}
@media(max-height:610px){.puriRevealOverlay .sheet{padding:8px 12px}.puriRevealBox h2{font-size:19px;margin:3px 0 6px}.puriRevealImageButton{width:min(100%,170px)}.puriRevealBox p.tiny{margin:4px 0}.puriRevealImageButton span{padding:3px 0}}
@media(prefers-reduced-motion:reduce){.puriRevealOverlay .sheet{animation:none}}
