.theme-panel{margin-top:18px;padding:19px;background:rgba(28,28,30,.78);border-radius:22px;box-shadow:inset 0 0 0 .5px rgba(255,255,255,.1)}
.theme-panel .section-label{margin-bottom:4px}.theme-panel h2{font-size:19px;margin:0 0 16px}.theme-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px}.theme-picker button{display:grid;grid-template-columns:24px 1fr;grid-template-rows:auto auto;gap:1px 9px;text-align:left;padding:13px;border-radius:14px;background:var(--surface2);color:var(--secondary);box-shadow:inset 0 0 0 1px transparent}.theme-picker button.active{color:var(--label);box-shadow:inset 0 0 0 2px var(--blue)}.theme-picker span{font-size:15px;font-weight:700}.theme-picker small{font-size:12px}.theme-dot{grid-row:1/3;align-self:center;width:22px;height:22px;border-radius:50%;display:block}.apple-dot{background:linear-gradient(145deg,#0a84ff,#5e5ce6)}.retro-dot{border-radius:2px;background:linear-gradient(135deg,#0868bd 0 50%,#d7d2c3 50%)}

html[data-theme="retro"]{color-scheme:light;--blue:#075eaa;--green:#147d3d;--orange:#b85d00;--red:#a71919;--label:#101010;--secondary:#545454;--tertiary:#8a887f;--bg:#535b61;--surface:#d7d2c3;--surface2:#c7c3b8;--line:#77746c;--font:Tahoma,"MS Sans Serif",Arial,sans-serif;background:#535b61}
html[data-theme="retro"] body{background:repeating-linear-gradient(135deg,#515960 0 2px,#555e65 2px 4px);color:var(--label);font-family:var(--font);-webkit-font-smoothing:auto}
html[data-theme="retro"] .ambient{display:none}
html[data-theme="retro"] #app{max-width:880px;min-height:100dvh;background:#d7d2c3;border-left:2px solid #f3f0e8;border-right:2px solid #3f3e3a;padding-inline:18px}
html[data-theme="retro"] .bar{margin:0 -18px 20px;padding:calc(9px + env(safe-area-inset-top)) 12px 9px;align-items:center;background:linear-gradient(90deg,#07479e,#087bc8);color:#fff;border-bottom:2px solid #073f83;box-shadow:inset 0 1px #39a3e4}
html[data-theme="retro"] .bar:after{display:none}
html[data-theme="retro"] .bar p{color:#ddecff;font-size:11px;letter-spacing:.04em;margin-bottom:2px}
html[data-theme="retro"] .bar h1{font-family:Georgia,"Times New Roman",serif;font-size:25px;letter-spacing:-.3px}
html[data-theme="retro"] .circle{border-radius:2px;background:#d7d2c3;color:#000;border:1px solid #222;box-shadow:inset 1px 1px #fff,inset -1px -1px #777;backdrop-filter:none}
html[data-theme="retro"] .circle:active{transform:translate(1px,1px)}
html[data-theme="retro"] .symbol{color:#075eaa;font-weight:800}
html[data-theme="retro"] .hero,html[data-theme="retro"] .stat,html[data-theme="retro"] .lesson button,html[data-theme="retro"] .empty,html[data-theme="retro"] .grade-list,html[data-theme="retro"] .profile-card,html[data-theme="retro"] .group,html[data-theme="retro"] .theme-panel{background:#d7d2c3;border:1px solid #333;border-radius:0;box-shadow:inset 2px 2px #fff,inset -2px -2px #858178,3px 3px 0 #57544e;backdrop-filter:none}
html[data-theme="retro"] .hero{padding:36px 20px 20px;border-top:27px solid #0868bd;min-height:185px;overflow:visible}
html[data-theme="retro"] .hero:before{content:"B&D BETTER · СЕГОДНЯ";position:absolute;top:-23px;left:8px;color:#fff;font-weight:700;font-size:12px;letter-spacing:.03em}
html[data-theme="retro"] .hero:after{content:"×";right:5px;top:-23px;width:17px;height:17px;border-radius:0;background:#d7d2c3;color:#111;display:grid;place-items:center;border:1px solid #222;font:bold 13px serif}
html[data-theme="retro"] .hero h2,html[data-theme="retro"] .section-head h2,html[data-theme="retro"] .profile-card h2,html[data-theme="retro"] .theme-panel h2{font-family:Georgia,"Times New Roman",serif}
html[data-theme="retro"] .capsule{border-radius:0;background:#c7c3b8;color:#242424;border:1px solid #777;box-shadow:inset 1px 1px #fff;padding:7px 9px}
html[data-theme="retro"] .capsule.blue{color:#fff;background:#075eaa;border-color:#063f73}
html[data-theme="retro"] .stats{gap:9px}
html[data-theme="retro"] .stat strong{font-family:Georgia,"Times New Roman",serif}
html[data-theme="retro"] .day{border-radius:0;background:#c9c5ba;color:#111;border:1px solid #555;box-shadow:inset 1px 1px #fff,inset -1px -1px #777}
html[data-theme="retro"] .day.active{background:#075eaa;color:#fff;transform:none;box-shadow:inset 2px 2px #064b87}
html[data-theme="retro"] .day.active span{color:#ddecff}
html[data-theme="retro"] .day.free:not(.active){background:#c4d8c3;color:#134f25;box-shadow:inset 1px 1px #fff,inset -1px -1px #668367}
html[data-theme="retro"] .day.assessment:not(.active){background:#ead4aa;color:#6d3600;box-shadow:inset 1px 1px #fff,inset -1px -1px #9e7943}
html[data-theme="retro"] .lesson button{padding:15px 16px;min-height:92px}
html[data-theme="retro"] .lesson button:before{top:0;bottom:0;width:7px;border-radius:0;background:#0868bd}
html[data-theme="retro"] .time,html[data-theme="retro"] .lesson h3,html[data-theme="retro"] .grade h3{font-family:Georgia,"Times New Roman",serif}
html[data-theme="retro"] .break i,html[data-theme="retro"] .grade{border-color:#8a887f}
html[data-theme="retro"] .break strong{color:#333}
html[data-theme="retro"] .tabbar{padding:0;bottom:0;background:#d7d2c3;border-top:2px solid #fff;box-shadow:0 -2px #4b4944}
html[data-theme="retro"] .tabglass{max-width:880px;padding:0;border-radius:0;background:#d7d2c3;box-shadow:none;backdrop-filter:none}
html[data-theme="retro"] .tabglass button{height:64px;border-radius:0;color:#353535;border-right:1px solid #817e76;gap:4px}
html[data-theme="retro"] .tabglass button:last-child{border-right:0}
html[data-theme="retro"] .tabglass button.active{color:#fff;background:linear-gradient(#087bc8,#07549d);box-shadow:inset 1px 1px #39a3e4}
html[data-theme="retro"] .tabglass b{font-size:11px}
html[data-theme="retro"] .segmented,html[data-theme="retro"] .course-row button{border-radius:0;background:#c7c3b8;border:1px solid #777;box-shadow:inset 1px 1px #fff}
html[data-theme="retro"] .segmented button,html[data-theme="retro"] .course-row button{border-radius:0}
html[data-theme="retro"] .segmented button.active,html[data-theme="retro"] .course-row button.active{background:#075eaa;color:#fff;box-shadow:inset 1px 1px #0b3f70}
html[data-theme="retro"] .grade-summary{border-radius:0;background:#0868bd;color:#fff;border:1px solid #053f79;box-shadow:inset 2px 2px #2f9cda,inset -2px -2px #04386c}
html[data-theme="retro"] .grade-summary span{color:#e5f2ff}
html[data-theme="retro"] .grade b{border-radius:0;background:#c4d8c3;color:#164f27;border:1px solid #668367}
html[data-theme="retro"] .avatar{border-radius:0;background:#075eaa;border:2px solid #fff;outline:1px solid #333;box-shadow:4px 4px 0 #777;font-family:Georgia,"Times New Roman",serif}
html[data-theme="retro"] .theme-picker button{border-radius:0;background:#c7c3b8;border:1px solid #444;box-shadow:inset 1px 1px #fff,inset -1px -1px #777}
html[data-theme="retro"] .theme-picker button.active{background:#075eaa;color:#fff;box-shadow:inset 2px 2px #06447e}
html[data-theme="retro"] .destructive,html[data-theme="retro"] .primary{border-radius:0;border:1px solid #222;box-shadow:inset 2px 2px rgba(255,255,255,.65),inset -2px -2px rgba(0,0,0,.35)}
html[data-theme="retro"] .destructive{background:#d7d2c3;color:#8f1111}
html[data-theme="retro"] .login .appmark{border-radius:0;background:#075eaa;border:2px solid #fff;outline:1px solid #222;box-shadow:6px 6px 0 #555}
html[data-theme="retro"] .login h2{font-family:Georgia,"Times New Roman",serif}
html[data-theme="retro"] .field{border-radius:0;background:#fff;border:2px inset #aaa}
html[data-theme="retro"] .field input{color:#111}
html[data-theme="retro"] dialog{border-radius:0;background:#d7d2c3;color:#111;border:2px solid #222;box-shadow:inset 2px 2px #fff,inset -2px -2px #777;backdrop-filter:none}
html[data-theme="retro"] .grab{border-radius:0;background:#0868bd;width:100%;height:22px;margin:0 0 18px}
html[data-theme="retro"] .sheet-action{border-radius:0;background:#c7c3b8;color:#075eaa;border:1px solid #333;box-shadow:inset 1px 1px #fff,inset -1px -1px #777}
html[data-theme="retro"] #toast,html[data-theme="retro"] #network-status,html[data-theme="retro"] #pull-indicator{border-radius:0;background:#075eaa;color:#fff;border:1px solid #fff;box-shadow:2px 2px 0 #333;backdrop-filter:none}
html[data-theme="retro"] .updated,html[data-theme="retro"] .section-label,html[data-theme="retro"] .hero .overline,html[data-theme="retro"] .stat span,html[data-theme="retro"] .profile-card p{color:#56534d}
@media(max-width:520px){html[data-theme="retro"] #app{padding-inline:10px}html[data-theme="retro"] .bar{margin-inline:-10px}html[data-theme="retro"] .hero{padding-inline:15px}html[data-theme="retro"] .tabbar.compact .tabglass{max-width:none;padding:0;border-radius:0}html[data-theme="retro"] .theme-picker{gap:7px}}

/* Refined 528 palette: flat light panels, square geometry. */
html[data-theme="retro"]{--blue:#1A65C0;--green:#1A65C0;--orange:#00007B;--red:#00007B;--label:#00007B;--secondary:#00007B;--tertiary:#C4B8AA;--bg:#00007B;--surface:#D6CFC4;--surface2:#C4B8AA;--line:#C4B8AA;background:#00007B}
html[data-theme="retro"] body{background:#00007B;color:#00007B}
html[data-theme="retro"] #app{background:#D6CFC4;border:0}
html[data-theme="retro"] .bar{background:linear-gradient(90deg,#00007B,#1A65C0);border:0;box-shadow:none}
html[data-theme="retro"] .bar p{color:#D6CFC4}
html[data-theme="retro"] .circle{border-radius:0;background:#D6CFC4;color:#00007B;border:0;box-shadow:inset 2px 2px #fff,inset -2px -2px #C4B8AA}
html[data-theme="retro"] .symbol{color:#00007B}
html[data-theme="retro"] .hero,html[data-theme="retro"] .stat,html[data-theme="retro"] .lesson button,html[data-theme="retro"] .empty,html[data-theme="retro"] .grade-list,html[data-theme="retro"] .profile-card,html[data-theme="retro"] .group,html[data-theme="retro"] .theme-panel{background:#D6CFC4;border:0;border-radius:0;box-shadow:inset 2px 2px #fff,inset -2px -2px #C4B8AA}
html[data-theme="retro"] .hero{border-top:27px solid #1A65C0}
html[data-theme="retro"] .hero:after{background:#D6CFC4;color:#00007B;border:0}
html[data-theme="retro"] .capsule{border-radius:0;background:#C4B8AA;color:#00007B;border:0;box-shadow:inset 1px 1px #D6CFC4}
html[data-theme="retro"] .capsule.blue{color:#fff;background:#1A65C0;border:0}
html[data-theme="retro"] .day{border-radius:0;background:#C4B8AA;color:#00007B;border:0;box-shadow:inset 1px 1px #D6CFC4}
html[data-theme="retro"] .day.active{background:#1A65C0;color:#fff;box-shadow:none}
html[data-theme="retro"] .day.free:not(.active){background:#D6CFC4;color:#00007B;box-shadow:inset 4px 0 #1A65C0}
html[data-theme="retro"] .day.assessment:not(.active){background:#C4B8AA;color:#00007B;box-shadow:inset 0 -4px #00007B}
html[data-theme="retro"] .day-status,html[data-theme="retro"] .now-dot{border-radius:0}
html[data-theme="retro"] .day.free .day-status{color:#1A65C0;border-color:#1A65C0}
html[data-theme="retro"] .day.assessment .day-status{color:#fff;background:#00007B}
html[data-theme="retro"] .lesson button:before{border-radius:0;background:#1A65C0}
html[data-theme="retro"] .tabbar,html[data-theme="retro"] .tabglass{background:#D6CFC4;border:0;box-shadow:none}
html[data-theme="retro"] .tabglass button{border-radius:0;color:#00007B;border-color:#C4B8AA}
html[data-theme="retro"] .tabglass button.active{color:#fff;background:linear-gradient(#1A65C0,#00007B);box-shadow:none}
html[data-theme="retro"] .segmented,html[data-theme="retro"] .course-row button{border-radius:0;background:#C4B8AA;border:0;box-shadow:inset 1px 1px #D6CFC4}
html[data-theme="retro"] .segmented button,html[data-theme="retro"] .course-row button{border-radius:0}
html[data-theme="retro"] .segmented button.active,html[data-theme="retro"] .course-row button.active{background:#00007B;color:#fff;box-shadow:none}
html[data-theme="retro"] .grade-summary{border-radius:0;background:#1A65C0;color:#fff;border:0;box-shadow:none}
html[data-theme="retro"] .grade-summary span{color:#D6CFC4}
html[data-theme="retro"] .grade b{border-radius:0;background:#C4B8AA;color:#00007B;border:0}
html[data-theme="retro"] .avatar{border-radius:0;background:#00007B;border:0;outline:0;box-shadow:5px 5px #C4B8AA}
html[data-theme="retro"] .theme-picker button{border-radius:0;background:#C4B8AA;border:0;box-shadow:inset 1px 1px #D6CFC4}
html[data-theme="retro"] .theme-picker button.active{background:#00007B;color:#fff;box-shadow:none}
html[data-theme="retro"] .retro-dot{border-radius:0;background:linear-gradient(135deg,#00007B 0 50%,#D6CFC4 50%)}
html[data-theme="retro"] .destructive,html[data-theme="retro"] .primary{border-radius:0;border:0;box-shadow:inset 2px 2px #D6CFC4,inset -2px -2px #C4B8AA}
html[data-theme="retro"] .destructive{background:#D6CFC4;color:#00007B}
html[data-theme="retro"] .login .appmark{border-radius:0;background:#00007B;border:0;outline:0;box-shadow:6px 6px #C4B8AA}
html[data-theme="retro"] .field{border-radius:0;background:#D6CFC4;border:0;box-shadow:inset 2px 2px #C4B8AA}
html[data-theme="retro"] dialog{border-radius:0;background:#D6CFC4;color:#00007B;border:0;box-shadow:inset 2px 2px #fff,inset -2px -2px #C4B8AA}
html[data-theme="retro"] .grab{border-radius:0;background:#1A65C0}
html[data-theme="retro"] .sheet-action{border-radius:0;background:#C4B8AA;color:#00007B;border:0;box-shadow:inset 1px 1px #D6CFC4}
html[data-theme="retro"] #toast,html[data-theme="retro"] #network-status,html[data-theme="retro"] #pull-indicator{border-radius:0;background:#00007B;color:#fff;border:0;box-shadow:none}
html[data-theme="retro"] .updated,html[data-theme="retro"] .section-label,html[data-theme="retro"] .hero .overline,html[data-theme="retro"] .stat span,html[data-theme="retro"] .profile-card p{color:#00007B}

/* Final 528 geometry and typography pass. */
html[data-theme="retro"],html[data-theme="retro"] body,html[data-theme="retro"] body *{font-family:Tahoma,"MS Sans Serif",Arial,sans-serif!important}
html[data-theme="retro"] .hero,html[data-theme="retro"] .stat,html[data-theme="retro"] .lesson button,html[data-theme="retro"] .empty,html[data-theme="retro"] .grade-list,html[data-theme="retro"] .profile-card,html[data-theme="retro"] .group,html[data-theme="retro"] .theme-panel{border:1px solid #00007B;box-shadow:inset 2px 2px #D6CFC4,inset -2px -2px #C4B8AA}
html[data-theme="retro"] .hero{border-top:27px solid #1A65C0}
html[data-theme="retro"] .bar{border-bottom:2px solid #00007B}
html[data-theme="retro"] .circle,html[data-theme="retro"] .capsule,html[data-theme="retro"] .day,html[data-theme="retro"] .course-row button,html[data-theme="retro"] .segmented,html[data-theme="retro"] .theme-picker button,html[data-theme="retro"] .destructive,html[data-theme="retro"] .primary,html[data-theme="retro"] .field,html[data-theme="retro"] .sheet-action{border:1px solid #00007B}
html[data-theme="retro"] .week .day{border-radius:0!important;clip-path:none}
html[data-theme="retro"] .week .day.active{border:1px solid #00007B;box-shadow:inset 2px 2px #1A65C0,inset -2px -2px #00007B}
html[data-theme="retro"] .week .day.free:not(.active){border:1px solid #1A65C0;box-shadow:inset 4px 0 #1A65C0}
html[data-theme="retro"] .week .day.assessment:not(.active){border:1px solid #00007B;box-shadow:inset 0 -4px #00007B}
html[data-theme="retro"] .day-status,html[data-theme="retro"] .schedule-legend i,html[data-theme="retro"] .now-dot,html[data-theme="retro"] .hero-progress,html[data-theme="retro"] .hero-progress i,html[data-theme="retro"] .theme-dot{border-radius:0!important}
html[data-theme="retro"] .tabbar{border-top:2px solid #00007B}
html[data-theme="retro"] .tabglass button{border-right:1px solid #00007B}
html[data-theme="retro"] .tabglass button:last-child{border-right:0}
html[data-theme="retro"] .grade-summary{border:1px solid #00007B;box-shadow:inset 2px 2px #1A65C0,inset -2px -2px #00007B}
html[data-theme="retro"] .grade b,html[data-theme="retro"] dialog{border:1px solid #00007B}
html[data-theme="retro"] .avatar,html[data-theme="retro"] .login .appmark{border:2px solid #00007B}
html[data-theme="retro"] .retro-dot{border:1px solid #00007B}
html[data-theme="retro"] .section-head h2,html[data-theme="retro"] .hero h2,html[data-theme="retro"] .profile-card h2,html[data-theme="retro"] .theme-panel h2,html[data-theme="retro"] .time,html[data-theme="retro"] .lesson h3,html[data-theme="retro"] .grade h3,html[data-theme="retro"] .stat strong,html[data-theme="retro"] .login h2{letter-spacing:0}

html[data-theme="retro"] .hero-progress{left:16px;right:16px;bottom:12px;height:6px;background:#C4B8AA;border:1px solid #00007B;border-radius:0;overflow:hidden}
html[data-theme="retro"] .hero-progress i{height:100%;background:#1A65C0;border-radius:0}
html[data-theme="retro"] .hero:has(.hero-progress){padding-bottom:34px}

html[data-theme="retro"] .login{position:relative;max-width:430px;margin:6vh auto 0;padding:52px 22px 24px;background:#D6CFC4;border:1px solid #00007B;box-shadow:inset 2px 2px #D6CFC4,inset -2px -2px #C4B8AA}
html[data-theme="retro"] .login:before{content:"B&D BETTER · ВХОД";position:absolute;top:4px;left:4px;right:4px;height:30px;padding:0 9px;display:flex;align-items:center;background:linear-gradient(90deg,#00007B,#1A65C0);color:#D6CFC4;font-size:12px;font-weight:700;letter-spacing:.03em}
html[data-theme="retro"] .login:after{content:"×";position:absolute;top:10px;right:10px;width:18px;height:18px;display:grid;place-items:center;background:#D6CFC4;color:#00007B;box-shadow:inset 1px 1px #D6CFC4,inset -1px -1px #C4B8AA;font-weight:700}
html[data-theme="retro"] .login .appmark{width:74px;height:74px;margin:0 0 24px;background:#00007B;color:#D6CFC4;box-shadow:5px 5px #C4B8AA}
html[data-theme="retro"] .login h2{font-size:28px;color:#00007B}
html[data-theme="retro"] .login>p{color:#00007B;line-height:1.45}
html[data-theme="retro"] .login form{margin-top:22px;padding:14px;background:#C4B8AA;border:1px solid #00007B;box-shadow:inset 2px 2px #D6CFC4}
html[data-theme="retro"] .login .field{margin:8px 0;background:#D6CFC4;border:1px solid #00007B;box-shadow:inset 2px 2px #C4B8AA}
html[data-theme="retro"] .login .field input{color:#00007B;border-radius:0}
html[data-theme="retro"] .login .field input::placeholder{color:#00007B;opacity:.62}
html[data-theme="retro"] .login .primary{margin-top:12px;background:#1A65C0;color:#D6CFC4;border:1px solid #00007B;box-shadow:inset 2px 2px #1A65C0,inset -2px -2px #00007B}
html[data-theme="retro"] .login .primary:active{transform:translate(1px,1px);filter:none}
html[data-theme="retro"] .login .privacy{color:#00007B;opacity:.78}
html[data-theme="retro"] .login .error{border-radius:0;background:#C4B8AA;color:#00007B;border:1px solid #00007B}
@media(max-width:520px){html[data-theme="retro"] .login{margin-top:3vh;padding:48px 16px 20px}}
