:root{--bg:#0a0a0a;--surface:#141414;--surface-2:#202020;--text:#f5f5f5;--muted:#a3a3a3;--border:#2a2a2a;--primary:#22c55e;--primary-ink:#052e16;--primary-soft:#14532d;--info:#60a5fa;--warn:#f59e0b;--danger:#f87171;--header:#000;--header-ink:#f5f5f5;--radius:14px;--shadow:none;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=light]{--bg:#f1f5f9;--surface:#fff;--surface-2:#f8fafc;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--info:#2563eb;--warn:#d97706;--danger:#dc2626;--header:#0f172a;--header-ink:#f8fafc;--shadow:0 1px 2px #0f172a0f, 0 4px 12px #0f172a0d;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}h1,h2,h3{margin:0;line-height:1.2}h2{font-size:1.3rem}h3{margin-bottom:8px;font-size:1.05rem}p{margin:0 0 8px}a{color:inherit;text-decoration:none}small{font-size:.82rem}.layout{flex-direction:column;min-height:100%;display:flex}.topbar{z-index:10;padding:calc(10px + var(--safe-top)) 14px 10px;background:var(--header);color:var(--header-ink);align-items:center;gap:10px;display:flex;position:sticky;top:0}.topbar h1{white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:1.1rem;overflow:hidden}.topbar-actions{align-items:center;gap:8px;display:flex}.brand-dot{background:var(--primary);border-radius:50%;width:10px;height:10px}.content{flex-direction:column;flex:1;gap:12px;width:100%;max-width:720px;margin:0 auto;padding:16px 16px 24px;display:flex}.layout.has-nav .content{padding-bottom:calc(84px + var(--safe-bottom))}.bottom-nav{z-index:10;background:var(--surface);border-top:1px solid var(--border);padding:6px 4px calc(6px + var(--safe-bottom));justify-content:space-around;display:flex;position:fixed;bottom:0;left:0;right:0}.bottom-nav a{color:var(--muted);border-radius:10px;flex-direction:column;flex:1;align-items:center;gap:2px;padding:4px 0;font-size:1.25rem;display:flex}.bottom-nav a small{font-size:.7rem}.bottom-nav a.active{color:var(--primary);background:var(--primary-soft)}.card,.subcard{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px}.subcard{background:var(--surface-2);box-shadow:none}.stack{flex-direction:column;gap:12px;display:flex}.row{align-items:center;display:flex}.row.between{justify-content:space-between}.row.center{justify-content:center}.gap{gap:10px}.grow{flex:1;min-width:0}.block{display:block}.mt{margin-top:8px}.mt-lg{margin-top:16px}.muted{color:var(--muted)}.center{text-align:center}.small{font-size:.8rem}.cap:first-letter{text-transform:uppercase}.danger-text{color:var(--danger)}.wrap{word-break:break-all;font-size:.8rem}.section{flex-direction:column;gap:8px;display:flex}label{color:var(--muted);flex-direction:column;gap:6px;font-size:.85rem;font-weight:500;display:flex}label.check{color:var(--text);flex-direction:row}fieldset{border:0;margin:0;padding:0}legend{color:var(--muted);margin-bottom:6px;font-size:.85rem;font-weight:500}input,select,textarea{font:inherit;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:10px;width:100%;padding:11px 12px;font-size:1rem}input[type=checkbox]{width:20px;height:20px;accent-color:var(--primary);flex:none}input[type=date],input[type=time]{appearance:none;min-width:0;max-width:100%;min-height:46px}input::-webkit-date-and-time-value{text-align:left;margin:0}input:focus,select:focus,textarea:focus{outline:2px solid var(--primary);outline-offset:0}.btn{font:inherit;cursor:pointer;background:var(--surface-2);color:var(--text);text-align:center;border:1px solid #0000;border-radius:12px;justify-content:center;align-items:center;gap:6px;padding:12px 16px;font-weight:600;display:inline-flex}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.primary{background:var(--primary);color:var(--primary-ink)}.btn.ghost{border-color:var(--border);background:0 0}.btn.ghost.light{color:#fff;background:#00000059;border-color:#fff6}.btn.danger,.btn.ghost.danger{color:var(--danger)}.btn.sm{border-radius:10px;padding:7px 12px;font-size:.85rem}.btn.xl{border-radius:16px;padding:18px;font-size:1.15rem}.btn.block{width:100%;display:flex}.link{color:var(--primary);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-weight:600}.icon-btn{color:inherit;cursor:pointer;background:0 0;border:0;padding:0 6px;font-size:1.6rem;line-height:1}.badge{color:var(--header-ink);white-space:nowrap;background:#ffffff1a;border-radius:999px;align-items:center;gap:6px;padding:4px 8px;font-size:.72rem;font-weight:600;display:inline-flex}.badge .dot{background:currentColor;border-radius:50%;width:7px;height:7px}.badge.ok .dot{background:#22c55e}.badge.warn .dot{background:#f59e0b}.badge.info .dot{background:#60a5fa}.badge.danger .dot{background:#ef4444}.badge.muted .dot{background:#94a3b8}.pill{background:var(--surface-2);color:var(--muted);border-radius:999px;padding:3px 8px;font-size:.72rem;font-weight:700}.pill.live{background:var(--primary);color:var(--primary-ink)}.pill.soon{color:#92400e;background:#fef3c7}.list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.list.scroll{max-height:45vh;overflow:auto}.list-item{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);align-items:center;gap:12px;padding:12px 14px;display:flex}.list-item.inactive{opacity:.55}.chev{color:var(--muted);font-size:1.4rem}.num{background:var(--primary-soft);width:26px;height:26px;color:var(--primary);border-radius:50%;flex:none;place-items:center;font-size:.8rem;font-weight:700;display:grid}.avatar{background:var(--primary-soft);width:38px;height:38px;color:var(--primary);border-radius:50%;flex:none;place-items:center;font-weight:700;display:grid}.class-time{flex-direction:column;align-items:center;min-width:52px;display:flex}.class-time strong{font-size:1.1rem}.class-time small{color:var(--muted)}.class-card{background:var(--surface);border:1px solid var(--border);border-left:5px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);gap:12px;padding:14px;display:flex}.class-card.status-live{border-left-color:var(--primary)}.class-card.status-soon{border-left-color:var(--warn)}.class-card.status-past{opacity:.7}.date-chip{background:var(--surface-2);border-radius:10px;flex-direction:column;align-items:center;min-width:44px;padding:4px;display:flex}.date-chip strong{font-size:1.15rem}.date-chip small{color:var(--muted);text-transform:uppercase;font-size:.65rem}.empty{text-align:center;color:var(--muted);flex-direction:column;align-items:center;gap:12px;padding:32px 12px;display:flex}.notice{background:var(--surface-2);border:1px dashed var(--border);color:var(--muted);border-radius:12px;padding:12px}.greeting{padding:4px 2px}.stats{grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:8px;display:grid}.stats>div{background:var(--surface);border:1px solid var(--border);text-align:center;border-radius:12px;flex-direction:column;padding:10px;display:flex}.stats strong{font-size:1.35rem}.stats small{color:var(--muted)}.days{flex-wrap:wrap;gap:6px;display:flex}.day{border:1px solid var(--border);background:var(--surface-2);width:42px;height:42px;color:var(--text);cursor:pointer;border-radius:50%;font-weight:700}.day.on{background:var(--primary);color:var(--primary-ink);border-color:var(--primary)}.segmented{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;gap:4px;padding:4px;display:flex}.segmented button{font:inherit;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:9px;flex:1;padding:10px;font-weight:600}.segmented button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.welcome{max-width:480px;min-height:100%;padding:calc(40px + var(--safe-top)) 20px 32px;flex-direction:column;gap:28px;margin:0 auto;display:flex}.welcome-hero{text-align:center;flex-direction:column;align-items:center;gap:10px;display:flex}.welcome-hero h1{font-size:2rem}.welcome-hero p{color:var(--muted)}.logo{background:var(--primary);width:72px;height:72px;color:var(--primary-ink);border-radius:22px;place-items:center;font-size:2.4rem;font-weight:900;display:grid}.mode-card{text-align:left;background:var(--surface);width:100%;color:var(--text);border:1px solid var(--border);font:inherit;cursor:pointer;box-shadow:var(--shadow);border-radius:18px;align-items:center;gap:16px;padding:18px;display:flex}.mode-card:hover{border-color:var(--primary)}.mode-card strong{font-size:1.1rem;display:block}.mode-card small{color:var(--muted)}.mode-icon{font-size:2.2rem}.small-links{color:var(--muted);flex-wrap:wrap;font-size:.85rem}.small-links .link{font-size:.85rem}.qr-card{background:var(--surface);text-align:center;box-shadow:var(--shadow);border:1px solid var(--border);border-radius:22px;flex-direction:column;align-items:center;gap:14px;padding:24px 16px;display:flex}.qr{background:#fff;border-radius:16px;padding:6px}.qr svg{width:100%;height:100%;display:block}.code{letter-spacing:2px;font-family:ui-monospace,monospace;font-weight:700}.session-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.counter{flex-direction:column;align-items:center;min-width:64px;display:flex}.counter strong{color:var(--primary);font-size:2rem;line-height:1}.counter small{color:var(--muted)}.counter.sm{flex-direction:row;align-items:baseline;gap:2px;min-width:0}.counter.sm strong{font-size:1.3rem}.toast{border-radius:12px;padding:12px 14px;font-weight:600;animation:.2s ease-out pop}.toast.ok{background:var(--primary);color:var(--primary-ink)}.toast.warn{color:#1f1300;background:#f59e0b}.toast.error{background:var(--danger);color:#fff}@keyframes pop{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:none}}.scanner{z-index:50;background:#000;position:fixed;inset:0}.scanner video{object-fit:cover;width:100%;height:100%}.scanner-top{padding:calc(12px + var(--safe-top)) 12px 12px;justify-content:space-between;display:flex;position:absolute;top:0;left:0;right:0}.scanner-error{background:var(--surface);color:var(--text);text-align:center;border-radius:12px;padding:16px;position:absolute;top:40%;left:16px;right:16px}.scanner-bottom{padding:12px 12px calc(16px + var(--safe-bottom));position:absolute;bottom:0;left:0;right:0}.scan-panel{background:var(--surface);color:var(--text);border-radius:16px;flex-direction:column;gap:10px;padding:14px;display:flex}.sheet-backdrop{z-index:40;background:#00000073;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;max-width:720px;padding:16px 16px calc(16px + var(--safe-bottom));border-radius:20px 20px 0 0;flex-direction:column;gap:12px;max-height:85vh;display:flex}.search{margin-bottom:4px}.center-sheet{align-items:center;padding:16px}.dialog{background:var(--surface);width:100%;max-width:420px;color:var(--text);border-radius:18px;flex-direction:column;gap:14px;padding:18px;display:flex;box-shadow:0 10px 40px #00000040}.dialog p{margin:0;font-size:1rem;line-height:1.4}.btn.danger-solid{background:var(--danger);color:#fff}.file-btn{position:relative;overflow:hidden}.file-btn input{opacity:0;cursor:pointer;position:absolute;inset:0}.date-range{background:var(--surface);border:1px solid var(--border);border-radius:14px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:8px;padding:12px;display:grid}.date-range label{min-width:0;color:var(--text);font-weight:700}.date-arrow{color:var(--primary);padding-bottom:12px;font-size:1.1rem;font-weight:800}.class-row{align-items:center;gap:6px;display:flex}.class-row .list-item{min-width:0}.copy-btn{flex:none;text-decoration:none}.time-pills{flex-wrap:wrap;gap:6px;display:flex}.image-picker{align-items:center;gap:12px;display:flex}.picked{object-fit:cover;border-radius:14px;flex:none;width:72px;height:72px}.picked.round,.thumb.round{border-radius:50%}.empty-pic{background:var(--surface-2);border:1px dashed var(--border);place-items:center;font-size:1.8rem;display:grid}.thumb{object-fit:cover;border-radius:10px;flex:none;width:40px;height:40px}.thumb.lg{width:56px;height:56px}.brand-plate{background:#fff;border-radius:18px;padding:10px 18px}.brand-plate img{width:190px;max-width:60vw;height:auto;display:block}.subcard input:not([type=checkbox]),.subcard select{background:var(--surface)}.subcard .pill{background:var(--primary-soft);color:var(--primary)}html{-webkit-text-size-adjust:100%}.layout{min-height:100dvh}.topbar{padding-left:max(14px, env(safe-area-inset-left));padding-right:max(14px, env(safe-area-inset-right))}.content{padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right))}.bottom-nav{padding-left:max(4px, env(safe-area-inset-left));padding-right:max(4px, env(safe-area-inset-right))}.sheet{max-height:85dvh}@media (width<=359px){.date-range{grid-template-columns:minmax(0,1fr)}.date-arrow{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (orientation:landscape) and (height<=500px){.welcome{gap:14px;padding-top:16px}.bottom-nav{padding-top:2px;padding-bottom:calc(2px + var(--safe-bottom))}.bottom-nav a{flex-direction:row;justify-content:center;gap:6px;padding:2px 0;font-size:1rem}.layout.has-nav .content{padding-bottom:calc(52px + var(--safe-bottom))}.sheet{max-height:92dvh}.scanner-bottom{max-width:60%;padding-top:6px;padding-bottom:calc(6px + var(--safe-bottom));margin:0 auto}}@media (width>=768px){.content{gap:16px;max-width:920px;padding:24px 24px 32px}.layout.has-nav .content{padding-bottom:calc(92px + var(--safe-bottom))}.content>form.card,.content>.session-head,.content>.stack{width:100%;max-width:640px;margin-left:auto;margin-right:auto}.list:not(.scroll){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.list:not(.scroll) .list-item{height:100%}.stats{grid-template-columns:repeat(4,minmax(0,1fr))}.bottom-nav{justify-content:center;gap:12px}.bottom-nav a{flex:0 130px}.scan-panel{max-width:560px;margin:0 auto}.sheet{border-radius:20px;max-width:600px;margin-bottom:24px}.welcome{justify-content:center}}@media (width>=1024px) and (orientation:landscape){.layout.has-nav{padding-left:calc(96px + env(safe-area-inset-left))}.layout.has-nav .content{padding-bottom:32px}.bottom-nav{width:calc(96px + env(safe-area-inset-left));border-top:0;border-right:1px solid var(--border);padding:calc(14px + var(--safe-top)) 8px calc(14px + var(--safe-bottom)) max(8px, env(safe-area-inset-left));flex-direction:column;justify-content:flex-start;gap:6px;top:0;bottom:0;right:auto}.bottom-nav a{flex:none;padding:10px 0}}.topbar .icon-btn{place-items:center;min-width:44px;min-height:44px;margin:-10px -6px -10px -12px;display:inline-grid}.copy-btn,.sheet .icon-btn{place-items:center;min-width:44px;min-height:44px;display:inline-grid}.btn.sm{min-height:40px}.topbar .badge{position:relative}.topbar .badge:after{content:"";position:absolute;inset:-11px -4px}@media (orientation:landscape) and (height<=500px){.bottom-nav a{align-items:center;min-height:40px}}.class-time{flex-direction:row;flex:none;gap:8px;min-width:0}.class-time-text{white-space:nowrap;flex-direction:column;min-width:76px;display:flex}.time-icon{font-size:1.3rem;line-height:1}.day-sep{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;align-items:center;gap:10px;margin:6px 0 0;font-size:.85rem;display:flex}.day-sep:after{content:"";background:var(--border);flex:1;height:1px}.day-sep.live{color:var(--primary)}.day-sep.live:before{content:"";background:var(--primary);border-radius:50%;width:10px;height:10px}.period-nav{text-align:center;justify-content:space-between;align-items:center;gap:8px;display:flex}.period-nav .icon-btn{min-width:44px;min-height:44px;color:var(--text);font-size:1.4rem}.period-nav .icon-btn:disabled{opacity:.3}.podium{grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:8px;padding-top:8px;display:grid}.podium-slot{flex-direction:column;align-items:center;gap:6px;min-width:0;display:flex}.podium-avatar{background:var(--surface-2);border:3px solid var(--primary);border-radius:50%;place-items:center;width:56px;height:56px;font-size:1.4rem;font-weight:800;display:grid}.place-1 .podium-avatar{border-color:#fbbf24;width:68px;height:68px}.place-2 .podium-avatar{border-color:#cbd5e1}.place-3 .podium-avatar{border-color:#d97706}.podium-name{text-align:center;overflow-wrap:anywhere;width:100%;font-size:.85rem}.podium-block{background:var(--primary-soft);border-radius:12px 12px 0 0;flex-direction:column;justify-content:flex-start;align-items:center;gap:4px;width:100%;padding-top:10px;font-size:1.6rem;display:flex}.podium-block small{color:var(--text);font-size:.9rem;font-weight:700}.place-1 .podium-block{min-height:120px}.place-2 .podium-block{min-height:92px}.place-3 .podium-block{min-height:72px}.list.single{grid-template-columns:minmax(0,1fr)}.ranking-preview{object-fit:contain;border-radius:12px;width:100%;max-height:60dvh}.avatar.has-photo,.podium-avatar.has-photo{object-fit:cover;padding:0}.avatar.large{width:96px;height:96px;font-size:2.2rem}.center-photo{justify-content:center;display:flex}.toast.with-photo{align-items:center;gap:10px;display:flex}.toast.with-photo img{object-fit:cover;border-radius:12px;flex:none;width:64px;height:64px}.nav-icon{display:inline-block;position:relative}.unread-count{background:var(--danger);color:#fff;text-align:center;border-radius:9px;min-width:18px;height:18px;padding:0 4px;font-size:.68rem;font-weight:800;line-height:18px;position:absolute;top:-4px;right:-12px}.message-banner{border-radius:var(--radius);background:var(--surface);border:2px solid var(--warn);flex-direction:column;gap:6px;padding:14px;display:flex}.message-banner header{justify-content:space-between;align-items:center;gap:8px;font-weight:800;display:flex}.message-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:1.02rem}.message-card{flex-direction:column;gap:4px;display:flex}.template-chips{flex-wrap:wrap;gap:6px;display:flex}.template-chips button{border:1px solid var(--border);background:var(--surface-2);color:var(--text);min-height:40px;font:inherit;cursor:pointer;border-radius:999px;padding:9px 12px;font-size:.85rem}.compose textarea{resize:vertical;min-height:96px}.icon-grid{grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:6px;display:grid}.icon-grid button{border:1px solid var(--border);background:var(--surface-2);min-height:60px;color:var(--text);font:inherit;cursor:pointer;border-radius:12px;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;font-size:1.4rem;display:flex}.icon-grid button small{color:var(--muted);font-size:.68rem}.icon-grid button.on{border-color:var(--primary);background:var(--primary-soft)}.icon-grid button.on small{color:var(--text)}.subscriber{color:var(--text);cursor:pointer;flex-direction:row;font-size:1rem}.subscriber input{flex:none}.class-hero{align-items:center;gap:12px;display:flex}.class-hero-icon{flex:none;font-size:2.4rem;line-height:1}.big-icon{flex:none;font-size:1.8rem;line-height:1}.week-bars{border-bottom:1px solid var(--border);grid-template-columns:repeat(8,minmax(0,1fr));align-items:end;gap:2px;height:110px;display:grid}.week-bar{flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;height:100%;display:flex}.week-bar i{background:var(--primary);border-radius:4px 4px 0 0;width:min(100%,22px);display:block}.week-bar small{color:var(--text);font-size:.75rem;font-weight:700}.week-axis{color:var(--muted);justify-content:space-between;margin-top:4px;font-size:.72rem;display:flex}.welcome{min-height:100dvh;padding-bottom:calc(20px + var(--safe-bottom))}.app-icon{border-radius:26px;width:112px;height:112px;box-shadow:0 8px 28px #22c55e40}.powered-by{text-align:center;letter-spacing:.04em;color:var(--muted);opacity:.6;margin:auto 0 0;padding-top:16px;font-size:.78rem}.palette-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;display:grid}.palette-grid button{border:2px solid var(--border);cursor:pointer;border-radius:12px;height:56px;position:relative}.palette-grid button.on{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary)}.palette-grid i{border-radius:50%;width:14px;height:14px;position:absolute;bottom:8px;right:8px}.palette-custom{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px;display:grid}.palette-custom input{height:44px;padding:4px}.palette-preview{text-align:center;border-radius:12px;flex-direction:column;align-items:center;gap:4px;margin-top:10px;padding:16px 12px;display:flex}.palette-preview small{border-radius:8px;margin-top:4px;padding:6px 12px}.mode-icon{background:var(--primary-soft);width:60px;height:60px;color:var(--primary);border-radius:16px;flex:none;place-items:center;display:grid}.empty-pic{color:var(--primary)}.segmented button{justify-content:center;align-items:center;gap:8px;display:inline-flex}.birthday-day{flex:0 0 96px}.birthday-card{text-align:center;align-items:center}.birthday-emoji{font-size:4rem;line-height:1;animation:.4s ease-out pop}.birthday-today{border:2px solid var(--primary);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}
