/* Components: week colours, cards, rings, bars, tiles, quiz, modals, badges. */
.wk { --wl: color-mix(in srgb, var(--wc) 12%, var(--surface)); --wt: color-mix(in srgb, var(--wc) 85%, #000); }
@media (prefers-color-scheme: dark) { .wk { --wl: color-mix(in srgb, var(--wc) 30%, var(--surface)); --wt: #fff; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.hero { display: flex; align-items: center; gap: 12px; background: var(--wc); color: #fff; border-radius: 16px; padding: 16px; margin: 8px 0 12px; }
.hero .ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex: none; }
.hero .ic .icon { width: 26px; height: 26px; }
.hero small { opacity: 0.85; font-size: 12px; display: block; }
.hero strong { font-size: 18px; line-height: 1.25; }
.hero .btn { background: #fff; color: #222; margin-top: 10px; border: 0; }
.hero.block { display: block; }
.stats { display: flex; gap: 8px; margin: 12px 0; }
.stat { flex: 1; background: var(--surface2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 11px; color: var(--text2); }
.stat .icon { margin: 0 auto 2px; display: block; }
.bar { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--wc, var(--accent)); border-radius: 4px; transition: width .4s; }
.segs { display: flex; gap: 4px; }
.segs i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface2); }
.segs i.on { background: var(--wc); }
.ring { position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .lab { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; }
.ring .lab small { font-size: 11px; font-weight: 400; color: var(--text2); }
.wcard { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; min-height: 64px; }
.wcard .sq { width: 44px; height: 44px; border-radius: 12px; background: var(--wl); color: var(--wt); display: flex; align-items: center; justify-content: center; flex: none; }
.wcard .t { font-weight: 600; margin-bottom: 6px; }
.tile { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; text-decoration: none; color: inherit; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 12px; margin-bottom: 8px; min-height: 60px; cursor: pointer; }
.tile.now { border: 2px solid var(--wc); }
.tile .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--wl); color: var(--wt); display: flex; align-items: center; justify-content: center; flex: none; }
.tile.done .dot { background: var(--wc); color: #fff; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--wl); color: var(--wt); white-space: nowrap; }
.chip.solid { background: var(--wc); color: #fff; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; min-height: 52px; font-size: 16px; cursor: pointer; }
.opt .l { width: 30px; height: 30px; border-radius: 8px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }
.opt.sel { border: 2px solid var(--wc); background: var(--wl); }
.opt.sel .l { background: var(--wc); color: #fff; }
.opt.ok { border: 2px solid var(--good); background: var(--goodbg); }
.opt.ok .l { background: var(--good); color: var(--bg); }
.opt.bad { border: 2px solid var(--bad); background: var(--badbg); }
.opt.bad .l { background: var(--bad); color: var(--bg); }
.notice { border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.notice.good { background: var(--goodbg); color: var(--good); }
.notice.bad { background: var(--badbg); color: var(--bad); }
.notice.warn { background: var(--warnbg); color: var(--warn); }
.notice.info { background: var(--wl); color: var(--wt); }
.task { background: var(--wl); color: var(--wt); border-radius: 14px; padding: 12px; margin-bottom: 12px; font-size: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; margin-bottom: 8px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--wc); }
.video { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 8px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.linklist a { display: block; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; text-decoration: none; background: var(--surface); font-size: 15px; min-height: 48px; }
.badge { background: var(--wl); color: var(--wt); border-radius: 14px; padding: 12px; text-align: center; font-size: 13px; font-weight: 600; }
.badge.off { opacity: 0.45; filter: grayscale(1); }
.badge .c { width: 44px; height: 44px; border-radius: 50%; background: var(--wc); color: #fff; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.step { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; flex: none; color: var(--text3); }
.step.done .n { background: var(--wc); color: #fff; }
.step.now .n { background: var(--wl); color: var(--wt); border: 2px solid var(--wc); }
.scorebar { margin-bottom: 8px; }
.scorebar .top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 3px; }
.fab { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); color: var(--text2); font-size: 13px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.modal > div { background: var(--surface); width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 18px 16px 24px; max-height: 90vh; overflow: auto; }
.envbadge { position: fixed; left: 10px; bottom: 10px; z-index: 60; background: #BA7517; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 8px; font-weight: 600; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 72px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 120; max-width: 90vw; }
.grade-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.adm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm td, .adm th { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: left; }
.spinner { text-align: center; color: var(--text2); padding: 40px 0; }
