/* Compact working surface: pet, care, and conversation share the first viewport. */
.topbar{height:64px;max-width:1500px;padding:0 28px;justify-content:center}.brand{font-size:30px;letter-spacing:2px;line-height:1;font-weight:700;color:var(--blue)}
main{max-width:1500px;margin:18px auto 0;padding:0 28px 12px}.world{grid-template-columns:minmax(310px,1.1fr) minmax(235px,.78fr) minmax(350px,1.25fr);gap:16px;align-items:stretch}.device{padding:16px 15px 12px;border-radius:22px;display:flex;flex-direction:column}.device-top{padding:0 2px 12px}.device-label{font-size:10px;letter-spacing:.35px;max-width:185px}.screen{height:auto;min-height:290px;flex:1;padding:13px 12px}.screen-top{font-size:9px;letter-spacing:.3px}.screen-bottom{font-size:9px;letter-spacing:.2px;left:12px;right:12px}.screen-bottom span:last-child{display:none}.speech{font-size:13px;margin-top:12px;padding:8px 10px}.pet-stage{height:200px}.pet-touch{height:215px;width:215px}.care-controls{gap:7px;margin:12px 0 10px}.care-controls button{padding:10px 3px 8px;border-radius:10px}.care-controls strong{font-size:14px}.care-controls small{display:none}.action-icon{font-size:23px;height:23px;margin-bottom:5px}.device-foot{font-size:9px;letter-spacing:.2px;padding:0}.device-foot .speaker{display:none}
.pet-sidebar{gap:10px}.panel{padding:17px;border-radius:15px}.hatch-card>.eyebrow{display:none}.hatch-card h2{font-size:24px;margin:0 0 9px;letter-spacing:-.7px}.hatch-card h2 br{display:none}.hatch-card>p{font-size:14px;margin:0 0 14px}.hatch-card label,.hatch-card legend{font-size:13px}.personalities{flex-wrap:wrap;gap:5px}.personalities label{min-width:55px}.personalities span{font-size:12px;padding:9px 2px}.hatch-card input{padding:10px}.hatch-card fieldset{margin:12px 0}.save-note{font-size:12px;line-height:1.4;margin-top:9px}.profile-title h2{font-size:30px;margin:4px 0 12px;overflow-wrap:anywhere}.profile-title .eyebrow{font-size:10px}.level-medal{flex-shrink:0;width:45px;height:48px}.level-medal strong{font-size:23px}.growth-label{font-size:12px;gap:8px;align-items:center}.growth-label>span{font-size:12px;white-space:nowrap}.growth-next{font-size:12px;line-height:1.4;margin-bottom:12px}.stats{gap:11px;padding-top:12px}.stat>div:first-child,.stat strong{font-size:13px}.pet-tip{font-size:12px;line-height:1.4;margin-top:13px;padding:8px}.journal{padding:13px 16px;flex:1}.journal-heading>span{font-size:16px}.journal h3{font-size:14px}.journal ul{margin-top:9px}.journal li{font-size:12px;margin-bottom:7px}.journal li:nth-child(n+3){display:none}.journal small{font-size:10px;letter-spacing:0}
.chat-panel{display:flex;flex-direction:column;min-height:450px;height:clamp(450px,calc(100dvh - 275px),700px);padding:17px;overflow:hidden;background:#fff}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-heading h2{font-size:21px;letter-spacing:-.6px;margin:0 0 4px}.chat-heading #ai-status{font-size:12px;color:var(--muted)}.chat-heading #connect-ai{color:var(--blue);font-size:12px;white-space:nowrap;padding:6px 0}.chat-modes{display:flex;gap:5px;margin:13px 0 0;background:#eff1e9;padding:4px;border-radius:9px}.chat-modes button{flex:1;padding:8px 4px;background:none;border-radius:6px;font-size:12px;color:#58634f}.chat-modes button[aria-pressed=true]{background:#fff;color:var(--blue);box-shadow:0 1px 3px #0001}.chat-log{flex:1;min-height:110px;overflow-y:auto;overscroll-behavior:contain;padding:12px 2px;scrollbar-width:thin}.chat-empty{padding:10px 8px;color:#6c7465;text-align:center}.chat-empty>span{display:block;font-size:29px;color:var(--blue)}.chat-empty h3{font-size:17px;letter-spacing:-.4px;margin:8px 0}.chat-empty p{font-size:14px;line-height:1.5;margin:0}.chat-message{margin:0 0 12px;padding:11px 12px;border-radius:12px;background:#f0f2e9;overflow-wrap:anywhere}.chat-message.user{background:#edf1ff;margin-left:20px}.chat-message strong{font-size:12px;color:#6c765f}.chat-message .message-text{white-space:pre-wrap;font-size:14px;line-height:1.6;margin-top:5px}.chat-message details{margin-top:8px;font-size:12px}.chat-message pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:180px;overflow:auto}.chat-message a{color:var(--blue);display:inline-block;margin:5px 8px 0 0;text-decoration:underline}.chat-pending{font-size:14px;color:var(--blue);padding:10px}.chat-panel form{margin-top:auto}.chat-panel textarea{font:inherit;font-size:14px;line-height:1.45;padding:11px 12px;border:1px solid #d3d7cc;border-radius:9px;resize:vertical;min-height:65px;max-height:150px;width:100%;color:var(--ink);background:#fcfcf8}.chat-panel textarea:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.composer-actions{display:flex;align-items:center;gap:12px;margin-top:7px}.composer-actions>span{font-size:11px;line-height:1.4;color:#7b8273;flex:1}.composer-actions .primary{width:auto;padding:8px 18px;font-size:13px}.chat-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e8ebe2;margin-top:10px;padding-top:8px;font-size:11px;color:var(--muted)}.chat-footer .small-button{font-size:11px}.chat-error{font-size:12px;color:#9d3f25;margin:7px 0 0}#review-fields{margin-bottom:7px}#review-fields label{display:block;font-size:12px;margin:0 0 5px}#review-fields label span{color:var(--muted);font-size:11px}#review-fields input{font-size:12px;padding:8px 10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.setup-status{font-size:14px;line-height:1.5}.setup-links{display:flex;gap:16px;flex-wrap:wrap;margin:15px 0}.setup-links a{font-size:14px;color:var(--blue);text-decoration:underline}
.skills-section{margin-top:20px}.section-heading{margin-bottom:9px;align-items:center}.section-heading h2{font-size:18px;margin:0;letter-spacing:-.5px}.skill-counter{font-size:11px}.skills-grid{gap:12px}.skill-card{position:relative;padding:12px 14px;display:grid;grid-template-columns:30px 1fr;column-gap:9px;border-radius:12px}.skill-top{display:contents}.skill-icon{width:29px;height:29px;font-size:19px;grid-column:1;grid-row:1/3}.skill-status{grid-column:2;grid-row:2;font-size:10px;letter-spacing:.3px}.skill-card h3{grid-column:2;grid-row:1;font-size:15px;margin:0 0 4px;letter-spacing:-.4px}.skill-card p{display:none}.skill-card button{grid-column:1/3;font-size:12px;margin-top:9px;padding-top:8px}.skill-footnote{display:none}footer{margin-top:14px;padding-top:10px;justify-content:space-between;font-size:12px;gap:10px}footer>span:last-child{font-size:12px;letter-spacing:0;font-weight:400;margin-left:auto}footer .text-button{font-size:12px}.error{margin:0 0 12px}.toast{font-size:13px}
@media(min-width:1101px) and (max-height:780px){.topbar{height:52px}main{margin-top:12px}.chat-panel{height:450px}.skills-section{margin-top:17px}.screen{min-height:265px}.pet-stage{height:180px}.pet-touch{width:198px;height:198px}.journal{padding:10px 14px}.hatch-card>p{font-size:13px}.skill-card{padding:10px 12px}}
@media(max-width:1100px){main{padding:0 20px 15px}.world{grid-template-columns:minmax(300px,1.2fr) minmax(260px,1fr)}.chat-panel{grid-column:1/-1;height:480px}.screen{min-height:300px}.pet-stage{height:215px}.pet-touch{height:230px;width:230px}}
@media(max-width:640px){.topbar{height:56px}.brand{font-size:27px}main{margin-top:14px;padding:0 15px 15px}.world{grid-template-columns:1fr;gap:14px}.device-label{max-width:190px}.chat-panel{height:520px;min-height:450px;grid-column:auto}.screen{min-height:295px}.pet-sidebar{display:grid;grid-template-columns:1fr}.journal{display:none}.skills-grid{grid-template-columns:1fr 1fr}.skill-card h3{font-size:14px}.skill-card{padding:12px 10px;column-gap:6px}.skills-section{margin-top:20px}footer{align-items:center}footer>span:last-child{width:auto;max-width:210px;font-size:11px}.profile-card{padding:18px}.chat-heading h2{font-size:20px}}
.journal{display:none}.screen{display:flex;flex-direction:column}.screen-top,.speech{flex-shrink:0}.speech{width:100%}.pet-stage{flex:1;min-height:150px;padding-bottom:12px}.floor-shadow{bottom:auto;top:calc(50% + 70px)}.footer-actions{display:flex;gap:16px}.moments-list{padding-left:19px;font-size:14px;line-height:1.6}.moments-list li{margin-bottom:12px}.moments-list small{display:block;color:var(--muted);font-size:12px}
@media(min-width:1101px){.chat-panel{height:clamp(450px,calc(100dvh - 305px),670px)}.profile-card{height:100%}.stats{margin-top:6px}.pet-tip{margin-top:18px}}
@media(min-width:1101px) and (max-height:780px){.chat-panel{height:450px}}
@media(min-width:1101px){.world{height:clamp(435px,calc(100dvh - 305px),670px);grid-template-rows:minmax(0,1fr)}.device,.pet-sidebar{min-height:0}.screen{min-height:0}.pet-stage{min-height:0}.chat-panel{height:100%;min-height:0}.pet-touch{width:clamp(150px,20vh,230px);height:clamp(150px,20vh,230px)}.floor-shadow{top:calc(50% + 58px)}}
.chat-log{min-height:0}.chat-heading,.chat-modes,.chat-footer,.chat-panel form{flex-shrink:0}
.account-bar{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:8px;font-size:13px;color:#68755f}.account-bar #logout{color:var(--blue);font-size:13px;padding:4px 8px}.auth-screen{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:55px;max-width:950px;margin:25px auto 40px;min-height:450px}.auth-art{text-align:center}.auth-art img{display:block;width:min(275px,80%);margin:auto;filter:drop-shadow(0 12px 10px #2855ed15)}.auth-art h1{font-size:30px;letter-spacing:-1.1px;line-height:1.2;margin:16px 0 9px}.auth-art p{font-size:15px;line-height:1.6;color:var(--muted)}.auth-card{padding:26px}.auth-tabs{display:flex;gap:5px;border-radius:10px;padding:4px;background:#eef0e7;margin-bottom:19px}.auth-tabs button{flex:1;border-radius:7px;padding:10px 8px;background:none;font-size:14px;color:#606b55}.auth-tabs button[aria-pressed=true]{background:white;color:var(--blue);box-shadow:0 1px 3px #0001}.auth-card h2{font-size:25px;letter-spacing:-.7px;margin:0 0 7px}.auth-card>p{font-size:14px;color:var(--muted);line-height:1.5;margin:0 0 17px}.auth-card label{display:block;margin:12px 0 7px;font-size:14px;font-weight:500}.auth-card input{font-size:15px;padding:11px 12px}.auth-card .primary{margin-top:20px}.auth-card .account-note{font-size:12px;margin:14px 0 0}.auth-card .import-guest{display:flex;gap:9px;align-items:center;font-size:13px;line-height:1.4}.import-guest input{width:16px;height:16px;flex-shrink:0}.auth-card #auth-error{font-size:14px;line-height:1.5}
@media(min-width:1101px){.world{height:clamp(400px,calc(100dvh - 343px),632px)}.device .screen{padding-top:9px}.device .speech{margin-top:8px;font-size:12px}.pet-touch{width:clamp(130px,18vh,210px);height:clamp(130px,18vh,210px)}}
@media(max-width:700px){.auth-screen{grid-template-columns:1fr;gap:12px;margin:0 auto 15px;min-height:0;max-width:430px}.auth-art img{width:115px}.auth-art h1{font-size:24px;margin:3px 0}.auth-art p{margin:5px 0 0;font-size:14px}.auth-card{padding:22px}.account-bar{font-size:12px}}
