*{box-sizing:border-box}body{margin:0;background:#000;color:#ECE8E0;font-family:Geist,sans-serif}a{color:#E2C47F}button,input,textarea,select{font:inherit}button{cursor:pointer}#app{max-width:430px;margin:auto;min-height:100dvh}#app>[data-screen-label]{width:100%!important;height:auto!important;min-height:100dvh!important;border:0!important;border-radius:0!important;padding-top:max(var(--source-top,24px),var(--tg-content-safe-area-inset-top,0px))!important;padding-bottom:max(var(--source-bottom,20px),env(safe-area-inset-bottom))!important;overflow:visible!important}#app>[data-screen-label]>div{flex-shrink:0}#app>[data-screen-label]>div[style*="flex:1"]{flex-shrink:1}a:hover{color:#F6E3B0}[data-go],[data-action],[role=button]{cursor:pointer}button:disabled{opacity:.45;cursor:wait}[role=button]:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid #E2C47F;outline-offset:3px}input,textarea,select{background:#1c1c1e;color:#ECE8E0;border:1px solid #5a5650;border-radius:12px;padding:12px;width:100%;min-height:44px}textarea{min-height:90px}label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#B9B4AA;margin:14px 0}dialog{background:#101011;color:#ECE8E0;border:1px solid #5a4a2f;border-radius:22px;width:calc(100% - 32px);max-width:400px;max-height:85dvh;padding:22px}dialog::backdrop{background:#000b}.close{float:right;border:0;background:transparent;color:#B9B4AA;font-size:28px}.primary{border:1px solid #8a7650;background:linear-gradient(135deg,#A08A5C,#6E5E40 55%,#4A3F2C);color:#F6EBCB;border-radius:14px;min-height:52px;font-weight:600;width:100%;padding:12px;margin:8px 0}.secondary{background:#1c1c1e;color:#DCDDE0;border:1px solid #5a5650;border-radius:14px;padding:13px;width:100%;margin:5px 0}#notice{position:fixed;z-index:30;bottom:24px;left:50%;transform:translateX(-50%);max-width:390px;width:90%;padding:16px;background:#252218;border:1px solid #8a7650;border-radius:14px;box-shadow:0 8px 30px #000b;font-size:14px;white-space:pre-line}.rows{display:flex;flex-direction:column;gap:8px}.row{padding:15px;border-radius:16px;background:#1c1c1e;color:#ECE8E0;border:0;text-align:left;display:block;width:100%;line-height:1.5}.muted{color:#9A958B;font-size:13px}.heading{font-size:28px;font-weight:300;letter-spacing:-.035em;margin:12px 0 20px}.money{color:#F1DCA0}.empty{text-align:center;padding:40px 12px;color:#9A958B;line-height:1.6}.empty img{display:block;width:160px;height:130px;object-fit:contain;margin:auto}.state-bar{font-size:12px;padding:10px 16px;color:#C9A35A;text-align:center;background:#19160f}#app .live{flex:1;display:flex;flex-direction:column;gap:12px;min-height:0}.nav{position:sticky;bottom:0;background:#000;display:grid;grid-template-columns:repeat(5,1fr);min-height:64px;align-items:center;text-align:center;font-size:11px;color:#8E897F;border-top:1px solid #222;margin:0 -16px;padding-bottom:env(safe-area-inset-bottom)}.nav button{border:0;background:none;color:inherit;font-size:11px;padding:8px 1px}.nav img{width:22px;height:22px;display:block;margin:0 auto 4px}.nav .on{color:#F1DCA0}.checks label{flex-direction:row;align-items:center;margin:4px 0;min-height:44px}.checks input{width:20px;min-height:20px}.photo{width:100%;max-height:300px;object-fit:contain;border-radius:16px} @media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}body.reference #app{max-width:none}body.reference #app>[data-screen-label]{width:360px!important;height:760px!important;min-height:760px!important;border:1px solid #2c2923!important;border-radius:40px!important;overflow:hidden!important;padding-top:24px!important}body.reference .state-bar{display:none}
.source-field{border:0!important;background:transparent!important;color:inherit!important;border-radius:0!important;padding:0!important;min-height:0!important;width:100%!important;outline-offset:4px;font-size:inherit}textarea.source-field{min-height:44px!important}.source-add{float:right;margin-left:16px;width:36px;height:36px;border:1px solid #6a5630;border-radius:50%;background:#19160f;color:#F1DCA0;font-size:24px}#app>[data-screen-label="S05 Главная"],#app>[data-screen-label="S06 Список задач"]{padding-top:0!important;padding-bottom:0!important}#app>[data-screen-label] [style*="height:64px"][style*="grid-template-columns"]{position:sticky;bottom:0;background:#000;flex-shrink:0;min-height:64px}
/* The Mini App viewport must never grow horizontally, including while the keyboard is open. */
html,body{width:100%;max-width:100%;min-width:0;overflow-x:clip;overscroll-behavior-x:none;-webkit-text-size-adjust:100%;touch-action:pan-y pinch-zoom}
#app{width:100%;max-width:430px;min-width:0;overflow-x:clip;isolation:isolate}
#app *,dialog *{min-width:0;box-sizing:border-box}
#app img,#app video,#app audio,#app canvas,dialog img{max-width:100%}
#app [data-screen-label]{max-width:100%!important}
#app span,#app p,#app a,dialog p{overflow-wrap:anywhere}
#app input,#app select,#app textarea,dialog input,dialog select,dialog textarea{max-width:100%;font-size:16px!important}
#app [style*="overflow-x:auto"],#app [style*="overflow-x: auto"]{overflow-x:visible!important;flex-wrap:wrap!important;margin-right:0!important;padding-right:0!important}
#app [style*="overflow-x:auto"]>*,#app [style*="overflow-x: auto"]>*{flex:1 1 100%!important;max-width:100%}
#app [style*="grid-template-columns:repeat(4,1fr)"],#app [style*="grid-template-columns: repeat(4, 1fr)"]{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#app [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
dialog{max-width:min(400px,calc(100vw - 32px));overflow-x:clip}

/* Preserve each mockup's inner spacing below Telegram's native controls. */
body:not(.reference) #app>[data-screen-label]{padding-top:calc(var(--source-top,24px) + max(var(--hsm-telegram-top,0px),env(safe-area-inset-top,0px)))!important;padding-bottom:calc(var(--source-bottom,20px) + max(var(--hsm-telegram-bottom,0px),env(safe-area-inset-bottom,0px)))!important}
#app [data-go] svg[data-nav-icon]{width:22px;height:22px;max-width:none;flex:none;pointer-events:none}
