/* Refinamento da versão original: hierarquia, superfícies e foco. */
:root{--paper:#f5efe3;--amber:#efb280;--border:#ffffff30}
button,a,input,select{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--amber);outline-offset:5px}
.topbar{background:linear-gradient(180deg,#0b1219b8,#0b121940);border-bottom:1px solid #ffffff12;backdrop-filter:blur(12px)}
.home-copy h1{letter-spacing:-.035em;text-shadow:0 8px 45px #0003}.home-copy h2{line-height:1.25}.home-description{line-height:1.85;color:#d1d6d4}.two-experiences{border-left:2px solid #efb28060;padding-left:18px}.two-experiences p{line-height:1.8}.home-links{row-gap:12px;flex-wrap:wrap}
.primary,.next-button{border-radius:8px;box-shadow:0 5px 24px #0002;transition:background .2s,box-shadow .2s}.primary:hover,.next-button:hover{box-shadow:0 6px 28px #efb28025}.tool,.tools select{border-radius:8px}
dialog{border:1px solid #d3b29045;border-radius:16px;box-shadow:0 30px 100px #0009;background:linear-gradient(145deg,#1b2b35,#101b24)}dialog::backdrop{background:#030b14ad;backdrop-filter:blur(6px)}.close-button{border-radius:50%}.choice,.chapter-card,.download-card{border-radius:9px}.choice:hover,.chapter-card:not(:disabled):hover{border-color:#efb280b0}.scene-text{scrollbar-width:thin;scrollbar-color:#efb28066 #ffffff08}.scene-text p{line-height:1.8}.speaker{color:#efb280}.music-module{border-radius:12px;border:1px solid #e3bc9740;box-shadow:0 12px 40px #0003}.bobby-panel{border-radius:16px;box-shadow:0 20px 70px #0006}
@media(max-width:700px){dialog{border-radius:12px}.two-experiences{padding-left:14px}.home-description{line-height:1.8}.home-links{gap:18px}.primary{min-height:50px}.scene-text p{line-height:1.75}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}/* Requested layout: same right-hand framing at home and during play. */
:root{--dock-width:310px;--dock-right:4.1vw;--dock-bottom:84px;--music-dock-height:225px}
body[data-screen=home] #chapter-id{visibility:hidden}
body .music-module,body[data-screen=home] .music-module{display:block;position:fixed;top:auto;left:auto;right:var(--dock-right);bottom:var(--dock-bottom);width:var(--dock-width);margin:0;z-index:7}
body .bobby,body[data-screen=home] .bobby{position:fixed;width:var(--dock-width);right:var(--dock-right);bottom:calc(var(--dock-bottom) + var(--music-dock-height) + 18px);display:flex;justify-content:center;z-index:8}
body .bobby-launcher{flex:none}
body .bobby-panel,body[data-screen=home] .bobby-panel{right:0;bottom:64px;width:100%;height:min(480px,calc(100dvh - var(--dock-bottom) - var(--music-dock-height) - 175px));min-height:0;transform-origin:50% 100%;animation-name:bobby-panel-reveal}
body .bobby-panel.closing,body[data-screen=home] .bobby-panel.closing{animation-name:bobby-panel-hide}
body .bobby-invite,body[data-screen=home] .bobby-invite{right:0;bottom:64px;width:100%;min-height:0;padding:18px 20px;transform-origin:50% 100%;--bobby-invite-x:0px;--bobby-invite-y:20px}
.bobby-invite:after{content:'';position:absolute;left:calc(50% - 7px);bottom:-8px;width:14px;height:14px;background:#101c26;border-right:1px solid #d5ae7a9c;border-bottom:1px solid #d5ae7a9c;transform:rotate(45deg)}
.bobby-invite .bobby-eyes{display:none}
@media(max-width:1099px){:root{--dock-width:260px;--dock-right:22px;--dock-bottom:26px}.home-screen{min-height:100svh;padding-top:130px;padding-bottom:90px}.play-screen{min-height:100svh;padding-top:110px}.ending-screen{min-height:100svh}.home-copy{max-width:calc(100vw - 340px)}}
@media(max-width:700px){:root{--dock-width:min(310px,88vw);--dock-right:6vw;--dock-bottom:24px}body .music-module,body[data-screen=home] .music-module{position:relative;right:auto;bottom:auto;margin:80px 6% 0 auto;width:var(--dock-width)}body .bobby,body[data-screen=home] .bobby{position:relative;right:auto;bottom:auto;width:var(--dock-width);margin:18px 6% 0 auto;min-height:44px}body .bobby-panel,body[data-screen=home] .bobby-panel{height:min(440px,calc(100dvh - 125px));bottom:58px}body .bobby-invite,body[data-screen=home] .bobby-invite{bottom:58px}.home-screen{padding-top:25px}.home-copy{max-width:none}.play-screen{padding-top:25px}.bobby.keyboard-open{position:fixed!important;right:6vw!important;bottom:calc(var(--bobby-keyboard-bottom,0px) + 8px)!important;margin:0!important}.bobby.keyboard-open .bobby-panel{height:calc(var(--bobby-visible-height,100dvh) - 80px)!important}}.companion-dock{display:contents}
@media(max-width:700px){.companion-dock{display:flex;flex-direction:column;align-items:flex-end;gap:18px;padding:210px 6% 0}.companion-dock .bobby,.companion-dock .music-module,body[data-screen=home] .companion-dock .bobby,body[data-screen=home] .companion-dock .music-module{margin:0;width:var(--dock-width)}.companion-dock .bobby-panel,body[data-screen=home] .companion-dock .bobby-panel{height:180px;max-height:calc(100dvh - 130px)}}/* Compact Bobby conversation, with privacy outside and consent on demand. */
body .bobby-panel,body[data-screen=home] .bobby-panel{bottom:88px;height:min(380px,calc(100dvh - var(--dock-bottom) - var(--music-dock-height) - 245px));min-height:0}
.bobby-suggestions{display:flex;flex-direction:column;gap:5px;padding:0 14px 10px;flex:none}.bobby-suggestion{width:100%;min-height:30px;padding:7px 10px;font-size:11px}.bobby-suggestions[hidden]{display:none}
.bobby-messages{padding:14px;gap:9px;min-height:55px}.bobby-message{font-size:12px;padding:10px 12px}.bobby-header{flex:none}.bobby-disclosure{height:0;margin:0;overflow:hidden}.bobby-status{font-size:10px}
#bobby-privacy{position:absolute;right:0;bottom:62px;width:100%;font-size:10px;color:#efd0ac;z-index:4}#bobby-privacy summary{cursor:pointer;width:max-content;padding:3px 0;list-style:disclosure-closed}#bobby-privacy[open] summary{list-style:disclosure-open}#bobby-privacy p{position:absolute;right:0;bottom:23px;margin:0;padding:14px;border:1px solid #d5ae7a80;border-radius:9px;background:#101c26fa;font-size:11px;line-height:1.65;max-height:180px;overflow:auto;box-shadow:0 8px 30px #0008}.bobby:not(.is-open) #bobby-privacy{display:none}
#bobby-consent-dialog{z-index:30;width:min(430px,calc(100vw - 32px));padding:26px}#bobby-consent-dialog h2{font-size:23px;line-height:1.3;margin-top:0}#bobby-consent-dialog .bobby-consent{display:none}.consent-actions{display:flex;gap:18px;justify-content:flex-end;align-items:center;margin-top:22px;flex-wrap:wrap}.consent-actions .primary{min-height:44px;padding:10px 15px;font-size:11px}.consent-actions .text-button{font-size:12px}#bobby-consent-dialog::backdrop{background:#030b14b8;backdrop-filter:blur(5px)}
@media(max-width:700px){.companion-dock{padding-top:450px}body .companion-dock .bobby-panel,body[data-screen=home] .companion-dock .bobby-panel{height:340px;max-height:calc(100dvh - 160px);bottom:86px}.bobby.keyboard-open .bobby-panel{max-height:calc(var(--bobby-visible-height,100dvh) - 115px)!important;bottom:86px!important}}/* Equal 18px gaps around the launcher; expand chat downwards, preserving its top. */
body .bobby-panel,body[data-screen=home] .bobby-panel{bottom:66px;height:min(402px,calc(100dvh - var(--dock-bottom) - var(--music-dock-height) - 223px))}
#bobby-privacy{bottom:46px;margin:0;padding:0}#bobby-privacy summary{margin:0;padding:0;list-style-position:inside;line-height:17px}
@media(max-width:700px){body .companion-dock .bobby-panel,body[data-screen=home] .companion-dock .bobby-panel{bottom:62px;height:364px;max-height:calc(100dvh - 136px)}#bobby-privacy{bottom:42px}.bobby.keyboard-open .bobby-panel{bottom:62px!important;max-height:calc(var(--bobby-visible-height,100dvh) - 91px)!important}}
body .bobby-launcher:hover,body .bobby-launcher[aria-expanded=true]{transform:none}
/* Separate sibling button avoids nesting interactive controls in the welcome balloon. */
.bobby-invite-close{position:absolute;right:6px;bottom:calc(64px + var(--invite-height,78px) - 27px);z-index:5;display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:#e5d6c5;font:20px/1 Arial,sans-serif;cursor:pointer}.bobby-invite-close:hover{background:#ffffff14;color:white}.bobby-invite-close[hidden]{display:none}body .bobby-invite{padding-right:31px}
@media(max-width:700px){.bobby-invite-close{bottom:calc(58px + var(--invite-height,78px) - 27px)}}
.bobby-invite-close{font-size:23px}
/* Original title tracking and matching new/resume actions. */
.home-copy h1{letter-spacing:.12em}.home-copy h1>span{letter-spacing:.222em}
.home-actions{display:grid;grid-template-columns:repeat(2,minmax(0,175px));align-items:start;gap:15px 14px;width:max-content;max-width:100%}
.home-actions>#start-button,.home-actions>#resume-button{width:100%;min-height:52px;justify-content:center;text-align:center;font-size:11px;font-weight:700;letter-spacing:1.1px;padding:0 18px;border:0;border-radius:8px;background:var(--amber);color:#14212a;box-shadow:0 5px 24px #0002;transition:background .2s,box-shadow .2s}
.home-actions>#start-button:hover,.home-actions>#resume-button:not(:disabled):hover{background:#f2c499;box-shadow:0 6px 28px #efb28025}
.home-actions>#resume-button:disabled{opacity:1;cursor:default}.home-actions>.home-links{grid-column:1/-1;margin-top:0}
@media(max-width:420px){.home-actions{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.home-actions>#start-button,.home-actions>#resume-button{padding:0 10px;font-size:10px}}
.home-actions>#start-button:hover,.home-actions>#resume-button:hover{background:#f2c499;box-shadow:0 6px 28px #efb28025;cursor:pointer}
/* 80% transparent navigation surface; text and controls retain full opacity. */
.topbar{background:rgba(11,18,25,.2);backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom-color:#ffffff18}
/* Share the music module's warm translucent material. */
body .bobby-panel,body[data-screen=home] .bobby-panel{background:var(--library-surface);border-color:var(--library-border);backdrop-filter:none;-webkit-backdrop-filter:none;color:#fff;text-shadow:0 1px 4px #07121b,0 2px 12px #07121b}
.bobby-header,.bobby-form{background:transparent;border-color:#ddb08655}.bobby-message{background:#bb865b18;border-color:#ddb08655;color:#fff}.bobby-message.user{background:#bb865b40;border-color:#ddb08688;color:#fff}.bobby-message.system{color:#fff}.bobby-suggestion{background:#bb865b12;border-color:#ddb08670;color:#fff}.bobby-suggestion:hover{background:var(--library-surface-hover)}.bobby-form input{background:#1a273050;color:#fff;border-color:#ddb08680}.bobby-form input::placeholder{color:#fff}.bobby-form button{background:#bb865b25;color:#fff;border-color:#ddb08680}.conversation-started .bobby-messages{flex:1;min-height:0}.conversation-started .bobby-suggestions{display:none}/* Input, conversation bubbles and welcome balloon share one visual treatment. */
:root{--bobby-field-background:#1a273050;--bobby-field-border:#ddb08680;--bobby-field-color:#fff;--bobby-field-font:400 12px/1.55 var(--sans)}
.bobby-form input,.bobby-message,.bobby-message.user,.bobby-message.system,body .bobby-invite,body[data-screen=home] .bobby-invite{background:var(--bobby-field-background);border:1px solid var(--bobby-field-border);color:var(--bobby-field-color);font:var(--bobby-field-font);text-shadow:0 1px 4px #07121b,0 2px 12px #07121b}
body .bobby-invite:after{background:var(--bobby-field-background);border-right-color:var(--bobby-field-border);border-bottom-color:var(--bobby-field-border)}/* Reduce field transparency by 20%: alpha = 1 - (1 - 80/255) * .8. */
:root{--bobby-field-background:rgba(26,39,48,.451)}/* Scene location stays below the menu, away from the Bobby dock. */
body[data-screen=play] .scene-location{position:absolute;top:140px;left:9%;right:auto;width:auto;margin:0;text-align:left;justify-content:flex-start}
@media(max-width:1099px) and (min-width:701px){body[data-screen=play] .scene-location{top:125px;left:7.2%}}
@media(max-width:700px){body[data-screen=play] .scene-location{position:static;width:100%;margin:0 0 20px;text-align:left;justify-content:flex-start}}/* Reading surface follows the soundtrack module, with tighter readable rhythm. */
.scene-text,.reader.has-choices .scene-text{background:var(--bobby-field-background);border:1px solid var(--library-border);border-radius:12px;padding:20px 24px;box-shadow:0 12px 40px #0003;text-shadow:0 1px 4px #07121b,0 2px 12px #07121b;scrollbar-gutter:stable}
.scene-text p{line-height:1.5;margin:0 0 .65em}.scene-text p:last-child{margin-bottom:0}.scene-text .speaker{line-height:1.5}
@media(max-width:700px){.scene-text,.reader.has-choices .scene-text{padding:16px;border-radius:12px}.scene-text p{line-height:1.5;margin-bottom:.65em}}/* Speaker labels follow the first dialogue baseline and scale with reader text. */
.scene-text .speech{grid-template-columns:2.36em minmax(0,1fr);column-gap:.59em;align-items:first baseline}
.scene-text .speech .speaker{font-size:.4091em;line-height:1;letter-spacing:.13em;align-self:first baseline}/* Matching navigation controls with comfortable inner spacing. */
.navigation-row #back-button,.navigation-row #next-button{display:inline-flex;align-items:center;justify-content:center;min-width:112px;min-height:46px;padding:11px 22px;border:1px solid var(--library-border);border-radius:12px;background:var(--library-surface);color:var(--paper);font:500 14px/1.5 var(--sans);text-align:center;text-shadow:0 1px 4px #07121b,0 2px 12px #07121b;box-shadow:0 5px 20px #0002;transition:background .2s,border-color .2s,box-shadow .2s}
.navigation-row #back-button:not(:disabled):hover,.navigation-row #next-button:not(:disabled):hover{background:var(--library-surface-hover);border-color:var(--amber);box-shadow:0 5px 24px #efb28020}
.navigation-row #back-button:disabled,.navigation-row #next-button:disabled{opacity:.45;cursor:default}
@media(max-width:700px){.navigation-row #back-button,.navigation-row #next-button{min-width:96px;padding:10px 18px;font-size:13px}}/* Save recovery uses the established translucent controls. */
.journey-backups{margin:22px 0;border:1px solid var(--library-border);border-radius:12px;background:var(--library-surface);padding:15px 18px}.journey-backups summary{cursor:pointer;color:var(--paper);font-size:14px}.backup-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 0;border-top:1px solid #ddb08635;font-size:12px;line-height:1.7}.backup-row:first-of-type{margin-top:12px}.backup-row .text-button{flex:none;font-size:12px}#journey-conflict button{margin:10px 15px 0 0}#journey-conflict .primary{padding:12px 18px;justify-content:center}
@media(max-width:700px){.backup-row{align-items:flex-start;flex-direction:column;gap:10px}}
.choice-hint:empty{display:none}
