:root{--navy:#00033d;--blue:#0033ff;--lavender:#977dff;--ink:#030812;--muted:#65677c;--bg:#f4f5fb;--border:#e3e5f0;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--navy);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--lavender);outline-offset:4px}button{border:0}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}p{line-height:1.6}h1,h2{letter-spacing:-.045em}h2{font-size:1.75rem;line-height:1.2;margin-bottom:0}h3{font-size:1rem;line-height:1.4}small,.small{font-size:.875rem;line-height:1.45;color:var(--muted)}[hidden]{display:none!important}.shell{max-width:1440px;margin:auto;display:grid;grid-template-columns:240px 1fr;min-height:100vh}.sidebar{padding:44px 30px;position:sticky;top:0;height:100vh;background:#fff;border-right:1px solid var(--border);display:flex;flex-direction:column}.brand{font-size:1.55rem;letter-spacing:-.05em;font-weight:700;display:flex;align-items:center;gap:12px}.brand-mark{width:42px;height:42px;background:var(--blue);color:#fff;border-radius:13px;display:grid;place-items:center;font-size:2rem;padding-bottom:4px}.sidebar>p{color:var(--muted);font-size:.875rem;margin:30px 0 40px}.sidebar nav{display:grid;gap:9px}.sidebar nav button{text-align:left;border-radius:14px;padding:15px 12px;background:transparent;color:var(--muted);font-size:.875rem;display:flex;gap:14px}.sidebar nav button span{color:var(--navy);font-weight:600}.sidebar nav button.active{background:#edf0ff;color:var(--blue)}.sidebar nav button.active span{color:var(--blue)}.sidebar-foot{margin-top:auto;font-size:.875rem;line-height:1.9;font-weight:700}.sidebar-foot span{font-weight:400;color:var(--muted)}main{min-width:0;padding:0 40px 20px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:30px 0}.breadcrumb{font-size:.75rem;font-weight:700;letter-spacing:.08em;color:#77798b}.breadcrumb span{color:var(--navy)}.level-pill,.pill{font-size:.75rem;font-weight:700;letter-spacing:.06em;white-space:nowrap}.level-pill{padding:10px 16px;border:1px solid #d9dcee;border-radius:30px}.mobile-brand{display:none}.notice{font-size:.875rem;line-height:1.55;background:#eeeffc;color:#45496d;border:1px solid #dfe1f6;border-radius:12px;padding:11px 15px;margin-bottom:20px}.error{background:#fff0f0;color:#8d2038;padding:16px;border-radius:14px;margin-bottom:16px}.hero{position:relative;overflow:hidden;border-radius:28px;min-height:330px;display:flex;align-items:center;justify-content:space-between;gap:30px;padding:40px;background:radial-gradient(ellipse at 85% 0%,#7795ff 0%,#284fed 22%,#0d219a 45%,#040940 77%);color:white}.hero-copy{z-index:1}.eyebrow{font-size:.75rem;letter-spacing:.13em;font-weight:700;display:block}.hero .eyebrow{color:#c7d3ff;margin-bottom:20px}.hero h1{font-size:clamp(2rem,3.2vw,3rem);line-height:1.12;margin-bottom:16px;font-weight:650}.hero p{color:#cbd3f3;font-size:1rem;margin-bottom:26px}.hero-button{background:#fff;color:var(--navy);display:flex;gap:24px;align-items:center;padding:15px 20px;border-radius:14px;font-weight:600;font-size:.875rem;min-height:48px}.hero-button span{font-size:1.3rem}.hero-progress{text-align:center;flex-shrink:0}.progress-circle{width:170px;height:170px;border:8px solid #ffffff22;box-shadow:0 0 0 1px #ffffff18,inset 0 0 25px #7293ff25;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.progress-circle strong{font-size:3.5rem;letter-spacing:-.07em;font-weight:500}.progress-circle strong span{font-size:1.7rem;margin-left:4px}.progress-circle>span{font-size:.875rem;color:#d5dcff}.hero-count{font-size:.75rem;color:#d5dcff;margin-top:18px}.hero-count b{color:white}.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:32px 0 20px}.section-title .eyebrow{margin-bottom:10px}.muted{color:var(--muted)}.zones{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.zone{background:white;border:1px solid var(--border);border-radius:22px;padding:22px;text-align:left;position:relative;transition:transform .15s,border-color .15s;min-width:0}.zone:hover{transform:translateY(-3px)}.zone.selected{border-color:var(--blue);box-shadow:0 4px 20px #0033ff08}.zone-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:25px}.zone-icon{width:46px;height:46px;border-radius:14px;background:#eef0ff;color:var(--blue);display:grid;place-items:center;font-size:1.2rem;font-weight:600}.zone:nth-child(2n) .zone-icon{background:#f0ecff;color:#7051d8}.zone svg{width:24px;height:24px}.zone-arrow{font-size:1.25rem;color:#9599ae}.zone h3{font-size:1.05rem;margin-bottom:3px}.zone .english-name{font-size:.75rem;color:var(--muted);display:block;margin-bottom:22px;letter-spacing:.035em}.zone-progress{display:flex;justify-content:space-between;gap:8px;font-size:.75rem;color:var(--muted)}.progress-track{height:4px;background:#eef0f7;border-radius:4px;margin-top:10px;overflow:hidden}.progress-fill{height:100%;background:var(--blue);width:0}.route-note{font-size:.875rem;color:var(--muted);max-width:630px}.subtle{background:#eeeff8;color:var(--navy);border-radius:12px;padding:13px 15px;font-size:.875rem;min-height:44px}.subtle[aria-pressed=true]{color:var(--blue);background:#e4e9ff}.unit-list{border-radius:22px;border:1px solid var(--border);overflow:hidden;background:white}.unit-row{width:100%;display:flex;text-align:left;align-items:center;gap:16px;padding:17px 22px;background:white;color:var(--navy);border-bottom:1px solid #eef0f6}.unit-row:last-child{border:0}.unit-row:hover{background:#fafaff}.unit-number{width:44px;height:44px;background:#f1f2fa;color:#767a91;display:grid;place-items:center;border-radius:50%;font-size:.8rem;font-weight:650;flex-shrink:0}.unit-row.first .unit-number{background:var(--blue);color:#fff}.unit-row .unit-body{flex:1;min-width:0}.unit-name{font-weight:600;display:block;line-height:1.4;font-size:.9375rem}.unit-info{font-size:.75rem;color:var(--muted);display:block;margin-top:4px;line-height:1.5}.unit-state{font-size:.75rem;color:#777b92;max-width:120px;text-align:right;line-height:1.45}.unit-state.available{color:var(--blue)}.exam-card{display:flex;align-items:center;gap:20px;background:#e9ecfa;border-radius:22px;padding:24px;margin:24px 0}.exam-icon{font-size:1.3rem;width:60px;height:60px;display:grid;place-items:center;flex-shrink:0;border-radius:18px;background:white;color:var(--blue);font-weight:700}.exam-card h3{margin-bottom:5px}.exam-card p{font-size:.875rem;margin-bottom:0;color:var(--muted)}.exam-card>div{flex:1}.exam-card>.small{align-self:flex-start}.page-heading{font-size:2.8rem;margin-top:14px;margin-bottom:15px}.page-intro{max-width:640px;color:var(--muted)}.empty-card{padding:50px;background:white;border:1px solid var(--border);border-radius:28px;max-width:700px;margin:30px auto}.empty-card h2{margin-bottom:20px}.empty-card p{color:var(--muted)}.empty-symbol{font-size:3.5rem;color:var(--blue);display:block;margin-bottom:25px}.primary{background:var(--blue);color:white;border-radius:14px;padding:16px 24px;min-height:50px;font-weight:600;font-size:.9375rem}.lab-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(200px,1fr);gap:22px;margin-top:28px}.lab-main{background:white;border:1px solid var(--border);border-radius:24px;padding:28px}.lab-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:26px}.pill{color:var(--blue)}label{font-size:.875rem;display:block;margin-bottom:10px;color:var(--muted)}select{width:100%;padding:12px;border:1px solid var(--border);background:#f9faff;border-radius:12px;color:var(--navy);font-size:1rem;min-height:46px}.speech-text{font-size:2rem;font-weight:550;line-height:1.7;letter-spacing:-.03em;margin:30px 0 14px}.speech-text .word{display:inline-block;margin-right:8px;border-bottom:2px solid transparent}.speech-text .recognized{color:#146b60;border-bottom-color:#29aa91}.speech-text .not_confirmed{color:#a23c48;border-bottom-color:#d86575}.speech-text .unknown{color:var(--muted)}.word small{font-size:.75rem;margin-left:3px}.recording-panel{text-align:center;border-radius:20px;background:radial-gradient(ellipse at center,#e7e3ff, #f7f8ff 70%);padding:28px 15px}.record-button{width:80px;height:80px;border-radius:50%;background:linear-gradient(140deg,#8a70f6,#0033ff);color:white;font-size:1.8rem;box-shadow:0 9px 25px #5844ee25;margin-bottom:16px}.record-button.recording{background:#b73452;box-shadow:0 0 0 10px #b7345215}.recording-panel p{font-size:.9375rem;margin-bottom:5px}.action-row{display:flex;gap:10px;margin:20px 0}.action-row>.primary{flex:1}.upload{padding-top:15px;border-top:1px solid var(--border)}input[type=file]{width:100%;font-size:.875rem}audio{display:block;width:100%;margin-top:20px}.result{border:1px solid #d6dced;background:#f4f7ff;border-radius:16px;padding:18px;line-height:1.6;margin-top:22px;font-size:.9375rem;overflow-wrap:anywhere}.legend{display:flex;flex-wrap:wrap;gap:12px;font-size:.75rem;color:var(--muted);margin-top:18px}.lab-aside{padding:12px 5px}.lab-aside h3{margin-top:20px;margin-bottom:10px}.lab-aside p{font-size:.875rem;color:var(--muted)}.device-status{border-top:1px solid var(--border);padding-top:15px;margin:20px 0;font-size:.875rem;line-height:1.8}.history-item{margin-top:15px;border:1px solid var(--border);padding:12px;border-radius:14px;font-size:.875rem}.history-item a{display:block;margin-top:8px;color:var(--blue)}footer{font-size:.75rem;color:var(--muted);display:flex;justify-content:space-between;gap:16px;line-height:1.5;padding:20px 0}footer span{max-width:320px;text-align:right}.bottom-nav{display:none}dialog{border:0;border-radius:24px;max-width:540px;width:calc(100% - 32px);padding:32px;color:var(--navy);box-shadow:0 20px 90px #00033d35}dialog::backdrop{background:#00033d66;backdrop-filter:blur(5px)}dialog h2{margin:18px 20px 20px 0}dialog p{font-size:1rem;color:var(--muted)}dialog .notice{margin-top:20px}.dialog-close:not(.primary){position:absolute;right:18px;top:12px;background:transparent;font-size:1.8rem;width:44px;height:44px;color:var(--muted)}.dependency-link{padding:7px 9px;margin:3px;border-radius:8px;background:#eef0fb;color:var(--blue);font-size:.875rem;min-height:38px}
@media(max-width:1100px){.shell{grid-template-columns:190px 1fr}.sidebar{padding:35px 20px}main{padding:0 25px 20px}.hero{padding:30px;gap:20px}.progress-circle{width:135px;height:135px}.progress-circle strong{font-size:2.8rem}.hero-count{max-width:145px;line-height:1.5}.zone{padding:18px}.lab-grid{grid-template-columns:1fr}.lab-aside{padding:5px 10px}}
@media(max-width:760px){.shell{display:block}.sidebar,.breadcrumb{display:none}main{padding:var(--safe-top) 20px calc(90px + var(--safe-bottom))}.topbar{padding:23px 0}.mobile-brand{display:block;font-size:1.7rem;font-weight:700;letter-spacing:-.07em}.mobile-brand span{color:var(--blue)}.level-pill{font-size:.7rem;padding:9px 13px}.notice{font-size:.8rem;margin-bottom:16px}.hero{min-height:320px;padding:28px 24px;align-items:flex-start;border-radius:24px}.hero .eyebrow{font-size:.625rem;letter-spacing:.08em;margin-bottom:22px}.hero h1{font-size:2.25rem;line-height:1.13}.hero p{font-size:.875rem;margin-bottom:24px}.hero-progress{position:absolute;bottom:28px;right:19px}.progress-circle{width:86px;height:86px;border-width:5px}.progress-circle strong{font-size:2rem}.progress-circle strong span{font-size:1rem}.progress-circle>span,.hero-count{display:none}.hero-button{gap:13px;font-size:.8rem;padding:13px 16px;max-width:210px}.section-title{margin:28px 0 17px;gap:12px}.section-title h2{font-size:1.5rem}.eyebrow{font-size:.625rem;letter-spacing:.1em}.zones{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.zone{padding:18px 17px;border-radius:20px}.zone-head{margin-bottom:19px}.zone h3{font-size:1rem}.zone .english-name{margin-bottom:19px}.zone-icon{width:42px;height:42px}.zone-progress{font-size:.6875rem}.zone-progress>span:last-child{white-space:nowrap}.unit-row{padding:16px 14px;gap:12px}.unit-number{width:36px;height:36px;font-size:.7rem}.unit-state{font-size:.6875rem;max-width:80px}.unit-name{font-size:.875rem}.unit-info{font-size:.75rem}.route-section .section-title{align-items:flex-end}.route-section .subtle{font-size:.75rem;padding:11px}.route-note{font-size:.875rem}.exam-card{padding:19px;gap:13px;flex-wrap:wrap}.exam-icon{width:48px;height:48px;border-radius:14px}.exam-card>.small{width:100%;text-align:right}.exam-card p{font-size:.8rem}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:5;background:#fffffff5;backdrop-filter:blur(16px);border-top:1px solid var(--border);justify-content:space-around;padding:9px 12px calc(10px + var(--safe-bottom));gap:6px}.bottom-nav button{flex:1;display:flex;flex-direction:column;gap:4px;align-items:center;background:transparent;color:#777c99;font-size:.75rem;padding:7px 5px;border-radius:14px;min-height:50px}.bottom-nav button>span{font-size:1.35rem;line-height:1}.bottom-nav button.active{color:var(--blue);background:#f0f3ff}footer{display:block;font-size:.75rem}footer span{display:block;text-align:left;margin-top:6px}.page-heading{font-size:2.25rem}.empty-card{padding:30px 24px}.empty-card h2{font-size:1.6rem}.lab-main{padding:23px 20px}.lab-top{gap:10px}.lab-top .small{font-size:.75rem}.speech-text{font-size:1.75rem}.action-row{flex-wrap:wrap}.primary{font-size:.875rem;padding:15px 20px}.lab-grid{margin-top:22px}dialog{padding:26px}}
@media(max-width:359px){main{padding-left:14px;padding-right:14px}.hero{padding:25px 19px}.hero-progress{display:none}.hero h1{font-size:2rem}.zone{padding:16px 12px}.unit-state{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.review-form{margin-top:24px;padding-top:24px;border-top:1px solid var(--line,#ddd);display:grid;gap:14px}
.review-form[hidden]{display:none}
.review-form h3,.review-form p{margin:0}
.review-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.review-form label{display:grid;gap:7px;font-size:.875rem;line-height:1.5}
.review-form input:not([type=checkbox]),.review-form textarea{width:100%;min-width:0;border:1px solid #d9dbe8;border-radius:12px;padding:12px;background:#fff;color:#00033d;font:inherit}
.review-form textarea{resize:vertical}
.review-form select{font-size:1rem}
.review-form .check-label{display:flex;align-items:flex-start;gap:10px}
.review-form input[type=checkbox]{width:20px;height:20px;flex-shrink:0;accent-color:#0033ff}
.validation-counts{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:.875rem}
.validation-counts dd{margin:0;font-weight:700}
.history-item button{margin-top:8px}
#refresh-validation{margin-top:18px}
@media(max-width:599px){.review-fields{grid-template-columns:1fr}.review-form input:not([type=checkbox]),.review-form textarea{font-size:1rem}}
@media(max-width:359px){.unit-state{display:block;font-size:.75rem}.unit-row{grid-template-columns:38px minmax(0,1fr)}.unit-state{grid-column:2;text-align:left}.unit-name{font-size:.875rem}}

/* In Telegram fullscreen, keep content below system bars and the transparent app controls. */
:root{
  --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),calc(var(--tg-safe-area-inset-bottom,0px) + var(--tg-content-safe-area-inset-bottom,0px)));
  --safe-left:max(env(safe-area-inset-left,0px),calc(var(--tg-safe-area-inset-left,0px) + var(--tg-content-safe-area-inset-left,0px)));
  --safe-right:max(env(safe-area-inset-right,0px),calc(var(--tg-safe-area-inset-right,0px) + var(--tg-content-safe-area-inset-right,0px)));
}
@media(max-width:760px){main{padding-left:calc(20px + var(--safe-left));padding-right:calc(20px + var(--safe-right))}.bottom-nav{padding-left:calc(12px + var(--safe-left));padding-right:calc(12px + var(--safe-right))}}
@media(max-width:359px){main{padding-left:calc(14px + var(--safe-left));padding-right:calc(14px + var(--safe-right))}}
html.telegram-mini-app,html.telegram-mini-app body{overscroll-behavior-y:contain}
