:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:var(--tg-theme-text-color,#14213d);background:var(--tg-theme-bg-color,#f4f7fb);font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:var(--tg-theme-secondary-bg-color,#eef3f9)}button,input,select{font:inherit}.app-shell{width:100%;max-width:560px;min-height:100vh;margin:auto;background:var(--tg-theme-bg-color,#f8fafd);padding-bottom:calc(88px + env(safe-area-inset-bottom));position:relative;overflow:hidden}.topbar{height:68px;padding:calc(12px + env(safe-area-inset-top)) 20px 10px;display:flex;align-items:center;justify-content:space-between;background:color-mix(in srgb,var(--tg-theme-bg-color,#fff) 92%,transparent);position:sticky;top:0;z-index:10;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}.brand{display:flex;align-items:center;gap:9px;font-size:20px}.brand-mark,.logo-large{display:grid;place-items:center;background:linear-gradient(145deg,#2575fc,#164fc7);color:#fff;font-weight:900;box-shadow:0 8px 22px #1f6ef43b}.brand-mark{width:34px;height:34px;border-radius:11px}.user-chip{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--tg-theme-hint-color,#66758b)}.page{padding:18px 20px 36px}.page h1{font-size:28px;line-height:1.15;margin:4px 0 24px}.page h2{font-size:19px;margin:26px 0 14px}.center-screen{height:100vh;display:grid;place-content:center;text-align:center;color:var(--tg-theme-hint-color,#66758b)}.logo-large{width:82px;height:82px;border-radius:26px;font-size:42px;margin:auto}.hero{background:linear-gradient(135deg,#1454ca,#3488ff);padding:24px;border-radius:26px;color:#fff;box-shadow:0 16px 40px #1767e72e}.hero p{margin:0 0 5px;opacity:.8}.hero h1{margin:0;font-size:28px}.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.metric-grid article,.result-summary article{padding:16px 8px;border:1px solid var(--tg-theme-section-separator-color,#e4eaf2);background:var(--tg-theme-section-bg-color,#fff);border-radius:18px;text-align:center}.metric-grid strong,.result-summary strong{display:block;font-size:20px;color:var(--tg-theme-accent-text-color,#1f6ef4)}.metric-grid span,.result-summary span{display:block;margin-top:5px;font-size:11px;color:var(--tg-theme-hint-color,#718096)}.bank-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bank-grid button{border:0;text-align:left;padding:20px;border-radius:22px;color:#fff;background:linear-gradient(145deg,#6236d8,#8b5cf6);min-height:130px;display:flex;flex-direction:column;justify-content:space-between}.bank-grid button+button{background:linear-gradient(145deg,#e36b16,#f59e0b)}.bank-grid span{font-size:30px}.bank-grid b{font-size:16px}.auth-card{margin:8vh 20px 20px;padding:28px;background:var(--tg-theme-section-bg-color,#fff);border:1px solid var(--tg-theme-section-separator-color,#e5eaf0);border-radius:28px;box-shadow:0 24px 60px #23395d16}.auth-card h1{text-align:center;font-size:25px}.hero-icon{width:64px;height:64px;border-radius:20px;background:#e8f1ff;color:#1769e8;display:grid;place-items:center;font-size:35px;margin:auto}.muted,.empty{color:var(--tg-theme-hint-color,#718096);text-align:center}label{display:block;font-size:13px;font-weight:700;margin:18px 0 8px}input,select{display:block;width:100%;margin-top:8px;border:1px solid var(--tg-theme-section-separator-color,#dfe6ef);background:var(--tg-theme-section-bg-color,#fff);color:var(--tg-theme-text-color,#14213d);padding:15px;border-radius:14px;outline:none}input:focus,select:focus{border-color:#2675ed;box-shadow:0 0 0 3px #2675ed1c}.primary,.secondary,.danger{width:100%;border:0;border-radius:15px;padding:15px 18px;font-weight:800;margin-top:14px}.primary{color:var(--tg-theme-button-text-color,#fff);background:var(--tg-theme-button-color,#2473ed);box-shadow:0 10px 25px #2473ed35}.primary:disabled{opacity:.45}.secondary{background:#e8f1ff;color:#1765dc}.danger{background:#feeceb;color:#d7372f}.segment{display:grid;grid-template-columns:1fr 1fr;background:var(--tg-theme-secondary-bg-color,#eaf0f7);padding:4px;border-radius:15px;margin-bottom:16px}.segment button{padding:11px 4px;border:0;border-radius:12px;background:transparent;color:var(--tg-theme-hint-color,#6f7e92);font-size:12px;font-weight:800}.segment button.active{background:var(--tg-theme-section-bg-color,#fff);color:var(--tg-theme-accent-text-color,#1e6fe8);box-shadow:0 3px 12px #12213c14}.category-list{display:grid;gap:10px}.category-list button{width:100%;display:grid;grid-template-columns:45px 1fr 25px;align-items:center;text-align:left;gap:12px;border:1px solid var(--tg-theme-section-separator-color,#e2e8f0);background:var(--tg-theme-section-bg-color,#fff);color:var(--tg-theme-text-color,#14213d);padding:12px;border-radius:17px}.category-list button.selected{border-color:#2473ed;background:#2473ed0b}.category-list i{display:none;color:#2473ed}.category-list .selected i{display:block}.category-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;color:#fff}.category-list b,.category-list small{display:block}.category-list b{font-size:14px}.category-list small{color:var(--tg-theme-hint-color,#758298);margin-top:4px}.range-label{padding:14px;background:var(--tg-theme-section-bg-color,#fff);border-radius:16px}.range-label input{padding:0;box-shadow:none}.sticky-action{position:sticky;bottom:8px}.progress-row{display:flex;align-items:center;gap:12px;font-weight:800;color:#2473ed}.progress-row>div{height:7px;flex:1;background:#dfe8f4;border-radius:10px;overflow:hidden}.progress-row i{height:100%;display:block;background:#2473ed;border-radius:10px;transition:width .3s}.question-card{margin:24px 0 18px;padding:24px 20px;background:var(--tg-theme-section-bg-color,#fff);border:1px solid var(--tg-theme-section-separator-color,#e4e9f1);border-radius:22px;min-height:180px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 12px 32px #18304f0a}.question-card small{color:#2473ed;font-weight:800}.question-card h2{font-size:20px;line-height:1.45;margin:10px 0}.option-list{display:grid;gap:11px}.option-list button{display:flex;align-items:center;text-align:left;gap:13px;border:1px solid var(--tg-theme-section-separator-color,#e0e7f0);background:var(--tg-theme-section-bg-color,#fff);color:var(--tg-theme-text-color,#14213d);border-radius:17px;padding:13px;font-weight:600;line-height:1.35}.option-list button:active{border-color:#2473ed;background:#eaf2ff}.option-list span{flex:0 0 38px;height:38px;border-radius:12px;background:#edf3fb;color:#276dce;display:grid;place-items:center;font-weight:900}.score-ring{--score:0deg;width:190px;height:190px;margin:20px auto 26px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#2473ed var(--score),#e3eaf4 0);position:relative}.score-ring:before{content:"";position:absolute;top:13px;right:13px;bottom:13px;left:13px;background:var(--tg-theme-bg-color,#f8fafd);border-radius:50%}.score-ring div{position:relative;text-align:center}.score-ring strong{font-size:38px;display:block}.score-ring span{color:var(--tg-theme-hint-color,#718096)}.result-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px}.wrong-list,.history-list,.stats-list{display:grid;gap:10px}.wrong-list article,.history-list article,.stats-list article{background:var(--tg-theme-section-bg-color,#fff);border:1px solid var(--tg-theme-section-separator-color,#e3e8f0);padding:15px;border-radius:16px}.wrong-list b{font-size:14px}.wrong-list p{color:var(--tg-theme-hint-color,#718096);font-size:13px;margin:8px 0 0}.history-list article,.stats-list article{display:flex;align-items:center;justify-content:space-between}.history-list small,.stats-list small{display:block;color:var(--tg-theme-hint-color,#718096);margin-top:4px}.history-list strong,.stats-list strong{font-size:20px;color:#2473ed}.chart{height:180px;display:flex;align-items:end;gap:5px;padding:20px 12px 0;background:var(--tg-theme-section-bg-color,#fff);border-radius:20px;margin-bottom:18px}.chart i{flex:1;min-height:4px;max-height:100%;background:linear-gradient(#2473ed,#6aa4fa);border-radius:6px 6px 2px 2px}.profile-avatar{width:90px;height:90px;margin:0 auto 20px;display:grid;place-items:center;border-radius:28px;background:linear-gradient(145deg,#2473ed,#65a2ff);color:#fff;font-size:38px;font-weight:900}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:min(560px,100%);height:calc(70px + env(safe-area-inset-bottom));padding:8px 12px env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(4,1fr);background:color-mix(in srgb,var(--tg-theme-bg-color,#fff) 94%,transparent);border-top:1px solid var(--tg-theme-section-separator-color,#e5eaf1);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);z-index:20}.bottom-nav button{border:0;background:transparent;color:var(--tg-theme-hint-color,#8390a3);font-size:21px;display:flex;flex-direction:column;align-items:center;gap:3px}.bottom-nav span{font-size:10px;font-weight:700}.bottom-nav button.active{color:var(--tg-theme-accent-text-color,#2473ed)}.toast{position:fixed;z-index:40;left:50%;bottom:95px;transform:translate(-50%);width:min(500px,calc(100% - 40px));padding:13px 16px;border-radius:14px;background:#153f2e;color:#fff;box-shadow:0 10px 35px #0003}.toast.error{background:#a92f2a}.busy-overlay{position:fixed;z-index:50;top:0;right:0;bottom:0;left:0;background:#fff3;display:grid;place-items:center;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}.busy-overlay span{width:38px;height:38px;border:4px solid #bed4f3;border-top-color:#2473ed;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width:360px){.page{padding-left:14px;padding-right:14px}.metric-grid{gap:6px}.metric-grid article{padding:13px 3px}.bank-grid{grid-template-columns:1fr}.bank-grid button{min-height:105px}}
