/* Night reading: the exchange takes precedence when he turns toward you. */
.actor-presence,.actor-gaze{position:absolute;inset:0;transform-origin:50% 68%;pointer-events:none}
.actor-presence{animation:presence-breathe 7s ease-in-out infinite}
.actor-gaze{transition:transform 350ms cubic-bezier(.22,1,.36,1)}
.actor-expression-layers{transform-origin:50% 100%;overflow:visible}
.actor-presence{transform-origin:50% 100%}
@keyframes presence-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(1.5px) scale(1.008)}}
.actor-stage[data-presence-paused=true] .actor-presence{animation-play-state:paused}
.actor-stage[data-reaction] .actor-presence{animation-play-state:paused}
.company-invitation{position:absolute;z-index:4;left:calc(50% - 350px);bottom:calc(var(--dialogue-height,240px) + var(--tools-height,64px) + 14px);display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 16px;border:1px solid #d3a3a05c;border-radius:12px;background:#301a22ed;color:#f6dce1;font:14px var(--serif);cursor:pointer;transition:background 180ms ease-out,border-color 180ms ease-out}
.company-invitation svg{width:19px;height:19px;flex-shrink:0}.company-invitation:hover{background:#633343;border-color:#e8bac6}.company-invitation:active{background:#794255}.company-invitation[hidden]{display:none}
.game-scene.actor-stage .dialogue-card{width:calc(100% - 48px);max-width:1120px;justify-self:center;margin:0 24px 8px;border:1px solid #b8878057;border-radius:22px;background:#29171dec;box-shadow:none;padding:16px 28px 10px;transition:background 240ms ease-out,border-color 240ms ease-out}
.game-scene[data-dialogue-mode=reaction] .dialogue-card,.game-scene[data-dialogue-mode=chat] .dialogue-card{background:#351d29f5;border-color:#d2a5ac85}
.game-scene .dialogue-heading strong{color:#efccd0;font-weight:400;letter-spacing:3px}
.game-scene .dialogue-heading:after{content:'';display:block;width:19px;height:19px;background:#dfaaa9;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.25' d='M12 20S2 14 2 7c0-5 7-6 10-1 3-5 10-4 10 1 0 7-10 13-10 13Z'/%3E%3C/svg%3E") center/contain no-repeat}
.actor-direction{grid-column:1/-1;font:12px/1.7 var(--serif);color:#debcc3;margin:0 0 10px;min-height:20px}.actor-direction[hidden]{display:none}
.game-scene .dialogue-scroll>p{font-weight:400}.game-scene[data-dialogue-mode=reaction] .dialogue-scroll>p{color:#fff0e9}
.game-scene .actor-choices button{background:#4a2b37;border-color:#aa798877;border-radius:12px;color:#fce7e9}
.game-scene .actor-choices button:hover{background:#704255;border-color:#dda5b5}.game-scene .actor-choices button:after{color:#e4acb7}
.game-scene .dialogue-controls{background:#29171d;border-top-color:#b887803b}.game-scene:not([data-dialogue-mode=lesson]) .dialogue-controls{background:#351d29}
.game-scene .actor-chat-open{color:#e2b5c0}.game-scene .dialogue-controls .button{color:#f5d6df}
.game-scene .game-tools{background:#1f1118}.game-scene .interaction-button,.game-scene .interaction-button small,.game-scene .whisper-button{color:#ebc4cc}
.game-scene .heart-button svg{fill:#b665793d;stroke:#f3b2c4}.game-scene .heart-button:active svg{fill:#d893a6}
.in-game:has(.game-scene:not([data-dialogue-mode=lesson])) .game-chapter{visibility:hidden}
.game-scene .heart-particles span{color:#f5b5cb}
.auth-page{background:#291922;color:#f9e8e5;grid-template-columns:1.12fr 1fr}
.auth-panel{background:#291922;padding:48px 8%}.auth-form-wrap{max-width:390px}
.auth-form-wrap>h1{font-size:36px;line-height:1.5;color:#f8dfe3;letter-spacing:1px}
.auth-form-wrap .auth-intro{color:#dfbfc8;font:16px/1.9 var(--serif);margin-bottom:28px}
.auth-seal{display:grid;place-items:center;width:44px;height:44px;border:1px solid #d69ca76b;border-radius:50%;color:#e9b4bf;margin-bottom:20px}.auth-seal svg{width:23px;height:23px}
.auth-art:after{background:linear-gradient(0deg,#291922df,transparent 60%)}.auth-art>div:last-child{bottom:8%;max-width:80%}.auth-art>div:last-child p{letter-spacing:1px}.auth-art h1{font-size:44px;letter-spacing:4px}
.auth-page #login-form label{color:#e3c2cb}.auth-page #login-form input{background:#35242e;color:#fff0ed;border-color:#98707e;border-radius:10px}.auth-page #login-form input::placeholder{color:#d5b4bd}.auth-page #login-form input:focus{outline-color:#e6aebf;caret-color:#f3b6c9}
.auth-page #login-form>.button{background:#a75b72;color:#fff8fa;border-radius:12px;min-height:52px;font-size:16px;transition:background 180ms ease-out}.auth-page #login-form>.button:hover{background:#a65b74}
.auth-page .auth-footer{color:#dbb9c4;border-top-color:#98707e55}.auth-form-wrap>.ambient-control{color:#e3b6c3}.auth-page .form-error{color:#ffc7cb!important}
body:has(.auth-page) .ambient-hearts>span{color:#e8adbf}
.auth-page ::selection{background:#905568;color:#fff5f6}
@media(min-width:801px){.game-scene .dialogue-scroll{max-height:120px}.game-scene[data-dialogue-mode=reaction] .dialogue-scroll>p{font-size:23px;line-height:1.8}.game-scene .actor-direction{font-size:13px}.game-scene .game-tools{padding-left:max(28px,calc((100vw - 1060px)/2));padding-right:max(28px,calc((100vw - 1060px)/2))}}
@media(max-width:800px){.company-invitation{left:14px;bottom:calc(var(--dialogue-height,240px) + var(--tools-height,62px) + 10px);font-size:12px;padding:8px 12px;min-height:44px}.game-scene.actor-stage .dialogue-card{width:calc(100% - 16px);margin:0 8px 5px;padding:10px 14px 7px;border-radius:18px}.game-scene .dialogue-heading:after{display:none}.game-scene .actor-direction{font-size:11px;margin-bottom:6px}.game-scene .actor-choices button{font-size:14px}.game-scene .dialogue-controls{margin-top:6px}.auth-form-wrap>h1{font-size:30px}}
@media(max-width:550px){.auth-art{height:210px;background:#291922}.auth-art:after{background:linear-gradient(90deg,#291922,transparent 88%)}.auth-art>div:last-child{left:24px;bottom:32px;max-width:54%}.auth-art h1{font-size:28px}.auth-panel{padding:22px 24px 28px}.auth-seal{display:none}.auth-form-wrap>h1{font-size:28px;margin-top:0}.auth-form-wrap .auth-intro{font-size:14px;margin-bottom:22px}}
@media(max-height:620px){.game-scene.actor-stage{--portrait-floor:100px;grid-template-rows:minmax(var(--portrait-floor),1fr) auto auto}.game-scene.actor-stage>.portrait{min-height:0}.company-invitation{padding:6px 10px;bottom:calc(var(--dialogue-height,220px) + var(--tools-height,54px) + 5px);font-size:11px}.game-scene .actor-direction{font-size:10px;min-height:0;margin-bottom:3px}.game-scene.actor-stage .dialogue-card{padding-top:6px;max-height:min(54dvh,calc(var(--game-height) - 52px - var(--portrait-floor) - var(--tools-height,62px) - 8px))}.auth-art{height:145px}.auth-seal{display:none}}
@media(min-width:801px) and (max-height:620px){.game-scene.actor-stage{--portrait-floor:150px}}
@media(prefers-reduced-motion:reduce){.actor-presence{animation:none}.actor-gaze,.game-scene.actor-stage .dialogue-card,.company-invitation,.auth-page #login-form>.button{transition:none}}
