:root{--bg:#f3efe6;--surface:#fffdf8;--text:#1f1d18;--muted:#8b8578;--accent:#2f5bd3;--accent-text:#fff;--error:#d0413b;--radius:14px;--safe-top:max(env(safe-area-inset-top,0px), calc(var(--tg-safe-area-inset-top,0px) + var(--tg-content-safe-area-inset-top,0px)));--safe-bottom:max(env(safe-area-inset-bottom,0px), var(--tg-safe-area-inset-bottom,0px));font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}*{box-sizing:border-box}html,body{background:var(--bg);height:100%;color:var(--text);overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;margin:0}#app{height:var(--tg-viewport-stable-height,100dvh);padding-top:var(--safe-top);padding-bottom:var(--safe-bottom);flex-direction:column;display:flex;overflow:hidden}.screen{flex-direction:column;flex:1;min-height:0;display:flex}.screen[hidden]{display:none}button{font:inherit;color:inherit}#menu{padding:0 20px 24px;overflow-y:auto}.menu-head{width:100%;max-width:520px;margin:0 auto;padding:36px 4px 22px}.menu-head h1{letter-spacing:-.02em;margin:0;font-size:34px;font-weight:750}.menu-head p{color:var(--muted);margin:6px 0 0;font-size:16px}.cards{gap:12px;width:100%;max-width:520px;margin:0 auto;display:grid}.card{border-radius:var(--radius);background:var(--surface);text-align:left;cursor:pointer;border:0;align-items:center;gap:16px;width:100%;padding:16px 18px;transition:transform .12s;display:flex}.card:not(:disabled):active{transform:scale(.98)}.card:disabled{cursor:default;opacity:.55}.card:focus-visible,.btn:focus-visible,.icon-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.card-icon{width:52px;height:52px;color:var(--text);flex:none}.card-icon svg{width:100%;height:100%;display:block}.card-text{flex-direction:column;gap:3px;min-width:0;display:flex}.card-title{font-size:19px;font-weight:650}.card-tagline{color:var(--muted);font-size:14px}.topbar{flex:none;grid-template-columns:48px 1fr 72px;align-items:center;height:52px;padding:0 8px;display:grid}.title{text-align:center;white-space:nowrap;text-overflow:ellipsis;font-size:17px;font-weight:650;overflow:hidden}.status{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);padding-right:8px;font-size:16px}.icon-btn{cursor:pointer;background:0 0;border:0;border-radius:12px;place-items:center;width:44px;height:44px;display:grid}.icon-btn:active{background:var(--surface)}body.tg #back{visibility:hidden}#stage{touch-action:none;flex:1;min-height:0;position:relative;overflow:hidden}#stage canvas{display:block}#stage.loading:after{content:"Загрузка…";color:var(--muted);place-items:center;display:grid;position:absolute;inset:0}.sheet{z-index:10;background:#0006;justify-content:center;align-items:flex-end;animation:.15s fade;display:flex;position:fixed;inset:0}.sheet[hidden]{display:none}.sheet-panel{width:100%;max-width:440px;margin:0 12px calc(12px + var(--safe-bottom));background:var(--surface);border-radius:20px;flex-direction:column;gap:10px;padding:22px 18px 16px;animation:.2s rise;display:flex}.sheet-panel h2{margin:0;font-size:22px;font-weight:700}.sheet-panel p{color:var(--muted);margin:0 0 6px;font-size:15px;line-height:1.4}.btn{background:color-mix(in srgb, var(--text) 7%, var(--surface));cursor:pointer;border:0;border-radius:12px;min-height:50px;padding:0 16px;font-size:16px;font-weight:600}.btn.primary{background:var(--accent);color:var(--accent-text)}.btn:active{filter:brightness(.94)}@media (min-width:700px){.sheet{align-items:center}.sheet-panel{margin-bottom:0}}@keyframes fade{0%{opacity:0}}@keyframes rise{0%{opacity:0;transform:translateY(16px)}}@media (prefers-reduced-motion:reduce){.sheet,.sheet-panel{animation:none}}
