:root {
    --pink: #ff6fa5;
    --pink-dark: #df4f88;
    --pink-pale: #fff0f6;
    --purple: #8667e8;
    --ink: #59485d;
    --cream: #fffaf3;
    --green: #55c99a;
    --yellow: #ffc857;
    --blue: #65bfe9;
    --shadow: 0 18px 50px rgba(99, 58, 87, .16);
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    color: var(--ink);
    background: #fff7f9;
    font-family: 'Nunito', system-ui, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

button, input { font: inherit; }
button { color: inherit; }
.is-hidden { display: none !important; }

.playforge-start, .playforge-pause, .playforge-gameover {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(74, 48, 78, .42);
    backdrop-filter: blur(8px);
}
.playforge-start-card, .playforge-pause-card {
    width: min(92vw, 430px);
    padding: 28px 25px 24px;
    border: 1px solid rgba(255,255,255,.95);
    border-radius: 28px;
    color: #654e66;
    background: #fffafd;
    box-shadow: 0 24px 70px rgba(43,28,45,.3);
    text-align: center;
}
.playforge-start-card .about-logo { margin: 0 auto 8px; }
.playforge-start-card > small { color: var(--pink-dark); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.playforge-start-card h1 { margin: 0 0 5px; color: #5b4564; font: 800 42px/1.1 'Baloo 2', sans-serif; }
.playforge-start-card p { margin: 0 auto 17px; max-width: 340px; color: #8c7c8e; font-size: 13px; line-height: 1.45; }
.playforge-instructions { display: grid; gap: 6px; margin: 0 0 18px; padding: 13px; border-radius: 17px; color: #756276; background: #fff0f6; font-size: 11px; line-height: 1.35; }
.playforge-instructions b { color: var(--pink-dark); font-size: 12px; }
.playforge-note { display: block; margin-top: 12px; color: #aa9cab; font-size: 10px; }
.playforge-pause, .playforge-gameover { visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s; }
.playforge-pause.is-open, .playforge-gameover.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.playforge-pause-card > span { display: block; color: var(--pink); font-size: 34px; font-weight: 900; }
.playforge-pause-card h2 { margin: 2px 0 4px; color: #5b4564; font: 800 28px/1.1 'Baloo 2', sans-serif; }
.playforge-pause-card p { margin: 0 0 18px; color: #8c7c8e; font-size: 12px; }
.playforge-pause-card > b { display: block; margin: 5px 0 17px; color: #8c7c8e; font-size: 13px; }
.playforge-pause-card > b strong { color: var(--pink-dark); font-size: 20px; }

/* Acesso */
.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    overflow: auto;
    padding: 24px;
    background:
        radial-gradient(circle at 14% 18%, rgba(255,255,255,.88) 0 4%, transparent 4.2%),
        radial-gradient(circle at 86% 75%, rgba(255,255,255,.72) 0 5%, transparent 5.2%),
        linear-gradient(145deg, #ffe6f1 0%, #f7eaff 48%, #e8f6ff 100%);
}

.auth-screen::before,
.auth-screen::after {
    content: '';
    position: fixed;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    filter: blur(4px);
    opacity: .42;
}
.auth-screen::before { left: -80px; bottom: -85px; background: #ffc0d7; }
.auth-screen::after { right: -75px; top: -80px; background: #c9c1ff; }

.auth-decor {
    position: fixed;
    color: rgba(255,255,255,.9);
    font-size: 50px;
    animation: float 4s ease-in-out infinite;
}
.auth-decor-one { top: 12%; left: 12%; transform: rotate(-12deg); }
.auth-decor-two { right: 12%; bottom: 13%; animation-delay: -1.5s; }

.auth-card {
    position: relative;
    z-index: 2;
    width: min(100%, 430px);
    padding: 31px 34px 27px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 32px;
    background: rgba(255,255,255,.91);
    box-shadow: 0 26px 80px rgba(111, 67, 105, .2);
    backdrop-filter: blur(14px);
    text-align: center;
}

.brand-mark, .mini-logo {
    display: grid;
    place-items: center;
    margin: 0 auto;
    color: white;
    background: linear-gradient(145deg, #ff91b7, #ff5f9d);
    box-shadow: 0 8px 20px rgba(255, 95, 157, .28);
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
}
.brand-mark { width: 68px; height: 68px; border-radius: 24px; font-size: 42px; transform: rotate(-4deg); }
.eyebrow { margin: 16px 0 0; color: var(--pink-dark); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-card h1 { margin: -2px 0 1px; color: #5b4564; font: 800 45px/1.2 'Baloo 2', sans-serif; letter-spacing: -.03em; }
.auth-intro { margin: 0 auto 22px; max-width: 310px; color: #8c7c8e; font-size: 14px; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: #f8f1f6; }
.auth-tab { border: 0; border-radius: 12px; padding: 10px; background: transparent; font-weight: 800; cursor: pointer; }
.auth-tab.is-active { color: var(--pink-dark); background: white; box-shadow: 0 4px 13px rgba(100, 64, 91, .09); }
.auth-form { margin-top: 19px; text-align: left; }
.field-label { display: block; margin: 12px 4px 6px; color: #6d596f; font-size: 13px; font-weight: 800; }
.input-wrap { display: flex; align-items: center; gap: 9px; height: 50px; padding: 0 14px; border: 2px solid transparent; border-radius: 15px; background: #faf5f8; transition: .2s ease; }
.input-wrap:focus-within { border-color: #ff9bbc; background: white; box-shadow: 0 0 0 4px #ffe6ef; }
.input-wrap > span { color: var(--pink); font-weight: 900; }
.input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; font-weight: 800; user-select: text; }
.input-wrap input::placeholder { color: #b9acb9; font-weight: 700; }
.show-pin { border: 0; padding: 4px; opacity: .6; background: none; cursor: pointer; }
.form-helper { min-height: 18px; margin: 10px 4px 0; color: #9a8c9b; font-size: 12px; }
.form-error { min-height: 18px; margin: 3px 4px 5px; color: #d74b6c; font-size: 12px; font-weight: 800; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; border: 0; border-radius: 16px; color: white; background: linear-gradient(135deg, #ff78a9, #ef5d9e); box-shadow: 0 10px 23px rgba(239, 93, 158, .26); font-weight: 900; cursor: pointer; transition: transform .15s ease; }
.primary-button:active { transform: scale(.98); }
.primary-button:disabled { opacity: .65; cursor: wait; }
.primary-button i { font-style: normal; font-size: 21px; }
.safe-note { margin: 17px 0 0; color: #aa9cab; font-size: 11px; }

/* Jogo */
.game {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 560px;
    overflow: hidden;
    background: #f8e5ec;
}

.game-header {
    position: absolute;
    z-index: 20;
    top: max(12px, env(safe-area-inset-top));
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}
.mini-brand, .header-counters { display: flex; align-items: center; gap: 9px; pointer-events: auto; }
.mini-brand { padding: 7px 13px 7px 7px; border: 1px solid rgba(255,255,255,.88); border-radius: 18px; background: rgba(255,255,255,.82); box-shadow: 0 8px 25px rgba(93, 63, 80, .11); backdrop-filter: blur(10px); }
.mini-logo { width: 38px; height: 38px; margin: 0; border-radius: 13px; font-size: 23px; }
.mini-brand strong { display: block; color: #5f4961; font: 800 19px/1 'Baloo 2', sans-serif; }
.mini-brand small { display: block; margin-top: 2px; color: #9a8798; font-size: 10px; }
.counter, .round-button { height: 38px; border: 1px solid rgba(255,255,255,.88); background: rgba(255,255,255,.85); box-shadow: 0 8px 25px rgba(93, 63, 80, .1); backdrop-filter: blur(8px); }
.counter { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 13px; font-size: 12px; }
.counter span { color: var(--yellow); text-shadow: 0 1px 0 #d79d21; }
.counter i { font-style: normal; }
.stage-counter span { color: var(--purple); }
.round-button { width: 38px; border-radius: 50%; cursor: pointer; }

.needs-card {
    position: absolute;
    z-index: 18;
    top: 80px;
    left: 16px;
    width: 204px;
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 20px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 12px 35px rgba(93, 63, 80, .1);
    backdrop-filter: blur(10px);
}
.need { display: grid; grid-template-columns: 29px 1fr; grid-template-rows: auto 7px; column-gap: 8px; margin: 5px 0 9px; }
.need:last-child { margin-bottom: 4px; }
.need-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; background: #fff0f4; font-size: 15px; }
.need-copy { display: flex; justify-content: space-between; color: #756276; font-size: 10px; font-weight: 900; }
.need-copy b { color: #9d8d9e; }
.need-track { align-self: end; height: 6px; overflow: hidden; border-radius: 8px; background: #eadfe5; }
.need-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .5s ease, background .3s ease; }
.need.is-medium .need-track i { background: var(--yellow); }
.need.is-high .need-track i { background: #ff6c7e; animation: pulseBar 1s ease-in-out infinite; }

.room { position: absolute; inset: 0 0 0; overflow: hidden; background: linear-gradient(#fae7ee 0 67%, #e5c2ac 67% 100%); }
.room::before { content: ''; position: absolute; inset: 0 0 33%; opacity: .44; background-image: radial-gradient(#fff 2px, transparent 2px); background-size: 38px 38px; }
.floor { position: absolute; inset: 67% 0 0; background: repeating-linear-gradient(90deg, rgba(121,78,58,.06) 0 2px, transparent 2px 145px), linear-gradient(#e7c7b4, #dcb49e); }
.floor::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: rgba(150,101,85,.11); }
.wall-stars { position: absolute; inset: 12% 20% auto 27%; display: flex; justify-content: space-between; color: rgba(255,255,255,.7); font-size: 25px; }
.wall-stars i { font-style: normal; transform: rotate(13deg); }
.wall-stars i:nth-child(2) { color: rgba(253,194,213,.72); font-size: 12px; }
.wall-stars i:nth-child(3) { color: rgba(160,144,220,.45); }
.window { position: absolute; top: 18%; right: 9%; width: 145px; height: 155px; border: 9px solid #fff9f8; border-radius: 45% 45% 8px 8px; background: linear-gradient(#abd8ef, #e6f5fb); box-shadow: 0 10px 25px rgba(103, 74, 83, .12); }
.window::before, .window::after { content: ''; position: absolute; z-index: 2; background: rgba(255,255,255,.9); }
.window::before { top: 0; bottom: 0; left: calc(50% - 3px); width: 6px; }
.window::after { top: calc(50% - 3px); left: 0; right: 0; height: 6px; }
.window span { position: absolute; right: 13px; top: 16px; width: 31px; height: 31px; border-radius: 50%; background: #ffe182; box-shadow: 0 0 18px #fff2ad; }
.window i { position: absolute; left: 14px; bottom: 13px; width: 58px; height: 24px; border-radius: 50% 50% 0 0; background: #a8d6ac; }
.shelf { position: absolute; top: 36%; left: 7%; display: flex; align-items: end; gap: 11px; width: 140px; height: 44px; padding: 0 18px 8px; border-bottom: 8px solid #d0a892; color: #d697ae; }
.shelf i { font-style: normal; font-size: 23px; }
.shelf i:nth-child(2) { color: #7eb7dc; }.shelf i:nth-child(3) { color: #ecc468; }
.rug { position: absolute; left: 50%; bottom: 4%; width: min(58vw, 640px); height: 20%; border: 7px solid rgba(255,255,255,.42); border-radius: 50%; background: radial-gradient(ellipse, #f5b4c9, #e899b7); transform: translateX(-50%); box-shadow: inset 0 0 0 8px rgba(255,255,255,.18); }

.character-wrap { position: absolute; z-index: 7; left: 50%; bottom: 8%; width: min(53vh, 430px); height: min(66vh, 540px); transform: translateX(-50%); transform-origin: center bottom; }
.character-wrap img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; pointer-events: none; filter: drop-shadow(0 16px 16px rgba(78,51,57,.22)); }
.character-glow { position: absolute; left: 13%; right: 13%; bottom: 2%; height: 70%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.55), transparent 68%); filter: blur(13px); }
.breathing { animation: breathe 3.2s ease-in-out infinite; }
.character-wrap.shaking { animation: shake .38s ease-in-out 2; }
.character-wrap.crying { animation: cryBody .32s ease-in-out infinite alternate; }
.character-wrap.happy { animation: happyBounce .62s ease 2; }
.character-wrap.dancing { animation: danceBody .65s ease-in-out infinite alternate; }
.hotspot { position: absolute; z-index: 8; left: 31%; width: 38%; border: 0; border-radius: 50%; opacity: 0; background: transparent; cursor: pointer; }
.face-hotspot { top: 9%; height: 33%; }
.belly-hotspot { top: 45%; height: 29%; }

.speech { position: absolute; z-index: 10; top: 21%; left: calc(50% + min(21vh, 165px)); max-width: 180px; padding: 11px 15px; border: 2px solid #fff; border-radius: 18px 18px 18px 4px; opacity: 0; color: #725f73; background: rgba(255,255,255,.92); box-shadow: 0 10px 24px rgba(87,58,75,.12); font-size: 13px; font-weight: 800; transform: translateY(8px); transition: .25s ease; }
.speech.is-visible { opacity: 1; transform: translateY(0); }

.floating { position: absolute; z-index: 12; display: grid; place-items: center; width: 72px; min-height: 72px; border: 2px solid rgba(255,255,255,.9); border-radius: 23px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); backdrop-filter: blur(9px); cursor: pointer; transition: .18s ease; }
.floating:active { transform: scale(.94); }
.floating span { font-size: 26px; line-height: 1; }
.floating small { margin-top: 3px; color: #806d80; font-size: 9px; font-weight: 900; }
.kiss-button { right: 5%; top: 48%; }
.music-button { right: 5%; top: calc(48% + 84px); color: white; background: linear-gradient(145deg, rgba(148,112,232,.92), rgba(116,87,207,.94)); }
.music-button small { color: white; }
.tip-card { position: absolute; z-index: 12; left: 50%; bottom: 2%; padding: 8px 14px; border-radius: 12px; color: rgba(91,70,90,.72); background: rgba(255,255,255,.6); font-size: 10px; font-weight: 800; transform: translateX(-50%); transition: opacity .4s; }

.action-dock { position: absolute; z-index: 25; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; gap: 12px; padding: 8px; border: 1px solid rgba(255,255,255,.8); border-radius: 25px; background: rgba(255,255,255,.76); box-shadow: 0 14px 45px rgba(81,52,65,.18); backdrop-filter: blur(12px); transform: translateX(-50%); }
.care-button { display: flex; align-items: center; gap: 8px; min-width: 105px; height: 48px; padding: 0 17px; border: 0; border-radius: 17px; background: white; box-shadow: 0 4px 13px rgba(99,62,82,.09); cursor: pointer; transition: transform .15s; }
.care-button:active { transform: scale(.95); }
.care-button span { font-size: 23px; }.care-button b { font-size: 12px; }
.care-button.feed { color: #d65486; background: #fff0f6; }.care-button.sleep { color: #6855bc; background: #f1eeff; }.care-button.bath { color: #368dbb; background: #edf9ff; }

.toy-layer { position: absolute; z-index: 11; inset: 20% 17% 21%; pointer-events: none; }
.toy { position: absolute; width: clamp(92px, 13vw, 155px); height: clamp(92px, 13vw, 155px); border: 0; padding: 0; background: none; filter: drop-shadow(0 10px 8px rgba(74,47,57,.23)); animation: toyEnter .45s cubic-bezier(.2,1.7,.4,1), toyWiggle 1.1s ease-in-out .45s infinite alternate; pointer-events: auto; cursor: pointer; }
.toy img { width: 100%; height: 100%; object-fit: contain; }
.toy.is-leaving { animation: toyPop .45s ease forwards; pointer-events: none; }
.effect-layer { position: absolute; z-index: 40; inset: 0; overflow: hidden; pointer-events: none; }
.particle { position: absolute; left: var(--x); top: var(--y); font-size: var(--size); animation: particleBurst 1.25s cubic-bezier(.2,.8,.3,1) forwards; }
.heart { position: absolute; z-index: 18; color: #ff5d98; font-size: 24px; pointer-events: none; animation: heartUp 1.2s ease forwards; }
.tear { position: absolute; z-index: 18; width: 10px; height: 15px; border-radius: 50% 50% 55% 55%; opacity: .9; background: #77ccf2; box-shadow: 0 2px 5px rgba(48,142,185,.25); pointer-events: none; animation: tearDrop 1s ease-in forwards; }

/* Música */
.panel-backdrop { position: fixed; z-index: 119; inset: 0; visibility: hidden; opacity: 0; background: rgba(56,39,57,.28); backdrop-filter: blur(2px); transition: .25s; }
.panel-backdrop.is-open { visibility: visible; opacity: 1; }
.music-panel { position: fixed; z-index: 120; top: 0; right: 0; bottom: 0; width: min(390px, 92vw); padding: 17px 20px max(18px, env(safe-area-inset-bottom)); background: #fffafc; box-shadow: -22px 0 60px rgba(62,40,58,.21); transform: translateX(105%); transition: transform .32s cubic-bezier(.2,.8,.3,1); }
.music-panel.is-open { transform: translateX(0); }
.panel-handle { display: none; width: 45px; height: 5px; margin: 0 auto 9px; border-radius: 9px; background: #decfd8; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 9px 2px 15px; }
.panel-heading small { color: var(--pink-dark); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .11em; }
.panel-heading h2 { margin: 1px 0 0; font: 800 25px/1.1 'Baloo 2', sans-serif; }
.close-button, .bath-topbar button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3eaf0; font-size: 25px; cursor: pointer; }
.music-list { display: grid; gap: 8px; max-height: calc(100dvh - 190px); overflow: auto; padding: 2px 3px 95px; }
.music-item { display: grid; grid-template-columns: 45px 1fr 35px; align-items: center; gap: 11px; width: 100%; padding: 9px; border: 1px solid #f1e4eb; border-radius: 16px; color: #69566a; background: white; text-align: left; cursor: pointer; }
.music-item .music-number { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 13px; color: white; background: linear-gradient(135deg, #b095f4, #7b63d3); font-size: 20px; }
.music-item b { display: block; font-size: 13px; }.music-item small { color: #aa99a7; font-size: 10px; }.music-item > i { color: var(--pink); font-style: normal; font-size: 17px; }
.now-playing { position: absolute; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 45px 1fr 40px; align-items: center; gap: 10px; min-height: 70px; padding: 11px; border-radius: 21px; color: white; background: linear-gradient(135deg, #755ec5, #a775d9); box-shadow: 0 14px 35px rgba(97,72,164,.3); }
.now-playing button { height: 42px; border: 0; border-radius: 13px; color: white; background: rgba(255,255,255,.16); cursor: pointer; }.playing-copy b { display: block; margin-bottom: 7px; font-size: 12px; }.music-progress { height: 5px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.24); }.music-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: white; }

/* Configurações */
.settings-panel { position: fixed; z-index: 120; top: 0; right: 0; bottom: 0; width: min(430px, 94vw); padding: 17px 20px max(18px, env(safe-area-inset-bottom)); background: #fffafc; box-shadow: -22px 0 60px rgba(62,40,58,.21); transform: translateX(105%); transition: transform .32s cubic-bezier(.2,.8,.3,1); }
.settings-panel.is-open { transform: translateX(0); }
.settings-scroll { max-height: calc(100dvh - 95px); overflow: auto; padding: 1px 3px 20px; }
.settings-section { padding: 16px; border: 1px solid #f0e3ea; border-radius: 20px; background: white; }
.settings-section h3 { margin: 0; font: 800 19px 'Baloo 2', sans-serif; }
.settings-section > p { margin: 2px 0 15px; color: #a08fa0; font-size: 11px; }
.volume-list { display: grid; gap: 13px; }
.volume-control { display: grid; grid-template-columns: 145px 1fr 38px; align-items: center; gap: 8px; color: #6c596d; font-size: 11px; font-weight: 900; }
.volume-control input { width: 100%; accent-color: var(--pink); cursor: pointer; }
.volume-control output { color: #a18fa0; font-size: 10px; text-align: right; }
.about-card { display: grid; grid-template-columns: 54px 1fr; gap: 5px 12px; margin-top: 13px; padding: 18px; border-radius: 21px; color: white; background: linear-gradient(145deg, #8a6bdc, #c277bd); box-shadow: 0 12px 28px rgba(122,86,175,.2); }
.about-logo { grid-row: 1; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: rgba(255,255,255,.2); font: 800 34px 'Baloo 2', sans-serif; }
.about-card small { opacity: .72; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }.about-card h3 { margin: -2px 0 0; font: 800 28px 'Baloo 2', sans-serif; }.about-card p, .about-card footer { grid-column: 1 / -1; }.about-card p { margin: 8px 0 3px; font-size: 12px; line-height: 1.5; }.about-card footer { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); font-size: 11px; }

/* Banho e sono */
.activity-overlay { position: fixed; z-index: 80; inset: 0; visibility: hidden; opacity: 0; transition: .3s; }
.activity-overlay.is-open { visibility: visible; opacity: 1; }
.bath-overlay { background: linear-gradient(#dff6ff, #b7e6f5); }
.bathroom { position: relative; width: 100%; height: 100%; overflow: hidden; text-align: center; }
.bathroom::before { content: ''; position: absolute; inset: 0; opacity: .25; background-image: radial-gradient(#fff 3px, transparent 3px); background-size: 42px 42px; }
.bath-topbar { position: absolute; z-index: 5; top: max(18px, env(safe-area-inset-top)); left: 50%; display: flex; align-items: center; justify-content: space-between; width: min(90%, 520px); padding: 11px 13px 11px 20px; border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: var(--shadow); transform: translateX(-50%); text-align: left; }
.bath-topbar small { display: block; color: #3991bb; font-size: 10px; font-weight: 900; text-transform: uppercase; }.bath-topbar b { font-size: 13px; }
.bath-progress { position: absolute; z-index: 5; top: 100px; left: 50%; width: min(76%, 440px); height: 19px; padding: 4px; border-radius: 20px; background: rgba(255,255,255,.72); transform: translateX(-50%); box-shadow: 0 6px 16px rgba(46,124,158,.1); }
.bath-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #73d5ec, #6cc9ae); transition: width .3s; }.bath-progress span { position: absolute; top: 0; left: 0; right: 0; color: #317793; font-size: 11px; font-weight: 900; line-height: 19px; }
.bath-character { position: absolute; z-index: 3; left: 50%; bottom: 11%; width: min(55vh, 430px); height: min(68vh, 545px); border: 0; padding: 0; background: none; transform: translateX(-50%); cursor: pointer; }
.bath-character img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 16px 16px rgba(43,99,116,.2)); pointer-events: none; }
.bath-character.scrubbing { animation: scrub .28s ease 2; }
.wash-button { position: absolute; z-index: 7; right: 7%; bottom: 14%; min-width: 120px; height: 52px; border: 2px solid white; border-radius: 18px; color: #307b99; background: rgba(255,255,255,.84); box-shadow: var(--shadow); font-weight: 900; cursor: pointer; }.wash-button span { font-size: 21px; }
.bathroom > p { position: absolute; z-index: 5; left: 50%; bottom: 4%; margin: 0; color: #4d8ca4; font-size: 11px; font-weight: 800; transform: translateX(-50%); }
.bubble { position: absolute; z-index: 4; bottom: -40px; width: var(--bubble-size); height: var(--bubble-size); border: 2px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(255,255,255,.2); animation: bubbleUp var(--bubble-time) ease-in forwards; pointer-events: none; }

.sleep-overlay { display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #5e5e9a, #252451 75%); }
.night-stars { position: absolute; inset: 0; overflow: hidden; }.night-stars i { position: absolute; left: var(--left); top: var(--top); color: #fff4ba; font-style: normal; font-size: var(--star-size); animation: twinkle var(--star-time) ease-in-out infinite alternate; }
.sleep-card { position: relative; z-index: 2; width: min(92vw, 520px); text-align: center; color: white; }
.sleep-card p { margin: 0; font: 800 23px 'Baloo 2', sans-serif; }.sleep-card img { display: block; width: min(55vh, 390px); height: min(60vh, 460px); margin: -15px auto -12px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.28)); }.sleep-card small { display: block; margin-top: 10px; color: #d9d7f5; }
.sleep-card.is-sleeping img { animation: sleepBreathing 3.2s ease-in-out infinite; }
.sleep-progress { width: min(80%, 350px); height: 10px; margin: 0 auto; overflow: hidden; border-radius: 12px; background: rgba(255,255,255,.18); }.sleep-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #ffe88c; transition: width .25s linear; }

/* Sono obrigatório das 21h às 7h — horário de São Paulo */
.bedtime-overlay { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; visibility: hidden; opacity: 0; overflow: hidden; color: white; background: radial-gradient(circle at 50% 75%, #57598f, #201f48 76%); transition: opacity .5s; }
.bedtime-overlay.is-open { visibility: visible; opacity: 1; }
.bedtime-stars { position: absolute; inset: 0; overflow: hidden; }.bedtime-stars i { position: absolute; left: var(--left); top: var(--top); color: #fff0a9; font-style: normal; font-size: var(--star-size); animation: twinkle var(--star-time) ease-in-out infinite alternate; }
.bedtime-card { position: relative; z-index: 2; width: min(92vw, 520px); text-align: center; }
.bedtime-moon { display: block; margin-bottom: 3px; font-size: 34px; }.bedtime-card p { margin: 0; color: #d8d5f4; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }.bedtime-card h2 { margin: 3px 0 -14px; font: 800 24px/1.2 'Baloo 2', sans-serif; }.bedtime-card img { display: block; width: min(48vh, 360px); height: min(48vh, 390px); margin: 0 auto -12px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.3)); animation: nightBreathe 3.5s ease-in-out infinite; }
.bedtime-clock { display: inline-flex; align-items: center; gap: 12px; padding: 8px 15px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.09); }.bedtime-clock span { color: #d8d5f4; font-size: 10px; }.bedtime-clock b { font-size: 19px; }
.bedtime-card > small { display: block; max-width: 370px; margin: 10px auto 13px; color: #d1cfea; font-size: 11px; line-height: 1.45; }.bedtime-card button { min-height: 42px; padding: 0 17px; border: 1px solid rgba(255,255,255,.24); border-radius: 14px; color: white; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 900; cursor: pointer; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: max(100px, calc(env(safe-area-inset-bottom) + 92px)); max-width: min(88vw, 430px); padding: 12px 18px; border-radius: 15px; opacity: 0; color: white; background: rgba(75,57,76,.92); box-shadow: var(--shadow); font-size: 12px; font-weight: 800; pointer-events: none; transform: translate(-50%, 15px); transition: .25s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.update-overlay { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; visibility: hidden; opacity: 0; padding: 20px; background: rgba(55,39,57,.58); backdrop-filter: blur(8px); transition: opacity .25s; }
.update-overlay.is-open { visibility: visible; opacity: 1; }
.update-card { display: grid; justify-items: center; width: min(90vw, 360px); padding: 28px 24px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; color: #654e66; background: #fffafd; box-shadow: 0 24px 70px rgba(43,28,45,.3); text-align: center; }
.update-card b { margin-top: 13px; font: 800 22px 'Baloo 2', sans-serif; }.update-card span { color: #9b899a; font-size: 11px; }
.update-spinner { width: 48px; height: 48px; border: 5px solid #f5dce7; border-top-color: var(--pink); border-radius: 50%; animation: updateSpin .8s linear infinite; }

@keyframes float { 50% { transform: translateY(-13px) rotate(8deg); } }
@keyframes breathe { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.012, 1.02); } }
@keyframes shake { 0%,100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(calc(-50% - 7px)) rotate(-2deg); } 75% { transform: translateX(calc(-50% + 7px)) rotate(2deg); } }
@keyframes cryBody { from { transform: translateX(calc(-50% - 2px)) rotate(-.7deg); } to { transform: translateX(calc(-50% + 2px)) rotate(.7deg) translateY(-2px); } }
@keyframes happyBounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-13px); } }
@keyframes danceBody { from { transform: translateX(-50%) rotate(-3deg) translateY(0); } to { transform: translateX(-50%) rotate(3deg) translateY(-8px); } }
@keyframes sleepBreathing { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes pulseBar { 50% { opacity: .6; } }
@keyframes toyEnter { from { opacity: 0; transform: scale(.1) rotate(-25deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes toyWiggle { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-11px) rotate(6deg); } }
@keyframes toyPop { to { opacity: 0; transform: scale(1.8) rotate(22deg); filter: blur(5px); } }
@keyframes particleBurst { to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(360deg) scale(.25); } }
@keyframes heartUp { to { opacity: 0; transform: translateY(-95px) rotate(18deg) scale(1.5); } }
@keyframes tearDrop { to { opacity: 0; transform: translateY(85px) scale(.65); } }
@keyframes scrub { 50% { transform: translateX(-50%) rotate(3deg) scale(1.02); } }
@keyframes bubbleUp { to { bottom: 105%; opacity: 0; transform: translateX(var(--bubble-drift)); } }
@keyframes twinkle { from { opacity: .25; transform: scale(.7); } to { opacity: 1; transform: scale(1.15); } }
@keyframes nightBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.015, 1.025); } }
@keyframes updateSpin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
    .game { min-height: 520px; }
    .game-header { top: max(8px, env(safe-area-inset-top)); left: 9px; right: 9px; }
    .mini-brand { padding: 5px 9px 5px 5px; border-radius: 15px; }.mini-logo { width: 33px; height: 33px; border-radius: 11px; font-size: 20px; }.mini-brand strong { font-size: 16px; }.mini-brand small { font-size: 8px; }
    .counter { height: 34px; padding: 0 9px; }.stage-counter { display: none; }.round-button { width: 34px; height: 34px; }.header-counters { gap: 5px; }
    .needs-card { top: 59px; left: 9px; right: 9px; width: auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding: 7px 8px; border-radius: 16px; }
    .need { grid-template-columns: 24px 1fr; grid-template-rows: auto 6px; column-gap: 5px; margin: 0; }.need-icon { width: 24px; height: 24px; border-radius: 8px; font-size: 13px; }.need-copy { font-size: 8px; }.need-track { height: 5px; }
    .window { top: 21%; right: -20px; width: 105px; height: 120px; }.shelf { top: 31%; left: -28px; transform: scale(.75); }.wall-stars { top: 18%; left: 11%; right: 15%; }
    .character-wrap { bottom: 13%; width: min(58vh, 93vw); height: min(66vh, 500px); }
    .rug { bottom: 9%; width: 95vw; height: 17%; }
    .speech { top: 20%; left: auto; right: 7px; max-width: 130px; padding: 8px 10px; font-size: 10px; }
    .floating { width: 56px; min-height: 56px; border-radius: 18px; }.floating span { font-size: 21px; }.floating small { font-size: 7px; }
    .kiss-button { right: 10px; top: 44%; }.music-button { right: 10px; top: calc(44% + 64px); }
    .action-dock { bottom: max(10px, env(safe-area-inset-bottom)); gap: 6px; padding: 6px; border-radius: 20px; }.care-button { flex-direction: column; justify-content: center; gap: 0; min-width: 76px; height: 54px; padding: 0 9px; border-radius: 15px; }.care-button span { font-size: 21px; }.care-button b { font-size: 9px; }
    .tip-card { display: none; }
    .toy-layer { inset: 25% 7% 25%; }
    .toy { width: clamp(88px, 25vw, 125px); height: clamp(88px, 25vw, 125px); }
    .music-panel, .settings-panel { top: auto; left: 0; width: 100%; height: min(82dvh, 650px); padding-top: 9px; border-radius: 27px 27px 0 0; transform: translateY(105%); }.music-panel.is-open, .settings-panel.is-open { transform: translateY(0); }.panel-handle { display: block; }.music-list { max-height: calc(82dvh - 190px); }.settings-scroll { max-height: calc(82dvh - 90px); }
    .bath-character { bottom: 14%; width: min(56vh, 100vw); }.wash-button { right: 13px; bottom: 13%; min-width: 105px; height: 46px; }.bathroom > p { bottom: 5%; white-space: nowrap; }
}

@media (max-width: 365px) {
    .coin-counter { display: none; }
    .clock-counter { display: none; }
    .settings-panel { display: none; }
    #settingsButton { display: none; }
    .mini-brand { padding-right: 6px; }.mini-brand strong { font-size: 14px; }
    .mini-brand small { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .score-counter { padding: 0 7px; }
    .volume-control { grid-template-columns: 125px 1fr 34px; }
}

@media (max-height: 620px) and (orientation: landscape) {
    .needs-card { top: 64px; transform: scale(.88); transform-origin: left top; }
    .character-wrap { bottom: 5%; width: min(62vh, 360px); height: min(70vh, 430px); }
    .action-dock { left: auto; right: 12px; bottom: 12px; flex-direction: column; transform: none; }.care-button { min-width: 90px; height: 42px; }
    .floating { right: 12px; }.kiss-button { top: 24%; }.music-button { top: calc(24% + 80px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
