@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root{font-family:Manrope,system-ui,sans-serif;color:#30254e;--purple:#7855d9;--glass:rgba(255,255,255,.82);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px)}
*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#f1ebfa}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{font:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7855d9;outline-offset:4px}button:disabled{cursor:default;opacity:.5}#world{position:fixed;width:100%;height:100%;inset:0;touch-action:none;outline:none}header{position:fixed;top:calc(26px + var(--safe-top));left:calc(32px + var(--safe-left));right:calc(32px + var(--safe-right));display:flex;align-items:center;justify-content:space-between;gap:20px;pointer-events:none;z-index:5}header>*{pointer-events:auto}.brand{text-decoration:none;color:#30254e;display:flex;gap:11px;align-items:center;font-weight:800;font-size:29px;letter-spacing:-1.4px}.brand-icon{width:43px;height:43px;background:#7d59d5;color:white;border-radius:15px;display:grid;place-items:center;font-size:33px;box-shadow:0 8px 16px #8765c733;transform:rotate(-8deg)}.brand small{display:block;letter-spacing:2.1px;font-size:8px;font-weight:800;margin-top:0;color:#89769e}nav{padding:5px;background:var(--glass);border:1px solid white;border-radius:40px;display:flex;gap:3px;box-shadow:0 8px 30px #8f74ab12;backdrop-filter:blur(16px)}nav button{background:transparent;border-radius:30px;color:#857692;padding:11px 20px;font-size:12px;font-weight:700;white-space:nowrap}nav button.active{background:#7f5ad7;color:white;box-shadow:0 5px 12px #7f5ad730}.avatar-button{background:var(--glass);display:flex;align-items:center;gap:9px;padding:10px 14px;border-radius:24px;font-size:11px;font-weight:700;color:#766485;border:1px solid white}#avatar-dot{height:23px;width:23px;border-radius:50%;background:#7f66e8;box-shadow:inset 0 -5px 0 #0002}.intro{position:fixed;left:calc(5vw + var(--safe-left));top:21%;pointer-events:none;z-index:1}.eyebrow{font-size:9px;letter-spacing:1.6px;color:#96809f;font-weight:800;display:flex;gap:8px;align-items:center}.eyebrow i{height:6px;width:6px;background:#8f74d8;border-radius:50%}h1{font-size:clamp(38px,4.5vw,68px);line-height:1.1;letter-spacing:-3px;margin:18px 0;color:#44315e;font-weight:800}h1 span{background:linear-gradient(90deg,#a176d7,#e0a8b9);background-clip:text;-webkit-background-clip:text;color:transparent}.intro p{font-size:12px;line-height:1.9;color:#927f9f}.scene-label{position:fixed;left:50%;bottom:230px;transform:translateX(-50%);font-size:10px;font-weight:700;background:#fff9;border:1px solid #fffc;border-radius:30px;padding:9px 15px;pointer-events:none;color:#9a81ac}.scene-label span{color:#b394d1;margin-right:6px}.hint{position:fixed;left:32px;bottom:220px;font-size:10px;color:#9f8aad;background:#ffffff75;border-radius:20px;padding:8px 12px;pointer-events:none}.portal-tray{position:fixed;left:max(5vw,var(--safe-left));right:max(5vw,var(--safe-right));bottom:calc(30px + var(--safe-bottom));display:grid;grid-template-columns:repeat(3,1fr);gap:16px;z-index:3}.portal-card{text-align:left;display:grid;grid-template-columns:94px 1fr 28px;align-items:center;gap:14px;border:1px solid #fff;background:linear-gradient(130deg,#ffffffeb,#ffffffb5);backdrop-filter:blur(20px);border-radius:23px;padding:12px;color:#4f3b67;box-shadow:0 12px 30px #644b7a0c;transition:transform .2s,box-shadow .2s;min-width:0}.portal-card:hover{transform:translateY(-5px);box-shadow:0 16px 30px #644b7a22}.portal-cover{height:95px;border-radius:15px;object-fit:cover;width:94px;background:linear-gradient(135deg,#b5a3e2,#e1c8ee)}.portal-card h3{font-size:15px;margin:0 0 5px;font-weight:800}.portal-card p{font-size:10px;line-height:1.6;color:#9c88aa;margin:0 0 9px}.tag{display:inline-block;font-size:8px;font-weight:800;letter-spacing:1px;color:#9672b3;background:#f0e8fa;border-radius:5px;padding:4px 6px}.portal-arrow{font-size:23px;color:#a38bb9}.room-tray{position:fixed;left:5%;right:5%;bottom:calc(25px + var(--safe-bottom));display:flex;justify-content:center;gap:14px;z-index:3}.room-tray[hidden]{display:none}.room-card{background:var(--glass);border:1px solid white;border-radius:20px;padding:15px 24px;color:#5c4673;min-width:180px;backdrop-filter:blur(16px)}.room-card strong{font-size:13px;display:block}.room-card small{font-size:10px;color:#9d88ab;display:block;margin-top:5px}.joystick{position:fixed;left:calc(22px + var(--safe-left));bottom:calc(220px + var(--safe-bottom));width:100px;height:100px;border:1px solid #fff;border-radius:50%;background:#ffffff38;display:none;touch-action:none;z-index:4;backdrop-filter:blur(8px)}.joystick span{position:absolute;width:42px;height:42px;background:#fff9;border:1px solid white;border-radius:50%;left:28px;top:28px;box-shadow:0 5px 15px #9a77b122;pointer-events:none}#home-camera{position:fixed;right:calc(26px + var(--safe-right));bottom:calc(220px + var(--safe-bottom));width:42px;height:42px;border-radius:50%;background:#fffc;color:#9b80b7;font-size:27px;z-index:4}dialog{border:1px solid #fff;border-radius:28px;padding:32px;background:#faf7ff;color:#463257;width:min(480px,calc(100vw - 28px));max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 30px);overflow:auto;box-shadow:0 30px 90px #35204e40}dialog::backdrop{background:#2b164350;backdrop-filter:blur(8px)}dialog h2{font-size:28px;letter-spacing:-1px;margin:13px 0 12px}dialog p{font-size:12px;line-height:1.8;color:#9984a6}.close{position:absolute;right:12px;top:12px;width:33px;height:33px;border-radius:50%;color:#9279a6;background:#eee7f6;font-size:22px}.primary{display:block;background:#7c59d4;color:#fff;border-radius:14px;padding:14px 20px;width:100%;font-weight:700;font-size:12px;text-align:center;text-decoration:none;margin-top:18px}.secondary{display:block;background:#eae2f5;color:#8666ac;border-radius:14px;padding:12px 20px;width:100%;font-weight:700;font-size:12px;text-align:center;text-decoration:none;margin-top:9px}.detail-media{width:100%;max-height:250px;object-fit:cover;border-radius:18px;background:#ece5f5;margin-top:8px}.fine{font-size:10px!important;color:#a590af!important;line-height:1.65!important}.source-link{color:#9472ba}.field{display:block;font-size:11px;font-weight:700;color:#9178a4;margin-top:17px}.field input,.field select{width:100%;font:inherit;color:#5f4379;background:white;border:1px solid #e9dff1;border-radius:12px;padding:12px;margin-top:7px}.field input[type=range]{padding:0;accent-color:#9c78dc}.check{display:flex;align-items:center;gap:9px;font-size:11px;color:#927ea1;margin-top:18px}.check input{accent-color:#8765ce}.swatches{display:flex;gap:12px;margin:22px 0}.swatches button{width:42px;height:42px;border-radius:50%;border:4px solid #faf7ff;outline:1px solid transparent}.swatches button.selected{outline-color:#9d7fc6}.gift-attributes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.gift-attributes div{padding:10px;background:#f0e9f7;border-radius:10px;font-size:11px}.gift-attributes small{display:block;color:#ad98b8;font-size:9px;margin-bottom:4px}.compare-image{width:100%;border-radius:18px;margin-top:12px}.inspect-controls{display:flex;gap:10px;align-items:end}.inspect-controls .field{flex:1}#toast{position:fixed;bottom:calc(200px + var(--safe-bottom));left:50%;transform:translateX(-50%);background:#654b82e8;color:white;font-size:11px;border-radius:20px;padding:11px 18px;z-index:20;opacity:0;pointer-events:none;transition:opacity .2s}#toast.visible{opacity:1}#loading{position:fixed;inset:0;z-index:50;background:#f5f0fb;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#9c83b4;font-size:12px}.loading-gem{font-size:65px;color:#a383de;animation:pulse 1s infinite alternate}#fallback{position:fixed;inset:0;z-index:99;background:#f7f0ff;padding:15vw;overflow:auto}#fallback h1{font-size:30px}#fallback button{padding:15px;border-radius:10px;background:#8e69cd;color:white}@keyframes pulse{to{transform:rotate(60deg) scale(.9);opacity:.5}}body[data-room=gifts] .intro h1,body[data-room=markets] .intro h1{font-size:43px}body[data-room=gifts] .scene-label,body[data-room=markets] .scene-label{bottom:140px}
@media(pointer:coarse){.joystick{display:block}.hint{display:none}}
@media(max-width:800px){header{top:calc(16px + var(--safe-top));left:calc(18px + var(--safe-left));right:calc(18px + var(--safe-right));gap:8px;flex-wrap:wrap}.brand{font-size:24px}.brand-icon{width:36px;height:36px;font-size:28px;border-radius:12px}.brand small{font-size:6px}.desktop-only{display:none}nav{order:3;width:100%;max-width:360px;margin:auto;justify-content:center;padding:4px}nav button{font-size:10px;padding:10px 16px;flex:1}.avatar-button{margin-left:auto;padding:7px 10px}.intro{top:calc(142px + var(--safe-top));left:26px}.intro .eyebrow{font-size:7px;letter-spacing:1px}h1{font-size:36px;letter-spacing:-1.7px;margin:10px 0}.intro p{font-size:10px;line-height:1.7}.portal-tray{left:14px;right:14px;bottom:calc(15px + var(--safe-bottom));gap:7px}.portal-card{display:flex;flex-direction:column;gap:6px;padding:7px;border-radius:17px;align-items:stretch;position:relative}.portal-cover{width:100%;height:66px;border-radius:11px}.portal-card h3{font-size:10px;margin:2px 0}.portal-card p{display:none}.portal-card .tag{font-size:6px;padding:3px;letter-spacing:.5px;white-space:nowrap}.portal-arrow{position:absolute;right:8px;bottom:12px;font-size:14px}.scene-label{bottom:calc(179px + var(--safe-bottom));font-size:8px;padding:7px 10px;white-space:nowrap}.joystick{width:88px;height:88px;bottom:calc(180px + var(--safe-bottom));left:18px}.joystick span{left:23px;top:23px}#home-camera{right:18px;bottom:calc(192px + var(--safe-bottom));width:36px;height:36px}.room-tray{left:12px;right:12px;gap:6px;bottom:calc(18px + var(--safe-bottom))}.room-card{min-width:0;flex:1;padding:13px 8px;border-radius:15px}.room-card strong{font-size:10px}.room-card small{font-size:8px}body[data-room=gifts] .intro h1,body[data-room=markets] .intro h1{font-size:30px}body[data-room=gifts] .scene-label,body[data-room=markets] .scene-label{bottom:calc(110px + var(--safe-bottom))}dialog{padding:27px 22px}dialog h2{font-size:25px}.hint{display:none}#toast{bottom:calc(160px + var(--safe-bottom));max-width:90vw;white-space:nowrap}}
@media(max-height:560px){header{top:12px;flex-wrap:nowrap}.intro{top:100px}.intro h1{font-size:30px}.intro p,.intro .eyebrow{display:none}.portal-tray{left:18%;right:4%;bottom:12px}.portal-cover{display:none}.portal-card{min-height:55px;justify-content:center}.joystick{bottom:20px}.scene-label{bottom:110px}#home-camera{bottom:100px}.room-tray{left:20%}nav{order:0;width:auto}.brand small{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.zoom-button{position:fixed;right:calc(26px + var(--safe-right));width:36px;height:36px;border-radius:50%;background:#fffc;color:#9b80b7;font-size:22px;z-index:4}@media(max-width:800px){.zoom-button{right:18px;width:32px;height:32px}}
body[data-room=gifts] .intro,body[data-room=markets] .intro{max-width:230px}body[data-room=gifts] .intro h1,body[data-room=markets] .intro h1{font-size:27px;letter-spacing:-1px;line-height:1.2}body[data-room=gifts] .intro .eyebrow,body[data-room=markets] .intro .eyebrow{font-size:7px;letter-spacing:1px}
body[data-room=plaza] .scene-label,body:not([data-room]) .scene-label{bottom:195px}
@media(max-width:800px){body[data-room=gifts] .intro,body[data-room=markets] .intro{top:calc(132px + var(--safe-top));max-width:220px}body[data-room=gifts] .intro h1,body[data-room=markets] .intro h1{font-size:22px}body[data-room=gifts] .intro p,body[data-room=markets] .intro p{display:none}}
body[data-inspect] .intro,body[data-inspect] .hint,body[data-inspect] .scene-label{display:none}.gift-panel{position:fixed;inset:110px 22px auto auto;margin:0;width:325px;max-height:calc(100dvh - 220px);padding:24px;background:#faf7fff0;box-shadow:0 12px 45px #49325725}.gift-panel h2{font-size:22px;margin:9px 0}.gift-panel .eyebrow{font-size:7px;letter-spacing:1px}.gift-panel .gift-attributes{gap:5px}.gift-panel .gift-attributes div{padding:7px;font-size:10px}.gift-panel .primary,.gift-panel .secondary{padding:10px;margin-top:10px}.gift-panel summary{font-size:11px;cursor:pointer;color:#7855b1;padding:12px 0}.gift-panel .compare-image{max-height:220px;object-fit:contain}.gift-panel .fine{font-size:8px!important}.gift-panel .field{margin-top:12px}.gift-panel .close{width:28px;height:28px}
body[data-gift-panel] .joystick,body[data-gift-panel] #home-camera,body[data-gift-panel] .zoom-button{display:none}
body[data-walking] .intro{display:none}
@media(max-height:560px){.portal-card{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;min-height:54px;border-radius:16px}.portal-card h3{font-size:11px;margin:0 0 4px}.portal-card p{display:none}.portal-card .tag{font-size:6px;letter-spacing:.4px}.portal-arrow{position:static;font-size:18px}.hint{display:none}.joystick{display:block;width:80px;height:80px;bottom:20px}.joystick span{left:19px;top:19px}#home-camera{bottom:82px;width:32px;height:32px}.zoom-button{width:30px;height:30px}.zoom-button[aria-label="Приблизить"]{bottom:126px!important}.zoom-button[aria-label="Отдалить"]{bottom:166px!important}body[data-room] .scene-label,body:not([data-room]) .scene-label{bottom:84px}.room-card{padding:10px 14px}}
@media(max-width:800px){.joystick{display:block}.gift-panel{inset:auto 12px calc(110px + var(--safe-bottom)) 12px;width:auto;max-height:34dvh;padding:18px 20px;border-radius:20px}.gift-panel h2{font-size:18px}.gift-panel .gift-attributes{grid-template-columns:repeat(4,1fr);margin-top:9px}.gift-panel .gift-attributes div{font-size:8px;padding:5px}.gift-panel .gift-attributes small{font-size:7px}.gift-panel .eyebrow{font-size:6px}.gift-panel .inspect-controls .field{font-size:9px}.gift-panel .compare-image{max-height:180px}body[data-room=plaza] .scene-label,body:not([data-room]) .scene-label{bottom:calc(155px + var(--safe-bottom))}}
/* Keep the same controls reachable when Telegram or the device reserves edges. */
.original-reference{border-radius:18px;background-position:center;background-size:cover;overflow:hidden}.original-reference .compare-image{display:block;margin:0}
.backdrop-retry[hidden]{display:none}.backdrop-retry{min-height:44px}.backdrop-notice{color:#8b4e7c!important}
#performance-panel{position:fixed;z-index:6;top:var(--performance-top,122px);left:calc(18px + var(--safe-left));width:min(354px,calc(100vw - 36px - var(--safe-left) - var(--safe-right)));padding:16px 40px 15px 17px;border:1px solid white;border-radius:18px;background:#faf7fff0;box-shadow:0 8px 28px #49325718;color:#5f4777}#performance-panel[hidden],#performance-panel [hidden]{display:none}#performance-panel .eyebrow{font-size:6px;letter-spacing:1px}#performance-panel strong{display:block;font-size:13px;margin-top:6px}#performance-panel p{font-size:8px;margin:5px 0;color:#947da6}#performance-panel output{display:block;white-space:pre-line;font-size:11px;line-height:1.7;user-select:text}#performance-panel progress{display:block;width:100%;height:5px;margin-top:8px;accent-color:#8d67d5}#performance-panel .close{width:28px;height:28px}#performance-panel .secondary{font-size:10px;padding:9px;margin-top:8px}body[data-measuring] .intro,body[data-measuring] .hint,body[data-measuring] .scene-label{display:none}
dialog:not(.gift-panel){top:var(--safe-top);bottom:var(--safe-bottom);left:var(--safe-left);right:var(--safe-right);max-width:calc(100vw - var(--safe-left) - var(--safe-right) - 28px)}
.gift-panel{top:calc(110px + var(--safe-top));right:calc(22px + var(--safe-right));max-height:calc(100dvh - 220px - var(--safe-top) - var(--safe-bottom))}
@media(max-width:800px){.intro{left:calc(26px + var(--safe-left))}.portal-tray{left:calc(14px + var(--safe-left));right:calc(14px + var(--safe-right))}.room-tray{left:calc(12px + var(--safe-left));right:calc(12px + var(--safe-right))}.joystick{left:calc(18px + var(--safe-left))}#home-camera,.zoom-button{right:calc(18px + var(--safe-right))}.gift-panel{inset:auto calc(12px + var(--safe-right)) calc(110px + var(--safe-bottom)) calc(12px + var(--safe-left));max-height:min(34dvh,calc(100dvh - 150px - var(--safe-top) - var(--safe-bottom)))}}
@media(max-height:560px){header{top:calc(12px + var(--safe-top))}.portal-tray{left:max(18%,calc(112px + var(--safe-left)));right:calc(4% + var(--safe-right));bottom:calc(12px + var(--safe-bottom))}.room-tray{left:max(20%,calc(112px + var(--safe-left)));right:calc(12px + var(--safe-right));bottom:calc(18px + var(--safe-bottom))}.joystick{left:calc(18px + var(--safe-left));bottom:calc(20px + var(--safe-bottom))}#home-camera{bottom:calc(82px + var(--safe-bottom))}.zoom-button[aria-label="Приблизить"]{bottom:calc(126px + var(--safe-bottom))!important}.zoom-button[aria-label="Отдалить"]{bottom:calc(166px + var(--safe-bottom))!important}body[data-room] .scene-label,body:not([data-room]) .scene-label{bottom:calc(84px + var(--safe-bottom))}}
#performance-report{width:100%;margin-top:9px;padding:8px;border:1px solid #ded1ee;border-radius:9px;background:#fff;color:#644d79;font:9px/1.5 system-ui;resize:none;user-select:text}
#performance-start,#performance-panel .secondary{min-height:44px}#performance-panel .close{width:44px;height:44px;right:4px;top:4px;background:transparent}#performance-panel p{font-size:10px}#performance-panel output{font-size:12px}@media(max-height:560px){#performance-panel{width:min(300px,40vw);padding:12px 36px 12px 12px}#performance-panel output{font-size:11px}}
#performance-main,#performance-detail{display:block}@media(max-width:800px){#performance-panel{padding:12px 108px 12px 16px}#performance-panel .eyebrow,#performance-panel p,#performance-detail{display:none}#performance-panel strong{font-size:12px;line-height:1.3;margin-top:0}#performance-panel output{font-size:12px;line-height:1.5}#performance-panel .secondary{position:absolute;right:52px;top:8px;transform:none;width:44px;height:44px;min-height:44px;padding:0;margin:0;font-size:0;border-radius:12px}#performance-panel .secondary::after{content:"⧉";font-size:22px}#performance-panel .close{right:4px;top:8px;transform:none}#performance-panel #performance-report{width:calc(100% + 92px)}}@media(max-width:800px) and (max-height:560px){#performance-panel{padding:12px 108px 12px 12px}}
@media(max-width:800px){#performance-panel progress{position:absolute;left:16px;bottom:5px;width:calc(100% - 124px);height:3px;margin:0}}

#world-recovery[hidden]{display:none}#world-recovery{position:fixed;inset:0;z-index:25;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;display:grid;place-items:center;padding:calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));background:#f5f0fbf2;text-align:center}#world-recovery>div{width:min(340px,100%)}#world-recovery strong{font-size:23px;color:#7855b0}#world-recovery p{font-size:12px;line-height:1.8;color:#927caa}#world-recovery button{min-height:44px;margin-top:20px}
