:root{--ink:#19223d;--muted:#75809a;--line:#ebe8e2;--accent:#7a65e8}*{box-sizing:border-box}body{margin:0;background:#f7f5ef;color:var(--ink);font-family:Manrope,Arial,sans-serif}.app{max-width:1120px;width:calc(100% - 32px);margin:auto;padding:28px 0 40px}header,.title,footer{display:flex;justify-content:space-between;align-items:center}.brand{font:700 22px Unbounded,sans-serif}.coins{display:flex;gap:8px}.coins span{padding:9px 12px;background:#fff;border:1px solid var(--line);border-radius:12px;color:#956a32;font-size:13px}.coins span+span{color:#9275d8}.grid{display:grid;grid-template-columns:1.55fr .9fr;gap:18px;margin-top:18px}.card{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 18px 45px #23243e15}.title{padding:24px 25px 15px;align-items:flex-start}small{font-weight:800;font-size:10px;letter-spacing:1.3px;color:#8992a8}h1{font:700 28px Unbounded,sans-serif;letter-spacing:-1.7px;margin:5px 0}h2{font-size:18px;margin:5px 0}p{margin:0;color:var(--muted);font-size:13px}.icon{border:0;background:#f2efff;color:var(--accent);padding:8px 11px;border-radius:10px;font-size:17px}.scene{height:295px;position:relative;overflow:hidden;background:linear-gradient(160deg,#dcedff,#faf6eb)}.sun{position:absolute;right:11%;top:28px;width:72px;height:72px;border-radius:50%;background:#ffcc69;box-shadow:0 0 0 12px #ffdb8759}.cloud{position:absolute;width:90px;height:23px;border-radius:30px;background:#fff9}.cloud:before,.cloud:after{content:"";position:absolute;border-radius:50%;background:inherit}.cloud:before{width:38px;height:38px;left:20px;top:-17px}.cloud:after{width:28px;height:28px;right:17px;top:-10px}.one{left:10%;top:52px}.two{right:33%;top:88px;transform:scale(.6)}.hill{position:absolute;bottom:-42px;border-radius:50% 50% 0 0}.back{width:640px;height:165px;left:-60px;background:#bddcaf}.front{width:650px;height:135px;right:-150px;background:#9ecb9c}.pet{position:absolute;z-index:3;bottom:48px;left:43%;width:129px;height:144px;transition:.25s}.pet:hover{transform:translateY(-8px) rotate(2deg)}.ear{position:absolute;top:1px;width:43px;height:54px;background:#8069ea;border-radius:35px 35px 12px}.left{left:8px;transform:rotate(-20deg)}.right{right:8px;transform:rotate(20deg)}.face{position:absolute;top:24px;left:7px;width:115px;height:104px;border-radius:47% 47% 43% 43%;background:#a28df5;z-index:2}.face i{position:absolute;top:43px;width:9px;height:14px;background:#29304c;border-radius:50%}.face i:first-child{left:34px}.face i:nth-child(2){right:34px}.face b{position:absolute;left:50px;top:64px;width:14px;height:7px;border-bottom:3px solid #29304c;border-radius:50%}.cheek{position:absolute;z-index:4;top:74px;width:17px;height:8px;border-radius:50%;background:#f799b4}.cheek.l{left:18px}.cheek.r{right:18px}.body{position:absolute;bottom:0;left:19px;width:91px;height:68px;border-radius:47px 47px 22px;background:#6d59cb;text-align:center;padding-top:19px;color:#ffcc77}.shadow{position:absolute;z-index:2;bottom:38px;left:42%;width:130px;height:22px;border-radius:50%;background:#638f7b44}.bubble{position:absolute;z-index:5;left:57%;bottom:147px;max-width:190px;padding:11px 14px;border-radius:15px 15px 15px 3px;background:#fff;font-size:12px;box-shadow:0 8px 18px #47507518}footer{padding:16px 25px;font-size:12px;color:var(--muted)}footer b{color:var(--ink);font-size:13px}footer i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#4bbb82;margin-right:5px}.state button{border:0;background:#252c49;color:white;border-radius:11px;padding:9px;font-size:11px}.state button b{color:#ffdc78}.need{margin:14px 24px}.need div{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}.need span{color:var(--muted)}.bar{height:9px;background:#f0eef1;border-radius:20px;overflow:hidden}.bar i{display:block;height:100%;border-radius:inherit;transition:.3s}.timer{margin:15px 24px;padding:10px 12px;border-radius:12px;background:#f8f7fb;font-size:11px}.actions .title>span,.story .title>span{font-size:10px;padding:6px 8px;border-radius:7px;background:#f5f1ff;color:#7770a4}.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 20px 20px}.action-grid button{display:flex;gap:10px;align-items:center;text-align:left;border:1px solid #eeebef;background:white;border-radius:14px;padding:11px;transition:.18s}.action-grid button:hover{border-color:#b9aae9;transform:translateY(-2px)}.action-grid i{display:grid;place-items:center;width:37px;height:37px;border-radius:11px;font-style:normal;font-size:18px}.peach{background:#fff0e6}.purple{background:#f0edff}.green{background:#e6f7ee}.blue{background:#e7f4ff}.action-grid b,.action-grid small{display:block}.action-grid b{font-size:12px}.action-grid small{font-size:10px;color:var(--muted);margin-top:2px}.memories{min-height:149px;padding:0 24px;display:flex;flex-direction:column;gap:11px}.memory{padding-left:13px;border-left:2px solid #dfd8ff;color:#505d78;font-size:12px;line-height:1.45}.memory time{font-size:10px;color:#9aa1b1;margin-right:5px}form#talk{display:flex;gap:9px;border-top:1px solid #f0edf0;margin-top:7px;padding:13px 18px}form#talk input{flex:1;min-width:0;border:0;outline:0;font:12px Manrope}form#talk button{border:0;border-radius:10px;width:32px;color:white;background:var(--accent)}.future{margin-top:18px;border-radius:24px;padding:25px;display:flex;justify-content:space-between;align-items:center;color:white;background:linear-gradient(105deg,#292d52,#51488f)}.future small{color:#bdb6e7}.future h2{font:600 20px Unbounded,sans-serif;letter-spacing:-1px;max-width:500px}.future p{color:#d4d2e6;max-width:520px;margin-top:10px}.steps{display:flex;gap:10px}.steps span{padding:9px 12px;border-radius:10px;background:#ffffff12;color:#aca6d6;font-size:11px;line-height:1.7}.steps b{color:white}#toast{position:fixed;bottom:24px;left:50%;padding:11px 16px;border-radius:12px;transform:translate(-50%,20px);opacity:0;background:#252c49;color:white;font-size:12px;transition:.25s;pointer-events:none}#toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:0;border-radius:20px;box-shadow:0 20px 70px #17203855;width:min(360px,calc(100% - 30px))}dialog::backdrop{background:#15213a66}dialog form{padding:15px}dialog input{width:100%;padding:12px;margin:10px 0;border:1px solid var(--line);border-radius:10px}dialog div{display:flex;justify-content:flex-end;gap:9px}dialog button{border:0;border-radius:10px;padding:9px 13px;background:#f3f2f4;color:#68718a}dialog #save-name{background:var(--accent);color:white}@media(max-width:760px){.app{width:calc(100% - 20px);padding-top:16px}.grid{grid-template-columns:1fr}.future{display:block}.steps{margin-top:20px;justify-content:space-between}.pet{left:36%}.shadow{left:35%}}@media(max-width:400px){.action-grid{grid-template-columns:1fr}.coins span{padding:7px;font-size:11px}.brand{font-size:18px}.steps{gap:4px}.steps span{font-size:9px}}
.pet-chat{margin:0!important;padding:13px 24px 18px!important}.pet-chat input{color:var(--ink);background:transparent}

/* Длинные реплики остаются в пределах сцены и начинают отображаться сверху. */
.bubble{max-height:min(130px,calc(100% - 164px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;line-height:1.45}
.telegram-panel{display:grid;gap:8px;margin:12px 0;padding:12px;border:1px solid #5c8a8a;border-radius:12px;background:#163746}.telegram-panel>b{color:#f8e8a1;font-size:12px}.telegram-panel small{color:#c5dfdc;line-height:1.45}.telegram-panel button,.telegram-panel a{width:max-content;max-width:100%;border:1px solid #70bbb1;border-radius:9px;padding:8px 10px;background:#285b61;color:#f1fffc;text-decoration:none;font:inherit;cursor:pointer}.telegram-panel a{background:transparent}
