/* The title is a film frame. Typesetting and menus remain crisp, live UI. */
@font-face{font-family:GalgameTitle;src:url('fonts/galgame-title.woff2') format('woff2');font-weight:500;font-display:block}
#game-shell[data-screen="title"] #room{object-position:65% 50%;filter:none;transform:none}
#game-shell[data-screen="title"] #curtain-light{display:none}
#title-screen,#game-shell[data-completed="true"] #title-screen{background:linear-gradient(90deg,#070e17b8 0%,#08111b70 32%,transparent 65%),linear-gradient(0deg,#070a12c4,transparent 30%)}
#title-screen::before{inset:0;border:0;border-block:clamp(10px,3vh,30px) solid #060b12;mask-image:none}
#title-screen::after{content:'';position:absolute;inset:0;pointer-events:none;opacity:.075;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23g)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}
.title-content{left:9%;top:15%;bottom:auto;width:48%;animation:titleIn 1.5s ease both;z-index:2}
.title-content h1{font-family:GalgameTitle,GalgameWenKai;font-size:clamp(38px,4.7vw,76px);line-height:1.4;font-weight:500;letter-spacing:.15em;color:#f5efdf;text-shadow:0 2px 20px #0008;max-width:none}
.title-content h1 span{display:block}
.chapter-name{font:11px/1.7 GalgameUI;letter-spacing:.34em;color:#c5bfb4;margin:18px 0 0 3px}
.title-actions{display:flex;flex-direction:column;width:220px;margin-top:36px;gap:0}
.title-actions button,.title-actions #start,.title-actions #continue{display:flex;align-items:center;justify-content:space-between;min-height:39px;padding:7px 0 7px 23px;clip-path:none;border:0;box-shadow:none;background:none;color:#deded4;font:17px/1.3 GalgameUI;letter-spacing:.19em;text-shadow:0 1px 9px #0008;transition:color .25s,transform .3s}
.title-actions button::before{content:'';position:absolute;left:0;top:50%;width:10px;height:1px;background:#f3cd8a;opacity:0;transform:scaleX(0);transform-origin:left;transition:transform .25s,opacity .25s}
.title-actions button:hover,.title-actions button:focus-visible{padding-left:23px;background:none;color:#ffe9b2;transform:translateX(5px)}
.title-actions button:hover::before,.title-actions button:focus-visible::before{opacity:1;transform:scaleX(1)}
.title-actions button span{font-size:12px;opacity:.4}
.title-actions #start,.title-actions #continue{color:#fff2d5;font-size:19px;min-height:47px;margin-bottom:5px}
#title-postlude,#title-postlude.is-new{color:#ffe2a0;box-shadow:none;animation:none;overflow:visible}
#title-postlude span{width:28px;height:28px;opacity:1;background:none;clip-path:none;transform:none}
#title-postlude.is-new{text-shadow:0 0 8px #ffc857b3,0 0 25px #d6922c99;animation:invitationGold 2.7s ease-in-out infinite}
#title-postlude.is-new::after{left:18px;right:0;top:auto;bottom:3px;width:auto;height:1px;border-radius:0;background:linear-gradient(90deg,#e5b455cc,#ffecb544,transparent);box-shadow:0 0 16px #ffd578;animation:goldTravel 2.9s ease-in-out infinite}
.creator-link{bottom:calc(4vh + env(safe-area-inset-bottom));right:4%;border:0;backdrop-filter:none;background:none;padding:10px 0;color:#c7cbd0;font-size:11px;gap:10px;z-index:3}.creator-link:hover{background:none;color:#fff3d8}.creator-link span{color:#a6abb1;font-size:10px}
#game-shell[data-postlude="true"][data-screen="title"] #room{object-fit:contain;background:#06090d;filter:none;object-position:center}
#game-shell[data-postlude="true"][data-screen="title"] #title-screen{background:linear-gradient(90deg,#0c1118bd,transparent 68%)}
.reset-progress{margin-top:24px!important;color:#bc9389!important;border-top:1px solid #b4937540!important;padding-top:18px!important}
/* One pixel model, independent of generated plates and screen sizes. */
.tiny-claude{display:inline-block;width:100%;aspect-ratio:36/34;line-height:0;vertical-align:middle;filter:drop-shadow(0 3px 3px #0004)}
.tiny-claude svg{width:100%;height:100%;overflow:visible;image-rendering:pixelated}
.tiny-claude .crab-claw,.tiny-claude .crab-legs{transform-box:fill-box;transform-origin:50% 100%}
.tiny-claude .crab-eyes{transform-box:fill-box;transform-origin:center;animation:crabBlink 5.1s steps(1) infinite}
.tiny-claude[data-pose="wave"] .crab-claw.right{animation:crabWave .7s steps(3) infinite alternate}
.tiny-claude[data-pose="drag"] .crab-legs.left{animation:crabScuttle .22s steps(2) infinite alternate}.tiny-claude[data-pose="drag"] .crab-legs.right{animation:crabScuttle .22s .11s steps(2) infinite alternate}
.tiny-claude[data-pose="drag"] .crab-body{animation:crabBreathe .44s steps(2) infinite}
.chorus-terminal .tiny-claude{width:42%;max-width:80px}
.phone-response{left:30.4%;top:32.1%;width:13.5%;height:43.7%;right:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#f6da9b;overflow:hidden;filter:drop-shadow(0 0 8px #d7b96744)}
.phone-response .tiny-claude{width:50%;animation:phoneCrabArrival 1.8s steps(12) both}
.phone-response p{font:2.15cqw/1.3 GalgameWenKai;margin:13% 0 0;animation:phoneReply .7s 1.3s both}
.phone-frame{width:min(100cqw,177.68cqh);height:min(100cqh,56.28cqw)}
.palm-gallery{position:relative;width:min(100cqw,177.68cqh);height:min(100cqh,56.28cqw)}.palm-gallery>img{width:100%;height:100%;object-fit:contain}.palm-crab{position:absolute;left:66.5%;top:53%;width:5.5%}
/* The end card remains a scene; the hidden third choice arrives after the silence. */
#ending{position:absolute;inset:0;z-index:25;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:38px;margin:0;padding:0;background:linear-gradient(0deg,#070d16e6,#080e16b0 60%,#0b111bc9);backdrop-filter:blur(4px);color:#eee9df;animation:endCardIn 1.8s ease both}
#ending .ending-part{font:clamp(25px,3.3vw,44px)/1.5 GalgameTitle,GalgameWenKai;letter-spacing:.28em;padding-left:.28em}
.ending-actions{display:flex;gap:clamp(28px,5vw,70px);margin-top:35px}
#ending .ending-actions button{border:0;border-bottom:1px solid #9e9f9e50;background:none;padding:12px 10px;min-width:110px;font:16px GalgameUI;letter-spacing:.1em;color:#bbbcb9}
#ending .ending-actions button:hover{color:#fff0ce;border-color:#e0c18e}
#ending .ending-offer{display:flex;align-items:center;justify-content:center;height:84px;margin-top:2px;position:relative;will-change:transform;width:220px}
.ending-crab{position:absolute;right:calc(100% - 5px);bottom:18px;width:49px;transform:rotate(-9deg);z-index:2}
#ending #end-fuck{font:28px/1 GalgameUI;letter-spacing:.19em;padding:20px 36px;min-width:180px;min-height:65px;border:1px solid #dcbb75;border-radius:3px;color:#ffecb9;background:linear-gradient(125deg,#534326d6,#211d16e6);box-shadow:inset 0 0 20px #f4cf6717,0 0 22px #d7a44533;opacity:1;transform-origin:0 100%;text-shadow:0 0 12px #f4cb71aa}
#ending[data-invitation="ready"] #end-fuck{animation:invitationGold 2.3s ease-in-out infinite}
#ending[data-invitation="ready"] .ending-crab{transform:none}
#ending #end-fuck:hover{background:#634a27;box-shadow:0 0 35px #f2c45c5c}
.ending-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#game-shell[data-ending="true"] #dialogue,#game-shell[data-ending="true"] .reading-header,#game-shell[data-ending="true"] #advance-area{visibility:hidden}
.painting-stage{position:relative;width:min(100cqw,177.68cqh);height:min(100cqh,56.28cqw);isolation:isolate}
.painting-room{width:100%;height:100%;object-fit:contain}
.painting-surface{position:absolute;left:39.1%;top:8.2%;width:28.55%;height:58%;overflow:hidden;clip-path:polygon(1.1% 0,100% .2%,100% 100%,0 100%);box-shadow:inset 0 0 12px #0006;background:#211a13}
.painting-surface img{width:100%;height:100%;object-fit:contain;animation:paintingUnveil 1.2s ease both}
#sticker[data-reaction]:not([data-reaction=""]){background:none!important;overflow:visible;width:clamp(180px,20vw,310px);height:clamp(180px,20vw,310px)}
#sticker[data-reaction] img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 7px #16232b35)}
/* Palm coordinates share the 1672 x 941 photograph's aspect box. */
#postlude{transition:opacity 1.4s ease}
.postlude-palm{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(100vw,177.68dvh);height:min(100dvh,56.28vw);pointer-events:none;z-index:2}
.postlude-palm>.tiny-claude{position:absolute;left:66.5%;top:53%;width:5.5%;filter:drop-shadow(0 5px 3px #66411a60)}
#postlude[data-phase="jump"] .postlude-palm>.tiny-claude{animation:crabPalmJump .9s cubic-bezier(.22,.6,.34,1) both}
#postlude[data-phase="grace"] .postlude-palm>.tiny-claude{animation:crabBreathe 1.9s steps(3) infinite}
#postlude[data-phase="away"] .postlude-vignette{background:none}
#postlude[data-phase="away"] .postlude-art,#postlude[data-phase="away"] .postlude-art-next{filter:none}
#postlude.handoff .postlude-vignette{opacity:0}
@keyframes endCardIn{from{opacity:0}to{opacity:1}}
@keyframes invitationGold{0%,100%{filter:brightness(1)}50%{filter:brightness(1.35);text-shadow:0 0 13px #ffd366,0 0 29px #e2a944}}
@keyframes goldTravel{0%,100%{opacity:.4;transform:scaleX(.55);transform-origin:left}50%{opacity:1;transform:scaleX(1)}}
@keyframes crabWave{from{transform:rotate(-12deg)}to{transform:rotate(18deg) translateY(-1px)}}
@keyframes crabBlink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.16)}}
@keyframes crabScuttle{to{transform:translate(1px,-2px)}}
@keyframes crabBreathe{50%{translate:0 -1px}}
@keyframes phoneCrabArrival{from{transform:translateX(120%) translateY(2px);opacity:0}30%{opacity:1}to{transform:none;opacity:1}}
@keyframes crabPalmJump{0%{left:36.5%;top:47%;rotate:-18deg;scale:.7}25%{left:42%;top:33%;rotate:-7deg;scale:.9}60%{left:57%;top:34%;rotate:6deg;scale:1}90%{left:66.5%;top:53%;rotate:0deg;scale:1.05 .85}100%{left:66.5%;top:53%;rotate:0deg;scale:1}}
@keyframes paintingUnveil{from{opacity:0;clip-path:inset(0 0 100% 0)}to{opacity:1;clip-path:inset(0)}}
@media(max-width:700px) and (orientation:portrait){
 #game-shell[data-screen="title"] #room{object-position:94% 50%}
 #title-screen,#game-shell[data-completed="true"] #title-screen{background:linear-gradient(0deg,#070e18f5 1%,#070e18df 23%,#08121b47 55%,#080f171a)}
 #title-screen::before{border-width:14px}
 .title-content{left:9%;right:8%;top:auto;bottom:10.5%;width:auto}
 .title-content h1{font-size:clamp(30px,8.4vw,44px);line-height:1.3;letter-spacing:.13em;text-shadow:0 2px 22px #000}
 .chapter-name{font-size:9px;letter-spacing:.23em;margin-top:11px}
 .title-actions{display:grid;grid-template-columns:1fr 1fr;column-gap:22px;gap:4px 22px;width:100%;max-width:330px;margin-top:25px}
 .title-actions button{font-size:14px;min-height:34px;padding:6px 0 6px 18px}
 .title-actions #start,.title-actions #continue{font-size:17px;min-height:39px;grid-column:1/-1;margin:0}
 .title-actions button:hover{padding-left:18px}.creator-link{bottom:3.4%;right:9%;font-size:10px}
 #title-postlude span{width:24px;height:24px}
 #ending{gap:32px}.ending-actions{gap:25px}#ending .ending-actions button{font-size:14px;min-width:100px}
 .phone-frame{transform:scale(1.45);transform-origin:35% 50%}
 #sticker[data-reaction]:not([data-reaction=""]){width:170px;height:170px}
 .postlude-line{font-size:20px;bottom:13%}
}
@media(max-height:650px) and (orientation:landscape){.title-content{top:11%;left:8%}.title-content h1{font-size:36px;line-height:1.25}.chapter-name{margin-top:9px}.title-actions{display:grid;grid-template-columns:1fr 1fr;width:360px;column-gap:24px;margin-top:18px}.title-actions button{font-size:14px;min-height:33px}.title-actions #start,.title-actions #continue{font-size:16px;min-height:35px;grid-column:1/-1}.ending-actions{margin-top:0}#ending{gap:20px}}
@media(prefers-reduced-motion:reduce){.tiny-claude *,.ending-offer *,#title-postlude.is-new,#end-fuck,.postlude-palm *{animation:none!important}}
html.reduce-motion .tiny-claude *,html.reduce-motion .ending-offer *,html.reduce-motion #title-postlude.is-new,html.reduce-motion #end-fuck,html.reduce-motion .postlude-palm *{animation:none!important}
