:root{--paper:#faf7f1;--white:#fffdf8;--ink:#30251f;--muted:#77685b;--line:#dfd3c5;--lime:#ecd0b1;--green:#984d37;--r:16px}
button,.btn{background:var(--green);border-radius:8px}button:hover,.btn:hover{filter:none;background:#7e3c2a;color:#fff}button.lime,.btn.lime{background:var(--green);color:#fff}.btn.light:hover,button.light:hover,.btn.ghost:hover,button.ghost:hover{background:#efdfcd;color:var(--ink)}
input,select,textarea{border-color:var(--line);background:var(--white);border-radius:8px}input:autofill{box-shadow:0 0 0 1000px var(--white) inset;color:var(--ink)}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--white) inset;-webkit-text-fill-color:var(--ink)}:focus-visible{outline-color:var(--green)}
.logo b{background:#e9c8aa;color:#683c2b}.auth-brand{background:#efe0cd;color:var(--ink);border-right:1px solid var(--line)}.auth-brand .logo{color:var(--ink)}.auth-brand h1{font-size:clamp(40px,4.2vw,58px);letter-spacing:-2px}.auth-brand h1 em{color:var(--green);font-family:Georgia,serif;font-weight:400}.auth-form{max-width:520px}.auth-form .notice{font-size:13px}.auth-form .back{color:var(--green)}
.sidebar{background:var(--white)}.nav a{color:var(--muted)}.nav a:hover,.nav a.active{background:#efdfcd;color:#683c2b}.avatar{background:#ecd0b1;color:#683c2b}.welcome p{color:#f6e8dc}.welcome:after{color:#f4dfc326}.welcome .tag{color:#fff7eb}.tabs{background:#eee2d2}.tabs button:hover{color:var(--ink);background:#f4eadd}.tag{background:#f0e7dc}.taskcard.locked{background:#f4eee5}.answerbox{background:#f5ece0;border-color:#dfd3c5}.timer{background:#efdfcd}.bar{background:#eee2d2}.bar span{background:#b37555}.video-cover{background:#eee0cd}.video-cover .eyebrow{color:#82624b}.player{background:#30251f}.notice{background:#f0e5d6;border:1px solid #e5d5c0;color:var(--ink)}.message.staff{background:#f1e4d1}.dialog-backdrop{background:#30251f88}
.public .hero-description p{font-size:inherit;line-height:inherit;color:var(--muted);margin:0 0 14px}.public .hero-description .hero-guarantee{color:var(--ink)}
.hero-gallery{--gallery-radius:16px;min-width:0}.gallery-stage{position:relative;aspect-ratio:1;border-radius:var(--gallery-radius);overflow:hidden;background:#f0dcc4;touch-action:pan-y pinch-zoom}.gallery-slide{height:100%;width:100%}.gallery-slide[hidden]{display:none}.gallery-card{width:100%;height:100%;display:block;object-fit:contain;user-select:none}.hero-gallery .teacher-portrait{width:100%;height:100%;aspect-ratio:auto;border-radius:var(--gallery-radius)}.hero-gallery .teacher-portrait>img{object-position:50% 40%;user-select:none}.hero-gallery .portrait-note,.hero-gallery .teacher-portrait figcaption{border-radius:var(--gallery-radius)}
.gallery-controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:14px;align-items:center;margin-top:14px}.gallery-controls button{width:44px;height:44px;min-height:44px;border:1px solid #d2bba4;border-radius:var(--gallery-radius);background:var(--white);color:var(--green);font-size:22px;padding:0}.gallery-controls button:hover{background:#efdfcd}.gallery-caption{text-align:center;font-size:12px}.gallery-caption strong{display:block;line-height:1.4;font-weight:600}.gallery-caption span{display:block;color:var(--muted);font-size:11px;margin-top:4px;font-variant-numeric:tabular-nums}.gallery-original{display:block;text-align:center;font-size:11px;color:var(--muted);margin-top:12px;text-decoration:underline;text-underline-offset:3px}
.public .material-pages{aspect-ratio:1.1;min-height:0;border-radius:16px}.public .material-pages img{width:38%;height:auto;object-fit:contain;transform:none;filter:drop-shadow(0 2px 3px #49352315)}.sheet-vectors{left:58%;top:6%;z-index:1}.sheet-trigonometry{left:24%;top:12%;z-index:2}.sheet-geometry{left:5%;top:26%;z-index:3}.sheet-hyperbola{left:50%;top:32%;z-index:4}.sheet-derivative{left:20%;top:37%;z-index:5}
.telegram-entry{margin:22px 0}.telegram-entry>button{width:100%;gap:12px;min-height:50px}.telegram-entry svg{width:22px;height:22px;flex:none}.telegram-caption{font-size:11px;color:var(--muted);line-height:1.6;margin:10px 0 0}.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:24px 0}.auth-divider:before,.auth-divider:after{content:'';height:1px;background:var(--line);flex:1}.telegram-error:empty{display:none}.telegram-error{margin-top:12px;font-size:13px;line-height:1.6}
.bank-topics{display:grid;gap:14px}.bank-topic{border:1px solid var(--line);border-radius:16px;background:var(--white);overflow:hidden}.bank-topic>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:16px;padding:23px 25px}.bank-topic>summary::-webkit-details-marker{display:none}.bank-topic>summary:after{content:'+';font-size:25px;color:var(--green);margin-left:auto}.bank-topic[open]>summary:after{content:'−'}.bank-topic>summary strong{font-size:17px;line-height:1.4}.bank-topic>summary span{color:var(--muted);font-size:12px;white-space:nowrap}.topic-prototypes{padding:0 24px 24px;display:grid;gap:12px}.topic-prototypes .grid{gap:12px}.prototype-item{border:1px solid var(--line);border-radius:10px;padding:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.prototype-item p{margin:6px 0 0;font-size:11px;color:var(--muted)}.prototype-item .btn{padding:9px 12px;min-height:40px;font-size:12px}.topic-more{justify-self:start}
@media(max-width:760px){.auth-brand{border-right:0;border-bottom:1px solid var(--line);padding:22px 24px}.auth-form{padding:30px 24px}.hero-gallery .portrait-note{font-size:10px;padding:10px 12px;top:13px;right:12px}.hero-gallery .teacher-portrait figcaption{padding:12px 14px;left:12px;right:12px;bottom:12px}.hero-gallery .teacher-portrait figcaption strong{font-size:18px}.bank-topic>summary{padding:18px;gap:10px;flex-wrap:wrap}.bank-topic>summary strong{font-size:15px;flex-basis:100%}.bank-topic>summary:after{font-size:20px}.topic-prototypes{padding:0 16px 16px}.prototype-item{padding:13px}}

.task-timer{position:fixed;top:16px;right:24px;z-index:9;border:1px solid #d5b99d;background:#fff9ef;box-shadow:0 3px 15px #30251f12;font-weight:600;min-width:90px;text-align:center}.shell:has(.task-timer) .appbar{padding-right:120px}.prototype-progress{display:grid;gap:14px}.progress-labels,.prototype-progress-row{display:grid;grid-template-columns:1.1fr repeat(3,minmax(0,1fr));gap:8px;align-items:center;font-size:12px;text-align:right}.progress-labels{font-size:10px;color:var(--muted)}.progress-labels>:first-child,.prototype-progress-row>strong{text-align:left}.prototype-progress-row>strong{font-weight:500}.prototype-progress-row>.bar{grid-column:1/-1}.prototype-progress-row>span{font-variant-numeric:tabular-nums}.prototype-progress-row>span:nth-child(2){color:var(--green);font-weight:700}@media(max-width:760px){.task-timer{top:10px;right:12px;padding:10px 12px}.shell:has(.task-timer) .appbar{padding-right:110px}.shell:has(.task-timer) .appbar .row{flex-wrap:wrap;gap:8px}}

.dashboard-stats{grid-template-columns:repeat(5,minmax(0,1fr))}.balance-card strong{font-size:25px}.balance-card:hover{background:#f4e8d7}.welcome.fact-card h2{font-size:25px;line-height:1.4;max-width:850px;font-weight:500;min-height:70px}.fact-card:after{opacity:.3}.fact-card .row,.fact-card h2{position:relative;z-index:1}.assigned-theory{margin-bottom:22px}.assigned-theory h2{margin-bottom:12px}.theory-item{display:flex;justify-content:space-between;align-items:center;gap:18px;border-top:1px solid var(--line);padding:18px 0}.theory-item p{font-size:12px;color:var(--muted);margin:7px 0 0}.theory-item:last-child{padding-bottom:0}.theory-deadline{font-size:12px;color:var(--green);line-height:1.5}.theory-item:hover strong{color:var(--green)}@media(max-width:1100px){.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.balance-card{grid-column:1/-1}}@media(max-width:760px){.welcome.fact-card{padding:25px}.welcome.fact-card h2{font-size:21px;min-height:0}.theory-item{align-items:start;flex-wrap:wrap}.assigned-theory{padding:22px}.stats .stat{min-width:0}.stats .stat strong{font-size:26px}.balance-card strong{font-size:26px}}
@media(max-width:760px){.shell:has(.task-timer) .appbar{height:auto;min-height:100px;padding-top:12px;padding-bottom:12px}}
.hero-gallery .teacher-portrait figcaption span{font-size:12px;line-height:1.5}@media(max-width:760px){.hero-gallery .teacher-portrait figcaption span{font-size:11px}}
