@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
:root{font-family:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,'SF Pro Display',sans-serif;color:#1e293b;background:#f4f6fa;font-synthesis:none;text-rendering:optimizeLegibility;--ink:#1e293b;--title:#0f172a;--muted:#64748b;--line:#e2e8f0;--surface:#fff;--surface-soft:#f8fafc;--accent:#d9822b;--accent-dark:#b8651b;--accent-soft:#fff2df;--blue:#506e9c;--good:#147d58;--good-soft:#e7f6ef;--bad:#b7443c;--bad-soft:#fff0ed;--shadow:0 10px 25px -3px rgba(15,23,42,.06),0 4px 10px -2px rgba(15,23,42,.03);--radius-xl:24px;--radius-lg:18px;--radius-md:14px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;width:100%;overflow-x:hidden}body{min-height:100dvh;background:radial-gradient(ellipse at 4% 0%,#f4dfc733 0,transparent 32%),linear-gradient(160deg,#f4f6fa,#f0f2f6);color:var(--ink)}button,input,textarea{font:inherit}button{color:inherit;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.55;cursor:wait}svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}.app-shell{width:min(calc(100% - 36px),1420px);min-height:100dvh;margin:auto;padding:env(safe-area-inset-top) 0 calc(94px + env(safe-area-inset-bottom))}.topbar{height:74px;display:flex;align-items:center;gap:13px}.brand-mark{width:43px;height:43px;flex:none;overflow:hidden;border-radius:15px;background:linear-gradient(145deg,#e59a43,#c96c24);box-shadow:0 7px 18px #d9822b42;display:grid;place-items:center}.brand-mark img{display:block;width:100%;height:100%;object-fit:cover}.brand-copy{display:grid;gap:2px;flex:1;min-width:0}.brand-copy strong{color:var(--title);font-size:15px;letter-spacing:-.3px}.brand-copy span{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.icon-button{width:40px;height:40px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow);color:var(--accent-dark);display:grid;place-items:center}.icon-button svg{width:19px;height:19px}.welcome-card{position:relative;overflow:hidden;padding:27px 27px 25px;border:1px solid #f0dfcb;border-radius:var(--radius-xl);background:radial-gradient(115% 150% at 3% -40%,#f4bd762c,transparent 54%),radial-gradient(100% 130% at 100% 140%,#d9822b22,transparent 58%),#fff;box-shadow:var(--shadow)}.welcome-card:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;right:-65px;top:-105px;border:1px solid #d9822b33;box-shadow:0 0 0 22px #d9822b0a,0 0 0 45px #d9822b08}.eyebrow{font-size:10px;letter-spacing:1.1px;font-weight:800;color:var(--accent-dark)}.welcome-card h1{font-family:'Instrument Serif',Georgia,serif;font-size:38px;font-weight:400;letter-spacing:-.4px;color:var(--title);margin:9px 0 7px}.welcome-card p{margin:0;max-width:540px;color:#596474;font-size:13px;line-height:1.65}.section-block{margin-top:25px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 12px}.section-heading h2{margin:0;color:var(--title);font-size:16px;letter-spacing:-.35px}.text-button{padding:7px 0;background:none;color:var(--accent-dark);font-size:12px;font-weight:800}.lesson-card,.stack-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:15px 16px;box-shadow:var(--shadow)}.lesson-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.lesson-name{color:var(--title);font-size:15px;font-weight:800;line-height:1.4}.lesson-time{white-space:nowrap;padding:7px 9px;border-radius:10px;background:var(--accent-soft);color:var(--accent-dark);font-size:11px;font-weight:800}.lesson-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;color:var(--muted);font-size:11px}.lesson-meta span{display:inline-flex;align-items:center;gap:5px}.lesson-meta svg{width:14px;height:14px}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:15px}.quick-card{display:grid;grid-template-columns:38px 1fr;grid-template-rows:38px auto auto;column-gap:10px;align-items:center;min-height:112px;padding:14px;border:1px solid var(--line);border-radius:var(--radius-lg);background:#fff;box-shadow:var(--shadow);text-align:left;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.quick-card:hover,.menu-row:hover{transform:translateY(-1px);border-color:#e9c69e}.quick-card:active{transform:scale(.985)}.quick-card.accent{background:linear-gradient(135deg,#fff7ec,#fff);border-color:#efdbc2}.quick-icon{grid-row:1/4;display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:#f7f2eb;color:var(--accent-dark)}.quick-card strong{align-self:end;font-size:13px;color:var(--title)}.quick-card small{align-self:start;margin-top:3px;color:var(--muted);font-size:10px}.stack-list{display:grid;gap:9px}.stack-card{padding:13px 15px}.stack-title{color:var(--title);font-size:13px;font-weight:700;line-height:1.5}.stack-meta{margin-top:5px;color:var(--muted);font-size:11px;line-height:1.5}.empty-state{padding:20px;text-align:center;color:var(--muted);font-size:12px;line-height:1.55;background:#ffffffbb;border:1px dashed #dbe1e9;border-radius:16px}.bottom-nav{position:fixed;z-index:5;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,680px);display:flex;justify-content:space-around;padding:9px 12px calc(9px + env(safe-area-inset-bottom));background:#ffffffee;backdrop-filter:blur(18px);border-top:1px solid var(--line);box-shadow:0 -5px 22px #1e293b0a}.nav-item{display:grid;justify-items:center;align-content:center;gap:3px;min-width:64px;padding:6px 10px;border-radius:12px;background:none;color:#8892a0;font-size:9px;font-weight:700}.nav-item span{display:grid;place-items:center;width:23px;height:23px}.nav-item span svg{width:19px;height:19px}.nav-item.active{color:var(--accent-dark);background:#fff3e3}.page-title{margin:10px 0 4px;color:var(--title);font-family:'Instrument Serif',Georgia,serif;font-size:34px;font-weight:400;letter-spacing:-.3px;line-height:1.1}.page-subtitle{margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.6}.day-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px;padding:8px 10px;border:1px solid var(--line);border-radius:15px;background:#fff}.day-switch button{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#f7f2eb;color:var(--accent-dark)}.day-label{text-align:center;color:var(--title);font-size:13px;font-weight:800}.day-label small{display:block;margin-top:3px;color:var(--muted);font-size:10px;font-weight:500}.schedule-day{display:grid;gap:9px}.pair-number{margin-right:6px;color:var(--accent-dark);font-size:10px;font-weight:800}.menu-list{display:grid;gap:9px}.menu-row{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow);text-align:left;transition:transform .18s ease,border-color .18s ease}.menu-row .quick-icon{flex:none}.menu-row strong{display:block;color:var(--title);font-size:13px}.menu-row small{display:block;margin-top:3px;color:var(--muted);font-size:10px;line-height:1.45}.group-tabs{display:flex;gap:5px;margin:3px 0 16px;padding:4px;border:1px solid var(--line);border-radius:14px;background:#eef1f4}.group-tab{flex:1;padding:10px 7px;border-radius:10px;background:transparent;color:var(--muted);font-size:11px;font-weight:800}.group-tab.active{background:#fff;color:var(--accent-dark);box-shadow:0 2px 8px #1e293b12}.announcement-text{margin-top:10px;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.form-label{display:grid;gap:7px;margin-top:14px;color:var(--muted);font-size:12px;font-weight:700}.form-label input,.form-label textarea{width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font:inherit;font-size:14px;resize:vertical}.modal-backdrop{position:fixed;z-index:10;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:14px;background:#12182078;backdrop-filter:blur(5px)}.modal{width:min(100%,590px);max-height:min(88dvh,820px);overflow:auto;padding:23px 21px calc(22px + env(safe-area-inset-bottom));border:1px solid #ffffffb8;border-radius:25px 25px 18px 18px;background:#fff;box-shadow:0 24px 80px #11182044;animation:rise .2s ease}.modal h2{margin:0 0 8px;color:var(--title);font-family:'Instrument Serif',Georgia,serif;font-size:28px;font-weight:400}.modal p{color:var(--muted);font-size:13px;line-height:1.65}.modal-actions{display:flex;gap:9px;margin-top:17px}.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:11px 15px;border-radius:13px;font-size:12px;font-weight:800}.primary-button{background:var(--accent);color:#fff;box-shadow:0 5px 13px #d9822b36}.primary-button:hover{background:var(--accent-dark)}.secondary-button{background:#f1f3f6;color:var(--ink)}.danger-button{background:var(--bad);color:#fff}.skeleton{height:75px;background:linear-gradient(90deg,#fff,#f5f2ed,#fff);background-size:200% 100%;animation:shine 1.2s infinite}@keyframes rise{from{transform:translateY(18px);opacity:.6}to{transform:none;opacity:1}}@keyframes shine{to{background-position:-200% 0}}
.attendance-panel{margin-top:22px;padding:16px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow)}.attendance-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.attendance-panel-head h2{margin:0;color:var(--title);font-size:16px}.attendance-panel-head p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.5}.attendance-tools{display:flex;align-items:center;gap:8px}.attendance-day{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.attendance-day button{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#f7f2eb;color:var(--accent-dark)}.attendance-date{text-align:center;color:var(--title);font-size:13px;font-weight:800}.attendance-date small{display:block;margin-top:3px;color:var(--muted);font-size:10px;font-weight:500}.attendance-pairs{display:flex;gap:8px;overflow:auto;padding:2px 1px 12px;scrollbar-width:thin}.attendance-pair{flex:0 0 min(245px,78vw);display:grid;gap:5px;min-height:84px;padding:12px;border:1px solid var(--line);border-radius:15px;background:#fbfbfc;text-align:left}.attendance-pair.active{border-color:#e5b77e;background:#fff7ec;box-shadow:0 0 0 2px #d9822b14}.attendance-pair strong{overflow:hidden;color:var(--title);font-size:12px;line-height:1.4;text-overflow:ellipsis}.attendance-pair span{color:var(--muted);font-size:10px}.attendance-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:14px;overscroll-behavior:contain}.attendance-table{width:100%;min-width:560px;border-collapse:separate;border-spacing:0;background:#fff}.attendance-table th,.attendance-table td{height:48px;padding:7px 9px;border-right:1px solid #edf0f3;border-bottom:1px solid #edf0f3;text-align:center}.attendance-table th{position:sticky;top:0;z-index:2;background:#f8f8f7;color:#66707d;font-size:10px;font-weight:800}.attendance-table th:first-child,.attendance-table td:first-child{position:sticky;left:0;z-index:3;width:210px;max-width:210px;text-align:left;background:#fff}.attendance-table th:first-child{z-index:4;background:#f8f8f7}.attendance-table tr:last-child td{border-bottom:0}.attendance-table th:last-child,.attendance-table td:last-child{border-right:0}.attendance-student{overflow:hidden;color:var(--title);font-size:11px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.attendance-student small{display:inline-block;min-width:24px;color:#9aa1aa;font-size:10px}.mark-cell{display:inline-grid;place-items:center;width:34px;height:34px;border:1px dashed #cbd2db;border-radius:11px;background:#fff;color:#9aa1aa}.mark-cell svg{width:17px;height:17px}.mark-cell.present{border:1px solid #b7e2cd;background:var(--good-soft);color:var(--good)}.mark-cell.absent{border:1px solid #f0c5bd;background:var(--bad-soft);color:var(--bad)}.mark-cell.excused{border:1px solid #f0d9a6;background:#fff6df;color:#9b6a16}.attendance-legend{display:flex;gap:12px;flex-wrap:wrap;margin-top:11px;color:var(--muted);font-size:10px}.attendance-legend span{display:flex;align-items:center;gap:5px}.legend-dot{display:grid;place-items:center;width:18px;height:18px;border-radius:6px;background:#f2f4f6;color:#64748b;font-size:9px;font-weight:800}.legend-dot.present{background:var(--good-soft);color:var(--good)}.legend-dot.absent{background:var(--bad-soft);color:var(--bad)}.legend-dot.excused{background:#fff6df;color:#9b6a16}.attendance-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:14px 0}.attendance-summary .stack-card{padding:12px}.attendance-summary .stack-meta{font-size:10px}.attendance-summary .stack-title{font-size:18px}.student-row{display:flex;align-items:center;gap:11px;padding:12px 13px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:var(--shadow)}.student-avatar{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:13px;background:#fbefe0;color:#a35c1b;font-size:12px;font-weight:800}.student-row-main{min-width:0;flex:1}.student-row-main strong{display:block;overflow:hidden;color:var(--title);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.student-row-main small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.member-chip{display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border-radius:999px;background:var(--good-soft);color:var(--good);font-size:9px;font-weight:800;white-space:nowrap}.member-chip svg{width:12px;height:12px}.invite-code{padding:15px;border:1px dashed #e1b97e;border-radius:15px;background:#fff8ed;text-align:center;color:var(--accent-dark);font-size:25px;font-weight:800;letter-spacing:3px}.invite-link{display:block;overflow:hidden;margin-top:9px;padding:11px;border:1px solid var(--line);border-radius:11px;background:#f8fafc;color:#475569;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:760px){.app-shell{display:flex;flex-direction:column;gap:18px;width:min(calc(100% - 48px),1420px);min-height:100vh;padding:24px 0 48px}.topbar{order:1;width:100%;height:64px}.bottom-nav{order:2;position:static;left:auto;bottom:auto;transform:none;width:100%;margin:0;border:1px solid var(--line);border-radius:17px;padding:8px;background:#ffffffec;box-shadow:var(--shadow)}.nav-item{min-width:88px;font-size:11px}.nav-item span svg{width:20px;height:20px}.quick-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.quick-card{min-height:104px}.schedule-day{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.menu-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.modal-backdrop{align-items:center}.modal{border-radius:24px}.attendance-panel{padding:20px}.attendance-table{min-width:660px}}
@media(min-width:1040px){.app-shell{display:grid;grid-template-columns:220px minmax(0,1fr);column-gap:32px;align-items:start}.topbar{grid-column:1/-1;grid-row:1;margin-bottom:16px}.bottom-nav{grid-column:1;grid-row:2;position:sticky;top:24px;display:grid;align-content:start;gap:5px;padding:12px}.nav-item{display:flex;justify-content:flex-start;align-items:center;gap:12px;min-height:48px;padding:10px 12px;border-radius:13px;font-size:13px}.nav-item.active{background:#fff1df}.nav-item span{width:24px;height:24px}.nav-item span svg{width:20px;height:20px}#screen{grid-column:2;grid-row:2;min-width:0}#screen:has(.welcome-card){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}#screen:has(.welcome-card)>.welcome-card,#screen:has(.welcome-card)>.quick-grid,#screen:has(.welcome-card)>#web-auth-banner{grid-column:1/-1}#screen:has(.welcome-card)>.section-block,#screen:has(.welcome-card)>.quick-grid{margin-top:0}.welcome-card{padding:30px}.welcome-card h1{font-size:42px}.page-title{font-size:38px}.attendance-panel{margin-top:25px}.attendance-summary{max-width:850px}.attendance-table{min-width:760px}}
@media(max-width:520px){.app-shell{width:calc(100% - 28px)}.topbar{height:64px}.brand-mark{width:39px;height:39px}.welcome-card{padding:22px 19px}.welcome-card h1{font-size:33px}.quick-card{min-height:103px;padding:11px}.attendance-panel{padding:12px;border-radius:16px}.attendance-panel-head{display:grid}.attendance-tools{justify-content:flex-end}.attendance-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.attendance-table{min-width:580px}.attendance-table th:first-child,.attendance-table td:first-child{width:165px;max-width:165px}.student-row{padding:10px}.member-chip{padding:5px 6px;font-size:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.mark-cell.late{border:1px solid #f0d9a6;background:#fff6df;color:#9b6a16}.legend-dot.late{background:#fff6df;color:#9b6a16}.legend-dot svg{width:12px;height:12px}
.role-edit-button{min-height:36px;padding:8px 10px;font-size:10px;white-space:nowrap}.permission-list{display:grid;gap:9px;margin:16px 0}.permission-option{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fafbfc;cursor:pointer}.permission-option input{width:18px;height:18px;flex:none;accent-color:var(--accent)}.permission-option strong{display:block;color:var(--title);font-size:12px}.permission-option small{display:block;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.45}
.student-row-roster{align-items:center;cursor:pointer;transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}.student-row-roster:hover,.student-row-roster:focus-visible{border-color:#e9c69e;box-shadow:0 8px 22px #1e293b10;transform:translateY(-1px);outline:none}.student-row-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none}.student-status{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;border-radius:999px;background:#fff2df;color:#9b6427;font-size:10px;font-weight:800;white-space:nowrap}.student-status.connected{background:var(--good-soft);color:var(--good)}.student-invite{min-height:36px;padding:8px 10px;font-size:10px;white-space:nowrap}@media(max-width:620px){.student-row-roster{flex-wrap:wrap;gap:9px}.student-row-roster .student-row-main{flex:1 1 calc(100% - 55px)}.student-row-tools{width:100%;justify-content:space-between;padding-left:49px}.student-invite{flex:1;max-width:210px}}
@media(max-width:620px){.member-row{flex-wrap:wrap}.member-row .student-row-main{flex:1 1 calc(100% - 55px)}.member-row .role-edit-button{margin-left:49px}}
.next-lesson-card{position:relative;overflow:hidden;min-height:176px;padding:20px 21px;border-color:#f0dfcb;background:radial-gradient(ellipse at 88% 12%,#e7a65424,transparent 36%),linear-gradient(135deg,#fff,#fffaf3 68%,#fff5e8);box-shadow:0 15px 32px #5b46310d;color:var(--title)}.next-lesson-card:after{content:"";position:absolute;width:150px;height:150px;right:-75px;bottom:-110px;border:1px solid #d9822b2b;border-radius:50%;box-shadow:0 0 0 20px #d9822b0b,0 0 0 42px #d9822b08;pointer-events:none}.next-lesson-card .lesson-name{color:var(--title);font-size:21px;letter-spacing:-.45px}.next-lesson-card .lesson-time{background:var(--accent-soft);color:var(--accent-dark);font-size:13px}.next-lesson-card .lesson-meta{position:relative;z-index:1;color:var(--muted);font-size:12px}.next-lesson-pill{display:inline-flex;align-items:center;gap:8px;margin-bottom:17px;padding:7px 12px;border-radius:999px;background:#fff0dc;color:var(--accent-dark);font-size:11px;font-weight:800;letter-spacing:.15px}.next-lesson-pill i{width:8px;height:8px;border-radius:50%;background:#41b883;box-shadow:0 0 0 4px #41b88320}.next-lesson-note{display:flex;align-items:center;gap:7px;margin-top:13px;color:#8a5729;font-size:11px}.next-lesson-note svg{width:15px;height:15px}.quick-card[data-home-action="attendance"] .quick-icon{background:#f0eaff;color:#6853c7}.quick-card[data-home-action="announcements"] .quick-icon{background:#fff0d9;color:#bd711d}.quick-card[data-home-action="absences"] .quick-icon{background:#e5f6ee;color:#19815d}.quick-card[data-home-action="materials"] .quick-icon{background:#e8f1ff;color:#477bbd}.today-pairs-list{display:grid;gap:8px}.today-pair-row{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;min-height:65px;padding:11px 14px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:var(--shadow);text-align:left;transition:transform .18s ease,border-color .18s ease}.today-pair-row:hover{transform:translateY(-1px);border-color:#e9c69e}.today-pair-time{color:var(--accent-dark);font-size:12px;font-weight:800}.today-pair-name{min-width:0}.today-pair-name strong{display:block;overflow:hidden;color:var(--title);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.today-pair-name small{display:block;margin-top:4px;color:var(--muted);font-size:10px}.today-pair-status{padding:6px 8px;border-radius:999px;background:#f0f2f5;color:#748092;font-size:9px;font-weight:800;white-space:nowrap}.today-pair-status.is-current{background:var(--good-soft);color:var(--good)}.home-risk-section{padding:16px;border:1px solid #e6e2f7;border-radius:20px;background:linear-gradient(140deg,#fff,#f8f6ff);box-shadow:var(--shadow)}.risk-row{display:flex;align-items:center;gap:11px;padding:12px 13px;border:1px solid var(--line);border-radius:15px;background:#fff}.risk-rank{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:12px;background:#f2edff;color:#6556b7;font-size:11px;font-weight:800}.risk-main{min-width:0;flex:1}.risk-main strong{display:block;overflow:hidden;color:var(--title);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.risk-main small{display:block;margin-top:4px;color:var(--muted);font-size:10px;line-height:1.5}.risk-count{display:grid;place-items:center;min-width:34px;height:34px;padding:0 8px;border-radius:12px;background:#f5f2ff;color:#6456b4;font-size:12px}.risk-count.at-limit{background:#fff1df;color:#a15a17}.home-risk-section .section-heading{align-items:flex-start}.home-risk-section .stack-meta{margin-top:4px}.home-risk-section .section-heading>div{min-width:0}.home-risk-section .section-heading .text-button{flex:none}
@media(min-width:760px){.quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.today-pairs-list{grid-template-columns:repeat(2,minmax(0,1fr))}.next-lesson-card .lesson-name{font-size:25px}}
@media(min-width:1040px){#screen:has(.welcome-card)>.section-block:has(#next-lesson),#screen:has(.welcome-card)>#home-today,#screen:has(.welcome-card)>#home-risk-section{grid-column:1/-1}.next-lesson-card{min-height:200px;padding:24px}.home-risk-section{padding:20px}}
@media(max-width:520px){.next-lesson-card{min-height:157px;padding:17px}.next-lesson-card .lesson-name{font-size:17px}.next-lesson-pill{margin-bottom:14px}.today-pair-row{grid-template-columns:52px minmax(0,1fr);gap:8px}.today-pair-status{grid-column:2;justify-self:start;margin-top:-2px}.home-risk-section{padding:12px}.risk-row{padding:10px}}
.risk-row-button{width:100%;font:inherit;text-align:left;cursor:pointer;transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}.risk-row-button:hover{transform:translateY(-1px);border-color:#e6c49c;box-shadow:0 8px 20px #1e293b0b}.risk-filter-row{display:grid;grid-template-columns:minmax(135px,.55fr) minmax(180px,1fr);align-items:center;gap:8px 14px;margin:14px 0;padding:13px 14px;border:1px solid var(--line);border-radius:15px;background:linear-gradient(120deg,#fff,#fffaf3)}.risk-filter-row label{color:var(--title);font-size:12px;font-weight:800}.risk-filter-row select{width:100%;min-width:0;padding:10px 36px 10px 12px;border:1px solid #e5e8ee;border-radius:11px;background:#fff;color:var(--ink);font:inherit;font-size:12px}.risk-filter-row>span{grid-column:1/-1;color:var(--muted);font-size:10px}.risk-stats{display:flex;flex-wrap:wrap;gap:5px 9px;margin-top:8px}.risk-stats span{padding:4px 7px;border-radius:8px;background:#f5f6f8;color:var(--muted);font-size:9px;white-space:nowrap}.risk-stats b{color:var(--title)}.risk-open{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 5px;padding:7px 9px;border-radius:10px;background:#f7f2eb;color:var(--accent-dark);font-size:10px;font-weight:800;white-space:normal}.risk-open strong,.risk-open small{grid-column:1}.risk-open small{font-size:9px;font-weight:600;opacity:.78}.risk-open svg{grid-column:2;grid-row:1/3;align-self:center;width:14px;height:14px}.risk-detail-modal{max-height:min(84dvh,760px);overflow:auto}.risk-detail-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}.risk-detail-head h2{margin:0;color:var(--title);font-size:20px}.risk-detail-head p{margin:4px 0 0;color:var(--muted);font-size:11px}.risk-detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.risk-detail-stats>span{display:grid;gap:5px;padding:11px;border:1px solid var(--line);border-radius:13px;background:#fff}.risk-detail-stats small{color:var(--muted);font-size:10px}.risk-detail-stats b{color:var(--title);font-size:14px}.risk-detail-modal h3{margin:19px 0 9px;color:var(--title);font-size:13px}.risk-subject-list{display:flex;flex-wrap:wrap;gap:7px}.risk-subject-chip{padding:7px 9px;border-radius:999px;background:#fff2df;color:#9a571b;font-size:10px;font-weight:800}.risk-month-list,.risk-record-list{display:grid;gap:7px}.risk-month-detail,.risk-record{display:grid;gap:4px;padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--muted);font-size:10px}.risk-month-detail{grid-template-columns:1fr 1fr}.risk-month-detail strong{grid-column:1/-1;color:var(--title);font-size:11px}.risk-record-date{color:var(--muted)}.risk-record strong{color:var(--title);font-size:11px}.risk-record-type{color:var(--muted)}.risk-record-type.is-excused{color:var(--good)}.risk-record-type.is-unexcused{color:var(--bad)}
@media(max-width:520px){.risk-filter-row{grid-template-columns:1fr;gap:7px}.risk-filter-row>span{grid-column:auto}.risk-row-button{align-items:flex-start}.risk-open{align-self:center}.risk-detail-stats{gap:6px}.risk-month-detail{grid-template-columns:1fr}.risk-month-detail strong{grid-column:auto}}
.brand-copy span#brand-user{display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px;overflow:visible;white-space:normal;line-height:1.45}.brand-user-name,.brand-user-group{min-width:0}.brand-user-group{white-space:nowrap}.brand-copy #brand-user .headman-badge{margin-left:1px}
@media(max-width:520px){.risk-row-button{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:start;column-gap:10px;row-gap:7px}.risk-row-button .risk-main{min-width:0}.risk-row-button .risk-open{grid-column:2;justify-self:start;align-self:start;max-width:100%;white-space:normal;text-align:left;line-height:1.35}}
.risk-source-warning{margin:10px 0 14px;padding:12px 14px;border:1px solid #efcfaa;border-radius:14px;background:#fff7ec;color:#805121;font-size:11px;line-height:1.55}.risk-source-warning strong{display:block;margin-bottom:3px;color:#77440f;font-size:12px}
.mark-cell.late{border:1px solid #f1d59e;background:#fff7e5;color:#ad7620}.legend-dot.late{background:#fff6df;color:#9b6a16}.mark-cell.no_response{border:1px solid #e5d9c8;background:#f8f4ed;color:#8a6b46}.legend-dot.no-response{background:#f8f4ed;color:#8a6b46}
.attendance-date-picker{position:relative;display:flex;flex:1;min-width:0;justify-content:center;cursor:pointer}.attendance-date-picker-content{display:flex;align-items:center;justify-content:center;gap:9px;min-height:40px;padding:6px 14px;border:1px solid #ecd7bb;border-radius:13px;background:linear-gradient(135deg,#fff,#fff8ed);pointer-events:none}.attendance-date-picker-content>svg{width:17px;height:17px;color:var(--accent-dark)}.attendance-date-picker .attendance-date{font-size:12px}.attendance-date-picker input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}

.schedule-day .lesson-card{position:relative;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.schedule-day .lesson-card:hover{transform:translateY(-1px);border-color:#e4c296}
.schedule-day .lesson-card.is-replacement,.schedule-day .lesson-card.is-added{border-color:#efc78f;background:linear-gradient(135deg,#fff9ef,#fff 70%);box-shadow:0 8px 22px -16px #b8651b66}
.schedule-day .lesson-card.is-replacement:before,.schedule-day .lesson-card.is-added:before{content:"";position:absolute;left:0;top:13px;bottom:13px;width:3px;border-radius:0 3px 3px 0;background:var(--accent)}
.schedule-day .lesson-card.is-room-change{border-color:#cfdded;background:linear-gradient(135deg,#f7fbff,#fff 72%)}
.lesson-change-note{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px;color:var(--muted);font-size:10px;line-height:1.45}
.schedule-change-badge{display:inline-flex;align-items:center;flex:none;padding:4px 8px;border:1px solid #efd2a9;border-radius:999px;background:#fff0d9;color:#a95f18;font-size:9px;font-weight:800;letter-spacing:.35px;text-transform:uppercase;white-space:nowrap}
.schedule-change-badge.is-added{border-color:#c5e7d6;background:#e9f7ef;color:#18764f}
.headman-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid #efd8b9;border-radius:999px;background:linear-gradient(135deg,#fff5e7,#fffaf3);color:#a75e1b;font-size:9px;font-weight:800;letter-spacing:.25px;white-space:nowrap}.student-row-name-line{display:flex;align-items:center;gap:8px;min-width:0}.student-row-name-line strong{min-width:0}.owner-bind-button{border:1px solid #eed8bd;background:#fff8ee;color:#985316}
.schedule-change-badge.is-cancelled{border-color:#efcccc;background:#fff0ef;color:#a33b36}
.schedule-change-badge.is-updated,.schedule-change-badge.is-room-change{border-color:#cfdded;background:#eef5fc;color:#456a91}
.today-change-list{display:grid;gap:10px}
.schedule-change-card{position:relative;overflow:hidden;padding:14px 16px 14px 19px;border:1px solid #e4e8ef;border-radius:17px;background:#fff;box-shadow:var(--shadow)}
.schedule-change-card:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 3px 3px 0;background:#d9822b}
.schedule-change-card.is-added{border-color:#cfe8da;background:linear-gradient(135deg,#f5fbf7,#fff 75%)}
.schedule-change-card.is-added:before{background:#21875c}
.schedule-change-card.is-cancelled{border-color:#efd1cf;background:linear-gradient(135deg,#fff7f6,#fff 75%)}
.schedule-change-card.is-cancelled:before{background:#ba514b}
.schedule-change-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.change-pair{color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.25px}
.change-subjects{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:9px;color:var(--title);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.change-subjects strong{font-size:13px;font-weight:800}
.old-subject{color:var(--muted);font-size:11px;text-decoration:line-through;text-decoration-color:#c9a787}
.change-arrow{display:inline-flex;align-items:center;color:#bd711d}
.change-arrow svg{width:14px;height:14px}
.change-detail{margin-top:6px;color:var(--muted);font-size:10px;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:520px){.schedule-change-card{padding:12px 12px 12px 16px}.change-subjects{align-items:flex-start;gap:5px}.change-subjects strong{font-size:12px}.lesson-change-note{align-items:flex-start}}
@media(max-width:520px){.attendance-table{width:100%;min-width:0;table-layout:fixed}.attendance-table th,.attendance-table td{padding:5px 2px}.attendance-table th:first-child,.attendance-table td:first-child{width:28%;max-width:28%}.attendance-table th{font-size:8px;line-height:1.25;overflow-wrap:anywhere;word-break:break-word}.attendance-table th small{font-size:8px}.attendance-student{font-size:9px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}.attendance-student small{min-width:16px;font-size:8px}.mark-cell{width:30px;height:30px;border-radius:9px}.mark-cell svg{width:14px;height:14px}.attendance-day{gap:5px}.attendance-day button{width:32px;height:32px}.attendance-date-picker-content{gap:5px;padding:6px 5px}.attendance-date-picker .attendance-date{font-size:10px}}
@media(max-width:520px){.attendance-table th .pair-number{display:block;margin:0;font-size:8px}.attendance-table th .attendance-subject{display:-webkit-box;margin:3px 0;font-size:8px;line-height:1.2;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.attendance-table th small{display:block;font-size:8px}}
@media(max-width:520px){.attendance-table-wrap{overflow:visible;overscroll-behavior:auto;border:0;border-radius:0}.attendance-table th,.attendance-table td,.attendance-table th:first-child,.attendance-table td:first-child{position:static;left:auto}.attendance-table th:first-child,.attendance-table td:first-child{max-width:none}}
@media(min-width:760px){.attendance-table-wrap{max-height:min(62dvh,640px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-x pan-y}.attendance-table-wrap:focus{outline:2px solid #d9822b55;outline-offset:2px}.attendance-table th{top:0}.attendance-table td:first-child{min-width:210px}.attendance-student{max-width:190px}.attendance-bulk-button{display:inline-flex;align-items:center;justify-content:center;min-height:25px;margin:5px 0 0 24px;padding:4px 8px;border:1px solid #ecd7bb;border-radius:8px;background:#fff8ed;color:var(--accent-dark);font-size:9px;font-weight:800;white-space:nowrap}.attendance-bulk-button:hover{border-color:#d9822b;background:#fff1df}}
.access-gate{max-width:620px;margin:clamp(24px,8vh,90px) auto 30px;padding:clamp(22px,5vw,42px);border:1px solid var(--line);border-radius:26px;background:var(--surface);box-shadow:0 18px 44px rgba(35,45,65,.08);text-align:center}.access-gate>.quick-icon{width:58px;height:58px;margin:0 auto 18px}.access-gate .eyebrow{margin-bottom:10px}.access-gate h1{margin:0 0 12px;font-size:clamp(26px,6vw,38px)}.access-gate>p{max-width:440px;margin:0 auto 20px;color:var(--muted);line-height:1.6}.access-gate .primary-button,.access-gate .secondary-button{width:100%;justify-content:center;margin:8px 0}.access-gate .stack-meta{margin:16px auto 0;font-size:13px}.bottom-nav[hidden]{display:none}
@media(min-width:800px){#screen>.access-gate{width:min(100%,620px);margin:clamp(30px,7vh,84px) auto 38px;padding:42px 46px}#screen>.access-gate h1{max-width:100%;text-align:center}.app-shell.is-guest #screen{grid-column:1/-1;grid-row:2;justify-self:center;width:min(100%,820px)}}
.invite-manager{margin:18px 0}.invite-manager-link{margin:8px 0;max-height:74px;overflow:auto;overflow-wrap:anywhere;font-size:11px}.invite-manager-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:10px}.invite-history{margin:14px 0;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.invite-history>summary{color:var(--title);font-size:12px;font-weight:800;cursor:pointer}.invite-history .stack-list{margin-top:12px}.invite-history-row{padding:12px}.invite-history-row .lesson-top{align-items:flex-start}.invite-history-row .stack-title{font-size:12px}.invite-history-row .stack-meta{margin-top:5px;font-size:10px}.personal-invite-meta{overflow-wrap:anywhere}.danger-text{color:var(--bad)}@media(max-width:620px){.student-row-tools{flex-wrap:wrap}.personal-invite-copy{margin-left:auto}}
.member-admin-toolbar,.member-admin-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.member-admin-actions{justify-content:flex-end;max-width:100%}.member-row{align-items:flex-start;flex-wrap:wrap}.member-row .student-row-main{flex:1 1 220px}.member-row .student-row-main small{overflow-wrap:anywhere}.member-row .member-chip{flex:none}.member-chip-unknown{background:#fff4df;color:#9b651b}.member-admin-actions button{font-size:10px}.member-form-label{display:block;margin:14px 0 6px;color:var(--title);font-size:12px;font-weight:800}.member-form-control{display:block;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--title);font:inherit}.member-form-note{margin-top:6px;color:var(--muted);font-size:11px;line-height:1.5}.member-row .student-avatar{flex:none}@media(max-width:620px){.member-admin-toolbar{width:100%;justify-content:flex-start}.member-admin-actions{width:100%;justify-content:flex-start}.member-row .student-row-main{flex-basis:calc(100% - 56px)}}
.student-open-button{border:1px solid #ead8c2;background:#fffaf4;color:var(--accent-dark)}.student-detail-modal{width:min(100%,680px)}.student-detail-heading{display:flex;align-items:center;gap:13px;margin-bottom:18px}.student-detail-heading .student-avatar{width:52px;height:52px;border-radius:17px;background:#fff1df;color:var(--accent-dark);font-size:15px;font-weight:800}.student-detail-heading>div{flex:1;min-width:0}.student-detail-heading h2{margin:3px 0 0;overflow-wrap:anywhere}.student-detail-label{display:block;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.55px;text-transform:uppercase}.student-detail-close{align-self:flex-start;box-shadow:none;background:#f5f6f8;color:var(--muted)}.student-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.student-detail-account,.student-detail-invite{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0;padding:15px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(145deg,#fff,#fbfcfe)}.student-detail-account>div,.student-detail-invite{min-width:0}.student-detail-account strong,.student-detail-invite strong{display:block;margin-top:5px;color:var(--title);font-size:13px;overflow-wrap:anywhere}.student-detail-account small,.student-detail-invite small{display:block;margin-top:5px;color:var(--muted);font-size:10px;line-height:1.5;overflow-wrap:anywhere}.student-detail-account .student-status{flex:none}.student-detail-account.is-empty{background:#fffaf3;border-color:#f0dfcb}.student-detail-invite{display:block}.student-detail-invite .student-detail-actions{margin-top:10px}.student-detail-modal>.student-detail-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px}.student-detail-modal>.student-detail-actions .text-button{padding:10px}.student-detail-modal .primary-button,.student-detail-modal .secondary-button{min-height:39px;padding:9px 12px;font-size:11px}@media(max-width:560px){.student-detail-grid{grid-template-columns:1fr}.student-detail-account{align-items:center}.student-row-tools .student-open-button{min-width:80px}}
.attendance-mark-layer{position:fixed;inset:0;z-index:30;background:transparent}.attendance-mark-popover{position:fixed;width:min(304px,calc(100vw - 24px));padding:13px;border:1px solid #ead8c2;border-radius:18px;background:rgba(255,255,255,.98);box-shadow:0 18px 48px rgba(32,42,58,.18),0 4px 12px rgba(32,42,58,.08);backdrop-filter:blur(16px);transform-origin:center top;animation:attendance-pop-in .18s cubic-bezier(.2,.8,.2,1) both}.attendance-popover-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:11px}.attendance-popover-heading>div{min-width:0}.attendance-popover-heading strong,.attendance-popover-heading small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attendance-popover-heading strong{color:var(--title);font-size:12px}.attendance-popover-heading small{margin-top:3px;color:var(--muted);font-size:10px}.attendance-popover-close{display:grid;place-items:center;width:27px;height:27px;flex:none;border-radius:9px;background:#f6f3ef;color:var(--muted)}.attendance-popover-close svg{width:15px;height:15px}.attendance-quick-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.attendance-quick-choice{display:grid;justify-items:center;gap:6px;min-height:63px;padding:8px 4px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--title);transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}.attendance-quick-choice:active{transform:scale(.96)}.attendance-quick-choice span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#f4f6f8;color:#67768a}.attendance-quick-choice svg{width:16px;height:16px}.attendance-quick-choice strong{font-size:10px;white-space:nowrap}.attendance-quick-choice.present span{background:#e7f6ef;color:#147d58}.attendance-quick-choice.absent span{background:#fff0ed;color:#b7443c}.attendance-quick-choice.excused span{background:#fff6df;color:#9b6a16}.attendance-quick-choice.present.selected{border-color:#a8d8be;box-shadow:0 0 0 2px #147d5818}.attendance-quick-choice.absent.selected{border-color:#eab9b0;box-shadow:0 0 0 2px #b7443c18}.attendance-quick-choice.excused.selected{border-color:#e7d197;box-shadow:0 0 0 2px #9b6a1618}.attendance-popover-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:25px;margin-top:8px;color:var(--muted);font-size:9px}.attendance-clear-choice{padding:5px 0;background:none;color:var(--muted);font-size:10px}.attendance-clear-choice:hover{color:var(--bad)}.attendance-popover-error{color:var(--bad);text-align:right}@keyframes attendance-pop-in{from{opacity:0;transform:translateY(-5px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
.mark-cell.from-poll{position:relative}.mark-cell.from-poll::after{content:"tg";position:absolute;top:-5px;right:-6px;display:grid;place-items:center;min-width:16px;height:12px;padding:0 3px;border:1px solid #fff;border-radius:6px;background:#f5e7d2;color:#a55b18;font:700 7px/1 system-ui,sans-serif;letter-spacing:.1px}.legend-dot.poll-source{width:22px;background:#f5e7d2;color:#a55b18;font-size:7px;letter-spacing:.1px}
.attendance-extra-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:7px}.attendance-extra-choice{display:flex;align-items:center;justify-content:center;gap:6px;min-height:33px;padding:6px;border:1px solid #ece7df;border-radius:10px;background:#fbfaf8;color:var(--muted);transition:background .14s ease,border-color .14s ease}.attendance-extra-choice span{display:grid;place-items:center;width:17px;height:17px}.attendance-extra-choice svg{width:14px;height:14px}.attendance-extra-choice strong{font-size:9px}.attendance-extra-choice.late.selected{border-color:#e7d197;background:#fff6df;color:#9b6a16}.attendance-extra-choice.no_response.selected{border-color:#e5d9c8;background:#f8f4ed;color:#8a6b46}.attendance-quick-choice:focus-visible,.attendance-extra-choice:focus-visible,.attendance-popover-close:focus-visible,.attendance-clear-choice:focus-visible{outline:2px solid #d9822b;outline-offset:2px}
.personal-attendance-empty{max-width:620px;margin:12px auto;padding:24px}.personal-attendance-empty strong{display:inline-block;margin-bottom:5px;color:var(--title);font-size:14px}
.action-toast{position:fixed;z-index:1000;left:50%;bottom:calc(76px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:9px;width:max-content;max-width:calc(100vw - 28px);padding:11px 15px;border:1px solid #ead8c2;border-radius:15px;background:rgba(255,255,255,.97);box-shadow:0 14px 38px #17203324;color:var(--title);font-size:12px;font-weight:750;line-height:1.4;opacity:0;pointer-events:none;transform:translate(-50%,12px) scale(.97);transition:opacity .2s ease,transform .22s cubic-bezier(.2,.8,.2,1);backdrop-filter:blur(12px)}
.action-toast.is-visible{opacity:1;transform:translate(-50%,0) scale(1)}
.action-toast-icon{display:grid;place-items:center;width:23px;height:23px;flex:none;border-radius:8px;background:#e9f7ef;color:#18764f}
.action-toast-icon svg{width:15px;height:15px}
.action-toast.is-error{border-color:#efcbc7}
.action-toast.is-error .action-toast-icon{background:#fff0ef;color:#a33b36}
button.tap-feedback{animation:button-feedback .22s ease-out}
@keyframes button-feedback{0%{filter:brightness(1)}42%{transform:scale(.965);filter:brightness(.97)}100%{transform:scale(1);filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.action-toast{transition:none}button.tap-feedback{animation:none}}
.auth-backdrop{background:rgba(23,31,45,.42);backdrop-filter:blur(8px)}.auth-modal{position:relative;overflow:hidden;isolation:isolate;padding-top:26px;animation:auth-card-in .42s cubic-bezier(.2,.82,.2,1) both}.auth-modal:before{position:absolute;z-index:-1;top:-92px;right:-65px;width:230px;height:230px;border-radius:50%;background:radial-gradient(circle,#f9e5c8 0,rgba(249,229,200,.54) 42%,transparent 72%);content:"";pointer-events:none}.auth-modal .eyebrow{margin:0 0 7px;color:var(--accent-dark);font-size:10px;font-weight:850;letter-spacing:1.2px}.auth-modal h2{margin:0 0 10px}.auth-modal>p{line-height:1.55}.auth-symbol{display:grid;place-items:center;width:64px;height:64px;margin:0 0 18px;border:1px solid #f1d8b6;border-radius:20px;background:linear-gradient(145deg,#fffaf2,#fff);box-shadow:0 8px 20px #b56b1918;color:var(--accent-dark)}.auth-symbol svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.auth-error{min-height:20px;margin-top:8px;color:#b42318;font-size:12px;line-height:1.45}.auth-modal input{letter-spacing:.08em;font-variant-numeric:tabular-nums}.auth-modal input:focus{border-color:#d9822b;box-shadow:0 0 0 4px #d9822b20;outline:0}@keyframes auth-card-in{from{opacity:0;transform:translateY(12px) scale(.975)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.auth-modal{animation:none}}
.lesson-actions{display:flex;align-items:center;gap:12px;flex:none}.lesson-actions .text-button{padding:3px 0;font-size:11px}.announcement-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin-top:9px}.stack-card .lesson-top .stack-title{min-width:0}
.attendance-bulk-button{-webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:27px;margin:6px 0 0 16px;padding:4px 9px;border:1px solid #ecd7bb;border-radius:999px;background:#fff7ec;color:#a85b16;font-size:9px;font-weight:800;line-height:1;white-space:nowrap;-webkit-user-select:none;user-select:none;touch-action:manipulation;transition:background .16s ease,border-color .16s ease,transform .16s ease}.attendance-bulk-button:hover,.attendance-bulk-button:focus-visible{border-color:#d9822b;background:#ffefd9;outline:none}.attendance-bulk-button:active{transform:scale(.96)}
.invite-history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 6px;padding:10px 12px;border-radius:12px;background:var(--surface-muted,#f5f6f8);color:var(--muted,#64748b);font-size:11px;font-weight:700}.invite-history-toolbar .text-button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:5px 9px;border-radius:9px;background:var(--surface,#fff);font-size:11px;font-weight:800}.invite-history-toolbar .text-button svg{width:15px;height:15px}.invite-history-clean-state{margin:12px 0 4px}@media(max-width:620px){.invite-history-toolbar{align-items:flex-start;flex-direction:column}.invite-history-toolbar .text-button{align-self:flex-end}}
.risk-level-legend{display:flex;align-items:center;gap:8px;margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--muted);font-size:10px;font-weight:700;flex-wrap:wrap}.risk-level-dot{width:9px;height:9px;border-radius:50%;margin-left:4px}.risk-level-dot-green{background:#21a675;box-shadow:0 0 0 3px #21a6751c}.risk-level-dot-yellow{background:#e6a323;box-shadow:0 0 0 3px #e6a32320}.risk-level-dot-red{background:#d94e48;box-shadow:0 0 0 3px #d94e481c}.risk-row[data-risk-level="green"]{border-left:3px solid #5cbf96;background:linear-gradient(105deg,#f1fbf6,#fff 24%)}.risk-row[data-risk-level="yellow"]{border-left:3px solid #e6a323;background:linear-gradient(105deg,#fff9e8,#fff 24%)}.risk-row[data-risk-level="red"]{border-left:3px solid #dc5b52;background:linear-gradient(105deg,#fff1ef,#fff 24%)}.risk-rank-green{background:#e6f7ef!important;color:#16815d!important}.risk-rank-yellow{background:#fff3d2!important;color:#a86a0c!important}.risk-rank-red{background:#fde8e6!important;color:#bc3f38!important}.risk-open-green{background:#e9f7ef;color:#197a58}.risk-open-yellow{background:#fff3d5;color:#9b6308}.risk-open-red{background:#fde9e7;color:#b63f39}.risk-count-green{background:#e7f7ee;color:#197a58}.risk-count-yellow{background:#fff2d2;color:#9b6308}.risk-count-red{background:#fde9e7;color:#b63f39}.risk-summary-card{border-color:#efb9b4;background:linear-gradient(130deg,#fff2f1,#fff)}@media(max-width:620px){.risk-level-legend{align-items:flex-start;gap:8px;font-size:9px}.risk-row[data-risk-level]{background:#fff}}

.notification-bell{position:relative;display:grid;place-items:center;width:40px;height:40px;flex:none;border:1px solid #f0dfcb;border-radius:14px;background:#fffaf3;color:var(--accent-dark);box-shadow:var(--shadow);transition:transform .18s ease,background .18s ease}.notification-bell:hover{background:#fff1df;transform:translateY(-1px)}.notification-bell[hidden]{display:none}.notification-bell svg{width:19px;height:19px}.notification-count{position:absolute;top:-5px;right:-6px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border:2px solid #f4f6fa;border-radius:999px;background:#d94e48;color:#fff;font-size:9px;font-weight:900;line-height:1}.notification-count[hidden]{display:none}.notification-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.notification-list{display:grid;gap:9px}.notification-row{display:flex;align-items:flex-start;gap:12px;width:100%;padding:14px;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:var(--shadow);text-align:left;transition:border-color .18s ease,transform .18s ease}.notification-row:hover{border-color:#e9c69e;transform:translateY(-1px)}.notification-row-icon{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:13px;background:#fff0dc;color:var(--accent-dark)}.notification-row.is-schedule .notification-row-icon{background:#eaf1ff;color:#4c78bc}.notification-row-copy{display:grid;gap:4px;min-width:0}.notification-row-copy strong{color:var(--title);font-size:13px}.notification-row-copy small{display:-webkit-box;overflow:hidden;color:var(--muted);font-size:11px;line-height:1.5;white-space:pre-line;-webkit-box-orient:vertical;-webkit-line-clamp:3}.notification-row-copy time{margin-top:2px;color:#8993a1;font-size:10px}.is-target-announcement{border-color:#d9822b!important;box-shadow:0 0 0 4px #d9822b24,0 12px 30px #1e293b12!important;animation:announcement-target 1.1s ease-out 2}@keyframes announcement-target{0%,100%{transform:translateY(0)}45%{transform:translateY(-2px)}}@media(prefers-reduced-motion:reduce){.notification-row,.notification-bell{transition:none}.is-target-announcement{animation:none}}
.topbar{position:relative;z-index:21}.notification-scrim{position:fixed;z-index:19;inset:0;width:100%;height:100%;padding:0;background:rgba(24,31,42,.16);backdrop-filter:blur(1.5px);animation:notification-scrim-in .18s ease both}.notification-scrim[hidden]{display:none}.notification-popover{position:fixed;z-index:20;left:12px;right:auto;top:calc(env(safe-area-inset-top) + 76px);display:flex;flex-direction:column;width:min(420px,calc(100vw - 24px));max-height:min(70dvh,560px);overflow:hidden;border:1px solid #e4e8ee;border-radius:22px;background:rgba(255,255,255,.97);box-shadow:0 24px 70px #17203330,0 5px 18px #17203312;backdrop-filter:blur(22px);transform-origin:top center;animation:notification-popover-in .24s cubic-bezier(.2,.78,.25,1) both}.notification-popover[hidden]{display:none}.notification-bell.is-open{position:relative;z-index:22;border-color:#e9bf90;background:#fff1df;box-shadow:0 0 0 5px #d9822b1c,var(--shadow)}.notification-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 17px 14px;border-bottom:1px solid #edf0f3;background:linear-gradient(135deg,#fffaf2,#fff 62%)}.notification-popover-title{display:grid;gap:3px;min-width:0}.notification-popover-kicker{color:#ad641f;font-size:8px;font-weight:900;letter-spacing:1.15px}.notification-popover-title h2{margin:0;color:var(--title);font-family:'Instrument Serif',Georgia,serif;font-size:25px;font-weight:400;line-height:1.05}.notification-popover-title small{color:var(--muted);font-size:10px}.notification-popover-tools{display:flex;align-items:center;gap:6px}.notification-popover-total{margin-right:3px;color:var(--muted);font-size:9px;font-weight:750;white-space:nowrap}.notification-tool-button{display:grid;place-items:center;width:32px;height:32px;border:1px solid #e8ebef;border-radius:11px;background:#fff;color:#647084;transition:background .16s ease,color .16s ease,transform .16s ease}.notification-tool-button:hover{background:#fff3e4;color:var(--accent-dark);transform:translateY(-1px)}.notification-tool-button svg{width:15px;height:15px}.notification-popover .notification-list{display:grid;gap:8px;overflow:auto;overscroll-behavior:contain;padding:12px}.notification-popover .notification-row{align-items:center;gap:10px;padding:11px;border-radius:15px;box-shadow:none}.notification-popover .notification-row-copy strong{font-size:12px;line-height:1.35}.notification-popover .notification-row-copy small{-webkit-line-clamp:2;font-size:10px}.notification-popover .notification-row-copy time{font-size:9px}.notification-row-arrow{display:grid;place-items:center;width:24px;height:24px;flex:none;border-radius:8px;background:#f5f6f8;color:#8a94a2}.notification-row-arrow svg{width:14px;height:14px}.notification-row.is-schedule .notification-row-arrow{background:#eef3fc;color:#4c78bc}.notification-loading{display:grid;justify-items:center;gap:7px;padding:36px 18px;color:var(--title);text-align:center;animation:notification-loading-in .2s ease both}.notification-loading-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:#fff1df;color:var(--accent-dark);font-size:21px}.notification-loading small{color:var(--muted);font-size:10px}.notification-popover .empty-state{margin:0;padding:24px 14px;background:#fafbfc;font-size:11px}.notification-row:focus-visible,.notification-tool-button:focus-visible{outline:3px solid #d9822b55;outline-offset:2px}@keyframes notification-popover-in{from{opacity:0;transform:translateY(-7px) scale(.975)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes notification-scrim-in{from{opacity:0}to{opacity:1}}@keyframes notification-loading-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(max-width:620px){.notification-popover{max-height:min(68dvh,560px);border-radius:20px}.notification-popover-head{padding:15px 14px 12px}.notification-popover .notification-list{padding:10px}.notification-popover-total{font-size:8px}}@media(prefers-reduced-motion:reduce){.notification-popover,.notification-scrim,.notification-loading{animation:none}.notification-tool-button{transition:none}}

:root[data-theme="dark"]{color-scheme:dark;--ink:#e4e1db;--title:#f4f1ec;--muted:#8b929c;--line:#23282f;--surface:#14181d;--surface-soft:#181d23;--accent:#ff7a59;--accent-dark:#e8623f;--accent-soft:#291a15;--blue:#7fb2ff;--good:#5fcf9a;--good-soft:#12271e;--bad:#ff8a7a;--bad-soft:#2b1716;--shadow:0 1px 0 rgba(255,255,255,.03) inset,0 20px 40px rgba(0,0,0,.35);background:#0b0d10;color:var(--ink)}
[data-theme="dark"] body{background:radial-gradient(ellipse at 4% 0%,#3b1d1429 0,transparent 32%),linear-gradient(160deg,#0b0d10,#11151a);color:var(--ink)}
[data-theme="dark"] .welcome-card{border-color:#30271f;background:radial-gradient(115% 150% at 3% -40%,#ff7a5915,transparent 54%),radial-gradient(100% 130% at 100% 140%,#ff7a5910,transparent 58%),#14181d}
[data-theme="dark"] .welcome-card p,[data-theme="dark"] .page-subtitle{color:#a1a6ae}
[data-theme="dark"] .lesson-card,[data-theme="dark"] .stack-card,[data-theme="dark"] .quick-card,[data-theme="dark"] .menu-row,[data-theme="dark"] .day-switch,[data-theme="dark"] .attendance-panel,[data-theme="dark"] .attendance-table-wrap,[data-theme="dark"] .risk-summary-card,[data-theme="dark"] .risk-row,[data-theme="dark"] .attendance-pair,[data-theme="dark"] .student-detail-account,[data-theme="dark"] .student-detail-invite{border-color:var(--line);background:var(--surface);color:var(--ink)}
[data-theme="dark"] .next-lesson-card{border-color:#30271f;background:radial-gradient(ellipse at 88% 12%,#ff7a5918,transparent 36%),linear-gradient(135deg,#171a1f,#15181d 68%,#1c1715);box-shadow:var(--shadow)}
[data-theme="dark"] .quick-card.accent,[data-theme="dark"] .group-tab.active,[data-theme="dark"] .attendance-date-picker-content{border-color:#382b23;background:#201a16;color:var(--title)}
[data-theme="dark"] .quick-icon,[data-theme="dark"] .attendance-day button,[data-theme="dark"] .day-switch button,[data-theme="dark"] .nav-item.active{background:#211a16;color:var(--accent)}
[data-theme="dark"] .stack-meta,[data-theme="dark"] .lesson-meta,[data-theme="dark"] .day-label small,[data-theme="dark"] .menu-row small{color:var(--muted)}
[data-theme="dark"] .bottom-nav{border-color:var(--line);background:#11151aec}
[data-theme="dark"] .nav-item{color:#8b929c}
[data-theme="dark"] .group-tabs,[data-theme="dark"] .group-tab{border-color:var(--line);background:#101419;color:var(--muted)}
[data-theme="dark"] .empty-state,[data-theme="dark"] .today-pair-row,[data-theme="dark"] .risk-record,[data-theme="dark"] .risk-month-detail,[data-theme="dark"] .student-detail-close{border-color:var(--line);background:#101419;color:var(--muted)}
[data-theme="dark"] .form-label input,[data-theme="dark"] .form-label textarea,[data-theme="dark"] .member-form-control{border-color:#303741;background:#101419;color:var(--ink)}
[data-theme="dark"] .modal{border-color:#303741;background:#14181d;color:var(--ink)}
[data-theme="dark"] .secondary-button,[data-theme="dark"] .role-edit-button,[data-theme="dark"] .attendance-bulk-button{border-color:#303741;background:#20252c;color:var(--ink)}
[data-theme="dark"] .attendance-table{background:#14181d;color:var(--ink)}
[data-theme="dark"] .attendance-table th,[data-theme="dark"] .attendance-table td{border-color:#292f37;background:#14181d;color:var(--ink)}
[data-theme="dark"] .attendance-table th{background:#1b2027}
[data-theme="dark"] .risk-source-warning,[data-theme="dark"] .permission-option{border-color:#493523;background:#211a16;color:#e8d8c5}
[data-theme="dark"] .risk-subject-chip,[data-theme="dark"] .notification-row-icon{background:#291a15;color:#ff9b7e}
[data-theme="dark"] .notification-row.is-schedule .notification-row-icon{background:#172236;color:#9bbcff}
[data-theme="dark"] .notification-popover{border-color:#303741;background:rgba(20,24,29,.98);box-shadow:0 24px 70px #0009,0 5px 18px #0005}
[data-theme="dark"] .notification-popover-head{border-color:#303741;background:linear-gradient(135deg,#201a16,#14181d 62%)}
[data-theme="dark"] .notification-tool-button{border-color:#303741;background:#1a1f26;color:#a1a6ae}
[data-theme="dark"] .notification-popover .notification-row{border-color:#303741;background:#181d23}
[data-theme="dark"] .notification-row-arrow{background:#252b33;color:#a1a6ae}
[data-theme="dark"] .notification-row.is-schedule .notification-row-arrow{background:#172236;color:#9bbcff}
[data-theme="dark"] .notification-popover .empty-state{border-color:#303741;background:#101419}
[data-theme="dark"] .notification-scrim{background:rgba(0,0,0,.38)}

/* Тёмная тема: сохраняем цвет статусов, но убираем светлые плашки и серый текст. */
[data-theme="dark"] .notification-bell{border-color:#34302c;background:#1a1d22;color:#ffad8e}
[data-theme="dark"] .notification-bell:hover,[data-theme="dark"] .notification-bell.is-open{border-color:#60402f;background:#2a201b;color:#ffb79b}
[data-theme="dark"] .notification-count{border-color:#14181d}
[data-theme="dark"] .next-lesson-pill{background:#2a2018;color:#ffc28a}
[data-theme="dark"] .next-lesson-note{color:#d7b18a}
[data-theme="dark"] .quick-card[data-home-action="attendance"] .quick-icon{background:#251f38;color:#b9a8ff}
[data-theme="dark"] .quick-card[data-home-action="announcements"] .quick-icon{background:#302317;color:#ffc47d}
[data-theme="dark"] .quick-card[data-home-action="absences"] .quick-icon{background:#172b24;color:#70d7aa}
[data-theme="dark"] .quick-card[data-home-action="materials"] .quick-icon{background:#19283a;color:#91bdff}
[data-theme="dark"] .today-pair-status{background:#242a32;color:#c0c7d1}
[data-theme="dark"] .today-pair-status.is-current{background:#163126;color:#74d8ab}
[data-theme="dark"] .home-risk-section{border-color:#34303f;background:linear-gradient(140deg,#171820,#15171d 72%,#19171c)}
[data-theme="dark"] .risk-level-legend{border-color:var(--line);background:#14181d;color:#c0c7d1}
[data-theme="dark"] .risk-rank{background:#282238;color:#c3b3ff}
[data-theme="dark"] .risk-rank-green{background:#173126!important;color:#78d8ae!important}
[data-theme="dark"] .risk-rank-yellow{background:#352917!important;color:#f4c66f!important}
[data-theme="dark"] .risk-rank-red{background:#351f20!important;color:#ff9a91!important}
[data-theme="dark"] .risk-count{background:#282238;color:#c3b3ff}
[data-theme="dark"] .risk-count.at-limit{background:#352719;color:#ffc47d}
[data-theme="dark"] .risk-count-green{background:#173126;color:#78d8ae}
[data-theme="dark"] .risk-count-yellow{background:#352917;color:#f4c66f}
[data-theme="dark"] .risk-count-red{background:#351f20;color:#ff9a91}
[data-theme="dark"] .risk-open-green{background:#173126;color:#78d8ae}
[data-theme="dark"] .risk-open-yellow{background:#352917;color:#f4c66f}
[data-theme="dark"] .risk-open-red{background:#351f20;color:#ff9a91}
[data-theme="dark"] .risk-row[data-risk-level="green"]{border-left-color:#55c99a;background:linear-gradient(105deg,#17271f,#14181d 34%)}
[data-theme="dark"] .risk-row[data-risk-level="yellow"]{border-left-color:#e6b24d;background:linear-gradient(105deg,#2b2418,#14181d 34%)}
[data-theme="dark"] .risk-row[data-risk-level="red"]{border-left-color:#e36a62;background:linear-gradient(105deg,#2c1b1b,#14181d 34%)}
[data-theme="dark"] .risk-summary-card{border-color:#633431;background:linear-gradient(130deg,#291a1a,#171719 80%);color:var(--ink)}
[data-theme="dark"] .risk-summary-card :is(h2,h3,strong,b){color:var(--title)}
[data-theme="dark"] .risk-summary-card :is(p,small,.muted){color:#b1b6bf}
[data-theme="dark"] .risk-record,[data-theme="dark"] .risk-month-detail{color:#e4e1db}
[data-theme="dark"] .risk-source-warning{border-color:#60452a;background:#2a2117;color:#ead0a8}
[data-theme="dark"] .risk-source-warning strong{color:#ffd18a}
[data-theme="dark"] .student-avatar{background:#30251b;color:#ffc47d}
[data-theme="dark"] .mark-cell.excused,[data-theme="dark"] .legend-dot.excused{border-color:#695328;background:#352917;color:#f4c66f}
[data-theme="dark"] .attendance-pair.active{border-color:#715034;background:#2a211a}
[data-theme="dark"] .notification-row-copy time{color:#aab2bd}
[data-theme="dark"] .student-row{border-color:#303741;background:#171b21;color:var(--ink)}
[data-theme="dark"] .student-row-roster:hover,[data-theme="dark"] .student-row-roster:focus-visible{border-color:#715034;background:#1b1d21;box-shadow:0 8px 22px #0005}
[data-theme="dark"] .student-status{border:1px solid #5d4326;background:#302416;color:#ffd08a}
[data-theme="dark"] .student-status.connected{border-color:#28523e;background:#173126;color:#82dfb5}
[data-theme="dark"] .invite-history-toolbar{border:1px solid var(--line);background:#171b21;color:#bdc4cd}
[data-theme="dark"] .invite-history-toolbar .text-button{border:1px solid #303741;background:#20252c;color:#e4e1db}
[data-theme="dark"] .brand-copy .member-chip,[data-theme="dark"] .brand-copy .owner-badge{border-color:#28523e;background:#173126;color:#82dfb5}
.theme-setting{display:grid;gap:12px;margin:14px 0;padding:15px;border:1px solid var(--line);border-radius:17px;background:var(--surface);box-shadow:var(--shadow)}.theme-setting-copy{display:grid;gap:4px}.theme-setting-copy strong{color:var(--title);font-size:13px}.theme-setting-copy small{color:var(--muted);font-size:10px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:4px;border:1px solid var(--line);border-radius:13px;background:var(--surface-soft)}.theme-options button{min-height:36px;padding:7px 8px;border-radius:10px;background:transparent;color:var(--muted);font-size:11px;font-weight:750;transition:background .16s ease,color .16s ease,box-shadow .16s ease}.theme-options button[aria-pressed="true"]{background:var(--surface);color:var(--accent-dark);box-shadow:0 2px 8px #1e293b12}.theme-options button:focus-visible{outline:3px solid #d9822b55;outline-offset:2px}

/* Темная тема: переопределяем светлые поверхности и их текст во всех разделах. */
[data-theme="dark"] .risk-filter-row,
[data-theme="dark"] .risk-detail-stats>span,
[data-theme="dark"] .schedule-change-card,
[data-theme="dark"] .attendance-mark-popover,
[data-theme="dark"] .attendance-quick-choice,
[data-theme="dark"] .invite-code,
[data-theme="dark"] .invite-link,
[data-theme="dark"] .student-open-button,
[data-theme="dark"] .member-chip-unknown,
[data-theme="dark"] .is-empty,
[data-theme="dark"] .owner-bind-button {
  border-color:#303741;
  background:#171b21;
  color:#e4e1db;
}
[data-theme="dark"] .risk-filter-row label { color:var(--title); }
[data-theme="dark"] .risk-filter-row select {
  border-color:#343c46;
  background:#101419;
  color:#f1f3f5;
  color-scheme:dark;
}
[data-theme="dark"] .risk-stats span {
  background:#222831;
  color:#b9c0ca;
}
[data-theme="dark"] .risk-stats b { color:#f1f3f5; }
[data-theme="dark"] .risk-open { background:#252b33; color:#ffc08a; }
[data-theme="dark"] .risk-row[data-risk-level="green"] .risk-stats span,
[data-theme="dark"] .risk-row[data-risk-level="green"] .risk-open { border:1px solid #28523e; background:#173126; color:#82dfb5; }
[data-theme="dark"] .risk-row[data-risk-level="green"] .risk-stats b { color:#a8f0ce; }
[data-theme="dark"] .risk-row[data-risk-level="yellow"] .risk-stats span,
[data-theme="dark"] .risk-row[data-risk-level="yellow"] .risk-open { border:1px solid #695328; background:#352917; color:#f4c66f; }
[data-theme="dark"] .risk-row[data-risk-level="yellow"] .risk-stats b { color:#ffe0a0; }
[data-theme="dark"] .risk-row[data-risk-level="red"] .risk-stats span,
[data-theme="dark"] .risk-row[data-risk-level="red"] .risk-open { border:1px solid #693632; background:#351f20; color:#ffaaa1; }
[data-theme="dark"] .risk-row[data-risk-level="red"] .risk-stats b { color:#ffd0cb; }
[data-theme="dark"] .schedule-day .lesson-card.is-replacement,
[data-theme="dark"] .schedule-day .lesson-card.is-added {
  border-color:#60452a;
  background:linear-gradient(135deg,#282118,#171b21 74%);
}
[data-theme="dark"] .schedule-day .lesson-card.is-room-change {
  border-color:#35485e;
  background:linear-gradient(135deg,#192536,#171b21 74%);
}
[data-theme="dark"] .schedule-change-card.is-added {
  border-color:#28523e;
  background:linear-gradient(135deg,#17271f,#171b21 76%);
}
[data-theme="dark"] .schedule-change-card.is-cancelled {
  border-color:#633431;
  background:linear-gradient(135deg,#2c1b1b,#171b21 76%);
}
[data-theme="dark"] .schedule-change-badge {
  border-color:#60452a;
  background:#302416;
  color:#ffd08a;
}
[data-theme="dark"] .schedule-change-badge.is-added {
  border-color:#28523e;
  background:#173126;
  color:#82dfb5;
}
[data-theme="dark"] .schedule-change-badge.is-cancelled {
  border-color:#633431;
  background:#351f20;
  color:#ffaaa1;
}
[data-theme="dark"] .schedule-change-badge.is-updated,
[data-theme="dark"] .schedule-change-badge.is-room-change {
  border-color:#35485e;
  background:#19283a;
  color:#a8c9ff;
}
[data-theme="dark"] .headman-badge {
  border-color:#60452a;
  background:#302416;
  color:#ffd08a;
}
[data-theme="dark"] .mark-cell:not(.present):not(.absent):not(.excused):not(.late):not(.no_response) {
  border-color:#343c46;
  background:#1b2027;
  color:#a1a6ae;
}
[data-theme="dark"] .mark-cell.from-poll::after {
  border-color:#171b21;
  background:#302416;
  color:#ffd08a;
}
[data-theme="dark"] .legend-dot.late {
  border-color:#695328;
  background:#352917;
  color:#f4c66f;
}
[data-theme="dark"] .legend-dot.no-response {
  border-color:#493e31;
  background:#28231d;
  color:#d8c5a8;
}
[data-theme="dark"] .legend-dot.poll-source {
  border-color:#60452a;
  background:#302416;
  color:#ffd08a;
}
[data-theme="dark"] .attendance-popover-close,
[data-theme="dark"] .attendance-clear-choice,
[data-theme="dark"] .attendance-extra-choice {
  border-color:#343c46;
  background:#20252c;
  color:#e4e1db;
}
[data-theme="dark"] .attendance-quick-choice span {
  background:#252b33;
  color:#c0c7d1;
}
[data-theme="dark"] .attendance-quick-choice.present span { background:#173126; color:#82dfb5; }
[data-theme="dark"] .attendance-quick-choice.absent span { background:#351f20; color:#ffaaa1; }
[data-theme="dark"] .attendance-quick-choice.excused span { background:#352917; color:#f4c66f; }
[data-theme="dark"] .attendance-quick-choice.present.selected { border-color:#367956; }
[data-theme="dark"] .attendance-quick-choice.absent.selected { border-color:#87413b; }
[data-theme="dark"] .attendance-quick-choice.excused.selected { border-color:#79602d; }
[data-theme="dark"] .attendance-extra-choice.late,
[data-theme="dark"] .attendance-extra-choice.late.selected { border-color:#695328; background:#352917; color:#f4c66f; }
[data-theme="dark"] .attendance-extra-choice.no_response,
[data-theme="dark"] .attendance-extra-choice.no_response.selected { border-color:#493e31; background:#28231d; color:#d8c5a8; }
[data-theme="dark"] .action-toast {
  border-color:#343c46;
  background:rgba(20,24,29,.97);
  color:#f1f3f5;
}
[data-theme="dark"] .action-toast-icon { background:#173126; color:#82dfb5; }
[data-theme="dark"] .action-toast.is-error .action-toast-icon { background:#351f20; color:#ffaaa1; }
[data-theme="dark"] .auth-symbol { border-color:#60452a; background:linear-gradient(145deg,#302416,#1b2027); color:#ffd08a; }
[data-theme="dark"] .auth-modal:before { opacity:.24; }
[data-theme="dark"] .skeleton { background:linear-gradient(90deg,#171b21,#222831,#171b21); }
[data-theme="dark"] .notification-loading-mark { background:#302416; color:#ffd08a; }
[data-theme="dark"] .invite-code { background:#211a16; color:#ffd08a; }
[data-theme="dark"] .invite-link { background:#101419; color:#d5dbe3; }
[data-theme="dark"] .member-chip-unknown { background:#302416; color:#ffd08a; }
[data-theme="dark"] .student-open-button { border-color:#60452a; background:#211a16; color:#ffc08a; }
[data-theme="dark"] .is-empty { background:#171b21; color:var(--muted); }
[data-theme="dark"] .owner-bind-button { border-color:#60452a; background:#211a16; color:#ffc08a; }
.attendance-refresh-button { transition: opacity .2s ease, transform .2s ease; }
.attendance-refresh-button:disabled { opacity: .72; cursor: wait; }
.attendance-refresh-button.is-loading svg { animation: starostahub-refresh-spin .8s linear infinite; }
@keyframes starostahub-refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .attendance-refresh-button.is-loading svg { animation-duration: 2.5s; } }
