/* ===== Tokens ===== */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 12px; --r-sm: 9px; --r-xs: 6px;
  --accent: #3157e3; --accent-soft: rgba(49,87,227,.1);
  --ok: #16a34a; --ok-soft: rgba(22,163,74,.12); --warn: #d97706; --warn-soft: rgba(217,119,6,.12); --bad: #dc2626; --bad-soft: rgba(220,38,38,.1);
  --c1: #3157e3; --c2: #e07b00; --c3: #16a34a; --c4: #dc2626; --c5: #7c3aed;
  --ease: cubic-bezier(.2,.7,.2,1);
  --nav-h: 60px; --side-w: 224px;
  color-scheme: light dark;
}
:root, :root[data-theme="light"] {
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #f2f2f4; --surface-3: #e9e9ee;
  --border: #e4e4e9; --border-2: #d2d3db;
  --text: #16181d; --text-2: #474b57; --text-muted: #7a7f8e;
  --primary: #16181d; --primary-text: #ffffff;
  --shadow: 0 1px 2px rgba(16,18,29,.05); --shadow-lg: 0 16px 40px -16px rgba(16,18,29,.3);
}
:root[data-theme="dark"] {
  --bg: #0f1012; --surface: #17191d; --surface-2: #1e2127; --surface-3: #262a31;
  --border: #272a31; --border-2: #363a44;
  --text: #ececef; --text-2: #b5b9c4; --text-muted: #7f8493;
  --primary: #ececef; --primary-text: #16181d;
  --accent: #5b7cff; --accent-soft: rgba(91,124,255,.14);
  --shadow: none; --shadow-lg: 0 16px 40px -16px rgba(0,0,0,.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012; --surface: #17191d; --surface-2: #1e2127; --surface-3: #262a31;
    --border: #272a31; --border-2: #363a44;
    --text: #ececef; --text-2: #b5b9c4; --text-muted: #7f8493;
    --primary: #ececef; --primary-text: #16181d;
    --accent: #5b7cff; --accent-soft: rgba(91,124,255,.14);
    --shadow: none; --shadow-lg: 0 16px 40px -16px rgba(0,0,0,.7);
  }
}

/* ===== Basis ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
mark { background: #fde68a; color: #1a1a1a; padding: 0 .15em; border-radius: 3px; }
:root[data-theme="dark"] mark { background: #8a6d12; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) mark { background: #8a6d12; color: #fff; } }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--surface-2); padding: .8em 1em; border-radius: var(--r-sm); overflow: auto; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; margin: .6em 0; font-size: .95em; }
th, td { border: 1px solid var(--border); padding: .45em .6em; text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
blockquote { margin: .7em 0; padding: .6em .9em; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.ico { vertical-align: middle; flex: none; }

.boot { height: 100vh; display: grid; place-items: center; color: var(--text-muted); }

/* ===== Layout ===== */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; padding: 6px 10px 16px; letter-spacing: -.01em; }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-weight: 500; font-size: .93rem; transition: background .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-3); color: var(--text); }
.nav-item .cnt { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.sidebar .spacer { flex: 1; }
.sidebar .mini { font-size: .8rem; color: var(--text-muted); padding: 8px 10px; }

.main { min-width: 0; padding: 20px 28px 56px; max-width: 1120px; width: 100%; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topbar h1 { margin: 0; }
.bottomnav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: calc(8px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
  .topbar { margin: 0 -16px 10px; padding: 6px 16px; position: sticky; top: 0; z-index: 45; background: var(--bg); }
  .topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: env(safe-area-inset-top); background: var(--bg); }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); z-index: 50; }
  .bottomnav button { flex: 1; border: 0; background: none; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 500; padding: 6px 0; position: relative; }
  .bottomnav button.active { color: var(--accent); }
  .bottomnav button .ico { transition: transform .25s var(--ease); }
  .bottomnav button.active .ico { transform: translateY(-2px) scale(1.12); }
  .bottomnav button::after { content: ""; position: absolute; top: 0; width: 24px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
  .bottomnav button.active::after { transform: scaleX(1); }
  .bottomnav .cnt { position: absolute; top: 5px; left: calc(50% + 6px); font-size: .62rem; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 5px; min-width: 16px; text-align: center; }
  body.focus .bottomnav { display: none; }
  body.focus .main { padding-bottom: 120px; }
}

/* ===== Komponenten ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.card.pad-sm { padding: 12px 14px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-title h2, .card-title h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .grid-4.keep2, .grid-2.keep2 { grid-template-columns: 1fr 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-muted); } .small { font-size: .875rem; } .tiny { font-size: .76rem; } .bold { font-weight: 600; } .center { text-align: center; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; } .mt-sm { margin-top: 8px; } .mb-sm { margin-bottom: 8px; }
.stack > * + * { margin-top: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 550; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn.primary:hover { opacity: .9; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.sm { padding: 6px 10px; font-size: .84rem; border-radius: var(--r-xs); }
.btn.lg { padding: 13px 20px; font-size: 1rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.icon { padding: 7px; width: 36px; height: 36px; }
.kbd { font-family: var(--mono); font-size: .68rem; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border-2); color: var(--text-muted); background: var(--surface-2); }
.btn.primary .kbd { border-color: rgba(255,255,255,.3); color: inherit; background: rgba(255,255,255,.12); }
:root[data-theme="dark"] .btn.primary .kbd, @media (prefers-color-scheme: dark) { .btn.primary .kbd { border-color: rgba(0,0,0,.25); background: rgba(0,0,0,.08); } }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); line-height: 1.5; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: .95rem; }
.avatar.sm { width: 26px; height: 26px; border-radius: 7px; font-size: .8rem; }

.input, .select, .textarea { width: 100%; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 90px; resize: vertical; }
.textarea.mono { font-family: var(--mono); font-size: .88rem; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .8rem; color: var(--text-muted); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
input[type="range"] { accent-color: var(--accent); }

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s var(--ease); }
.progress.ok > i { background: var(--ok); }

.ring { position: relative; width: 92px; height: 92px; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: var(--accent); transition: stroke-dashoffset .8s var(--ease); }
.ring .label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 650; font-size: 1rem; text-align: center; line-height: 1.1; }
.ring .label small { font-size: .62rem; color: var(--text-muted); font-weight: 600; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 1.45rem; font-weight: 650; letter-spacing: -.02em; }
.stat .l { font-size: .76rem; color: var(--text-muted); font-weight: 600; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .title { font-weight: 550; }
.list-item .sub { font-size: .82rem; color: var(--text-muted); }
.list-item.clickable { cursor: pointer; border-radius: var(--r-xs); }
.list-item.clickable:hover { background: var(--surface-2); }

.empty { text-align: center; color: var(--text-muted); padding: 28px 10px; }
.empty .big { margin-bottom: 8px; color: var(--text-muted); }

.tabs { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r-sm); width: fit-content; max-width: 100%; overflow: auto; }
.tabs button { border: 0; background: none; color: var(--text-muted); padding: 7px 13px; border-radius: 7px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); font-size: .84rem; font-weight: 550; cursor: pointer; }
.chip.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10,12,20,.5); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; padding: 20px; box-shadow: var(--shadow-lg); animation: pop .2s var(--ease); }
.modal.wide { max-width: 960px; }
.modal.full { max-width: 1040px; height: 92vh; display: flex; flex-direction: column; }
.modal .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.modal .modal-head h2 { margin: 0; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@media (max-width: 640px) { .modal-bg { padding: 0; align-items: end; } .modal { border-radius: 16px 16px 0 0; max-height: 94vh; padding: 16px; } .modal.full { height: 94vh; } }

/* Toasts, XP, Konfetti */
.toasts { position: fixed; top: 12px; right: 12px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--primary); color: var(--primary-text); padding: 10px 14px; border-radius: 10px; animation: slideIn .25s var(--ease); max-width: 340px; pointer-events: auto; font-weight: 500; font-size: .92rem; }
.toast.ok { background: var(--ok); color: #fff; } .toast.bad { background: var(--bad); color: #fff; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
@media (max-width: 640px) { .toasts { left: 12px; right: 12px; } .toast { max-width: none; } }
.xp-pop { position: fixed; left: 50%; top: 38%; transform: translateX(-50%); font-weight: 700; font-size: 1.2rem; color: var(--ok); animation: xp 1s var(--ease) forwards; pointer-events: none; z-index: 300; }
@keyframes xp { 0% { opacity: 0; transform: translate(-50%, 8px) } 20% { opacity: 1; transform: translate(-50%, 0) } 100% { opacity: 0; transform: translate(-50%, -50px) } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 250; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 7px; height: 11px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .5; } }

/* ===== Dashboard ===== */
.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.hero h1 { font-size: 1.35rem; margin-bottom: 2px; }
.hero .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hero .streak { display: flex; align-items: center; gap: 10px; padding-left: 20px; border-left: 1px solid var(--border); }
.hero .streak .n { font-size: 1.5rem; font-weight: 650; line-height: 1; }
@media (max-width: 640px) { .hero { grid-template-columns: auto 1fr; } .hero .streak { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 12px; } }
.subject-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s; }
.subject-card:hover { border-color: var(--border-2); }
.subject-card .head { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.subject-card .nums { display: flex; gap: 16px; }
.subject-card .nums b { font-size: 1.2rem; display: block; line-height: 1.1; font-weight: 650; }
.subject-card .nums span { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.prep { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--warn); }
.weekbar { display: flex; gap: 6px; align-items: flex-end; height: 64px; }
.weekbar > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .7rem; color: var(--text-muted); height: 100%; justify-content: flex-end; }
.weekbar i { display: block; width: 100%; max-width: 30px; border-radius: 4px 4px 2px 2px; background: var(--accent); min-height: 3px; opacity: .85; }
.weekbar .today i { background: var(--warn); }

/* ===== Lernen ===== */
.review { max-width: 720px; margin: 0 auto; }
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.review-top .progress { flex: 1; }
.review-counts { display: flex; gap: 4px; font-size: .76rem; font-weight: 600; }
.review-counts span { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); }
.flashcard .face { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 20px 18px; min-height: 260px; display: flex; flex-direction: column; animation: cardIn .25s var(--ease); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.flashcard .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: .78rem; color: var(--text-muted); gap: 8px; flex-wrap: wrap; }
.flashcard .meta .row { flex-wrap: nowrap; gap: 6px; }
.flashcard .front, .flashcard .back { overflow-wrap: anywhere; min-width: 0; }
.flashcard .face { min-width: 0; }
.doc, .rich { min-width: 0; overflow-wrap: anywhere; }
.flashcard .front { font-size: 1.12rem; line-height: 1.55; }
.flashcard .front p:last-child { margin-bottom: 0; }
.flashcard .divider { height: 1px; background: var(--border); margin: 16px 0; }
.flashcard .back { font-size: 1rem; animation: reveal .25s var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.flashcard .hint { margin-top: 10px; font-size: .9rem; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.flashcard .hint .ico { color: var(--warn); margin-top: 2px; }
.flashcard .actions { margin-top: auto; padding-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.cloze { display: inline-block; padding: 0 .35em; border-radius: 5px; border-bottom: 2px solid var(--accent); min-width: 2.2em; text-align: center; }
.cloze-hide { color: var(--text-muted); background: var(--accent-soft); }
.cloze-show { background: var(--ok-soft); font-weight: 600; animation: pop .25s var(--ease); }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.rate button { border: 1px solid var(--border-2); border-radius: 11px; padding: 10px 4px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.rate button b { font-size: .92rem; font-weight: 600; } .rate button small { color: var(--text-muted); font-size: .7rem; }
.rate .r1 b { color: var(--bad); } .rate .r2 b { color: var(--warn); } .rate .r3 b { color: var(--ok); } .rate .r4 b { color: var(--accent); }
.rate button.suggest { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
@media (max-width: 900px) { .rate.sticky { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0; z-index: 40; background: var(--surface); padding: 8px; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); } .rate.sticky button { background: var(--surface-2); border-color: transparent; } .actions.sticky { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; margin: 0; padding: 0; } }
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.opt:hover { border-color: var(--text-muted); }
.opt .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); flex: none; margin-top: 2px; display: grid; place-items: center; font-size: .72rem; }
.opt.selected { border-color: var(--text); } .opt.selected .box { background: var(--text); border-color: var(--text); color: var(--surface); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); } .opt.correct .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); animation: shake .35s; } .opt.wrong .box { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.missed { border-color: var(--ok); border-style: dashed; }
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }
.answer-row { display: flex; gap: 8px; margin-top: 10px; }
.answer-row .input { font-size: 1.05rem; }
.answer-row .unit { display: flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.result { margin-top: 12px; padding: 10px 13px; border-radius: 10px; font-weight: 600; animation: reveal .25s var(--ease); display: flex; gap: 8px; align-items: flex-start; }
.result.ok { background: var(--ok-soft); color: var(--ok); } .result.bad { background: var(--bad-soft); color: var(--bad); }
.summary { text-align: center; padding: 28px 18px; }
.summary .nums { display: flex; justify-content: center; gap: 28px; margin: 16px 0; }

/* ===== Üben ===== */
.mode-card { cursor: pointer; display: flex; gap: 14px; align-items: flex-start; transition: border-color .15s; }
.mode-card:hover { border-color: var(--border-2); }
.mode-card .mico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.exercise { max-width: 720px; margin: 0 auto; }
.exercise .task { font-size: 1.45rem; text-align: center; padding: 22px 10px; }
.steps { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.step { padding: 8px 12px; border-radius: 9px; background: var(--surface-2); animation: stepIn .3s var(--ease) both; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.step .why { color: var(--text-muted); font-size: .84rem; margin-left: auto; }
@keyframes stepIn { from { opacity: 0; transform: translateX(-6px) } to { opacity: 1; transform: none } }

/* ===== Plan ===== */
.day-group { margin-bottom: 16px; }
.day-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 6px; }
.day-group.today h3 { color: var(--warn); }
.event { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 6px; border-left: 3px solid var(--sc, var(--accent)); }
.event .time { font-family: var(--mono); font-size: .82rem; color: var(--text-muted); width: 42px; }
.task-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: 0; }
.task-item .cb { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--border-2); cursor: pointer; flex: none; margin-top: 2px; display: grid; place-items: center; }
.task-item .cb:hover { border-color: var(--ok); }
.task-item.done .cb { background: var(--ok); border-color: var(--ok); color: #fff; }
.task-item.done .title { text-decoration: line-through; color: var(--text-muted); }
.task-item .title { font-weight: 550; }
.task-item .meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.overdue { color: var(--bad); font-weight: 600; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-grid .day { background: var(--surface-2); border-radius: 9px; padding: 6px; min-height: 76px; font-size: .74rem; }
.week-grid .day b { display: block; color: var(--text-muted); margin-bottom: 4px; }
.week-grid .ev { padding: 3px 6px; border-radius: 5px; margin-bottom: 3px; color: #fff; background: var(--sc); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-grid { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 760px) { .week-card { display: none; } .plan-grid { grid-template-columns: 1fr; } }

/* ===== Stapel / Karten ===== */
.decks-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; }
.decks-back { display: none; margin-bottom: 8px; }
@media (max-width: 900px) {
  .decks-layout { grid-template-columns: 1fr; }
  .decks-layout.has-sel .decks-list { display: none; }
  .decks-layout:not(.has-sel) .decks-panel { display: none; }
  .decks-back { display: inline-flex; }
}
.decks-layout > * { min-width: 0; }
.deck-row .counts { flex: none; }
.deck-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--border); }
.deck-row:last-child { border-bottom: 0; }
.deck-row .name { font-weight: 550; flex: 1; min-width: 0; cursor: pointer; }
.deck-row .counts { display: flex; gap: 10px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.deck-row .counts span { min-width: 26px; text-align: right; }
.c-new { color: var(--accent); } .c-due { color: var(--warn); } .c-total { color: var(--text-muted); }
.deck-row.active { background: var(--surface-2); border-radius: var(--r-xs); }
.card-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.card-row:hover { background: var(--surface-2); }
.card-row .front { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-row .front p { margin: 0; display: inline; }
.preview-box { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px; min-height: 60px; }
.cards-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.cards-toolbar .input { max-width: 240px; }

/* ===== Themen / Material ===== */
.topic { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; transition: border-color .15s; }
.topic:hover { border-color: var(--border-2); }
.doc { line-height: 1.65; font-size: 1rem; max-width: 780px; margin: 0 auto; }
.doc h1 { font-size: 1.5rem; margin-bottom: .6em; } .doc h3 { margin-top: 1.5em; padding-top: .3em; } .doc h2 { margin-top: 1.4em; }
.doc img { max-width: 100%; border-radius: 10px; }
.viewer { flex: 1; min-height: 0; border: 0; border-radius: 10px; width: 100%; background: #fff; }
.material { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.material:hover { border-color: var(--border-2); }
.material .mico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); flex: none; color: var(--text-2); }

/* ===== Import ===== */
.drop { border: 1.5px dashed var(--border-2); border-radius: 14px; padding: 30px 20px; text-align: center; cursor: pointer; background: var(--surface); color: var(--text-2); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }

/* ===== Statistik ===== */
.heatmap { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; gap: 3px; overflow: auto; padding-bottom: 6px; }
.heatmap i { width: 11px; height: 11px; border-radius: 2px; background: var(--surface-3); }
.heatmap .l1 { background: rgba(49,87,227,.3); } .heatmap .l2 { background: rgba(49,87,227,.55); } .heatmap .l3 { background: rgba(49,87,227,.8); } .heatmap .l4 { background: var(--accent); }
.achievement { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.achievement.locked { opacity: .4; }
.achievement .aico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars i { display: block; border-radius: 3px 3px 1px 1px; background: var(--accent); min-height: 2px; }
.bars i.c { background: var(--ok); }
.legend { display: flex; gap: 12px; font-size: .76rem; color: var(--text-muted); flex-wrap: wrap; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.stackbar i { display: block; height: 100%; }

/* ===== Login ===== */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login .logo { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; margin-bottom: 14px; }

/* Benachrichtigungen */
.notif-panel { position: absolute; right: 0; top: 44px; width: 340px; max-width: calc(100vw - 32px); z-index: 90; max-height: 70vh; overflow: auto; }
.notif { padding: 10px 6px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif.unread { background: var(--accent-soft); }
.notif .t { font-weight: 600; } .notif .b { font-size: .85rem; color: var(--text-2); } .notif .d { font-size: .72rem; color: var(--text-muted); }
.rel { position: relative; }
.badge-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.fade-in { animation: fade .2s; }

/* Rich text */
.rich img { max-width: 100%; }
.rich p:last-child { margin-bottom: 0; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; margin: .6em 0; }
.katex { font-size: 1.04em; }

/* ===== Widgets ===== */
.w { margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.w-title { font-weight: 600; font-size: .9rem; margin-bottom: 8px; color: var(--text-2); }
.w-svg { width: 100%; height: auto; display: block; touch-action: none; user-select: none; }
.w-svg text { font-family: var(--font); font-size: 11px; fill: var(--text-2); }
.w-svg .w-tick { font-size: 10px; fill: var(--text-muted); }
.w-svg .w-axlabel { font-size: 11px; fill: var(--text-muted); }
.w-svg .w-label { font-size: 11.5px; fill: var(--text); font-weight: 600; }
.w-svg .w-label.active { fill: var(--accent); }
.w-svg .w-legend { font-size: 11px; font-weight: 600; }
.w-grid line { stroke: var(--border); stroke-width: 1; }
.w-axes line, .w-axes-line { stroke: var(--text-muted); stroke-width: 1.2; }
.w-axes-fill, .w-tl-dot { fill: var(--text-muted); }
.w-line { fill: none; stroke: var(--c1); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.w-line-main { stroke: var(--text); }
.w-dashed { stroke-dasharray: 5 4; stroke: var(--text-muted); stroke-width: 1.5; }
.w-mark { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.w-dot { stroke: var(--surface); stroke-width: 2; }
.w-tline { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.w-area { fill: var(--c2); opacity: .22; }
.w-hover line { stroke: var(--text-muted); stroke-dasharray: 3 3; }
.w-band { opacity: .08; cursor: pointer; transition: opacity .2s; } .w-band:hover { opacity: .18; } .w-band.active { opacity: .28; }
.w-road { stroke: var(--text-muted); stroke-width: 2; }
.w-ball { fill: var(--c2); stroke: var(--surface); stroke-width: 2; }
.w-ghost { fill: var(--c2); opacity: .35; }
.w-varrow { stroke: var(--c1); stroke-width: 2.5; } .w-varrow-head { fill: var(--c1); }
.w-table { fill: var(--surface-3); stroke: var(--border-2); }
.w-arrow line { stroke-width: 2.6; } .w-arrow polygon { stroke: none; }
.w-v1 line { stroke: var(--c1); } .w-v1 polygon { fill: var(--c1); } .w-v1 text { fill: var(--c1); }
.w-v2 line { stroke: var(--c3); } .w-v2 polygon { fill: var(--c3); } .w-v2 text { fill: var(--c3); }
.w-vres line { stroke: var(--c4); stroke-width: 3; } .w-vres polygon { fill: var(--c4); } .w-vres text { fill: var(--c4); }
.w-water { fill: var(--c1); opacity: .06; } .w-wave { fill: var(--c1); opacity: .35; font-size: 12px; }
.w-arc { fill: none; stroke: var(--c2); stroke-width: 2; } .w-arc-outer { fill: none; stroke: var(--c2); stroke-width: 4; opacity: .5; }
.w-circle-line { fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.w-radius { stroke: var(--text); stroke-width: 2; }
.w-handle { fill: var(--accent); stroke: var(--surface); stroke-width: 3; cursor: grab; }
.w-sin { stroke: var(--c3); stroke-width: 3; } .w-sin-t { fill: var(--c3); }
.w-cos { stroke: var(--c1); stroke-width: 3; } .w-cos-t { fill: var(--c1); }
.w-tan { stroke: var(--c5); stroke-width: 3; } .w-tan-ray { stroke: var(--c5); stroke-width: 1; stroke-dasharray: 3 3; }
.w-tri-fill { fill: var(--accent-soft); }
.w-tri-side { stroke: var(--text-muted); stroke-width: 2.5; transition: stroke .2s; } .w-tri-side.active { stroke: var(--accent); stroke-width: 4; }
.w-right { fill: none; stroke: var(--text-muted); stroke-width: 1.5; }
.w-now { stroke: var(--c4); stroke-width: 1.5; stroke-dasharray: 4 3; }
.w-tl-bar { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.w-tl-item { cursor: pointer; } .w-tl-item.active .w-tl-bar, .w-tl-item.active .w-tl-dot { fill: var(--accent); }
.w-tl-item.active .w-tl-text { fill: #fff; } .w-tl-text { font-size: 11px; font-weight: 600; fill: var(--text); pointer-events: none; }
.w-readout { font-size: .9rem; margin-top: 8px; color: var(--text-2); min-height: 1.2em; }
.w-readout b { color: var(--text); }
.w-info { font-size: .92rem; margin-top: 8px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); min-height: 1.5em; }
.w-example { margin-top: 4px; font-style: italic; }
.w-muted { color: var(--text-muted); font-size: .85rem; }
.w-controls { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.w-slider { display: flex; align-items: center; gap: 8px; font-size: .84rem; }
.w-slider .w-lab { font-weight: 600; min-width: 1.6em; } .w-slider input { width: 120px; } .w-slider .w-val { font-variant-numeric: tabular-nums; color: var(--text-muted); min-width: 4em; }
.w-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.w-chip { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); font-size: .8rem; font-weight: 550; cursor: pointer; --chip: var(--accent); }
.w-chip.active { background: var(--chip); color: #fff; border-color: var(--chip); }
.w-kin-graphs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.w-kin-graphs.stacked { grid-template-columns: 1fr; }
.w-kin-box { min-width: 0; }
.w-kin-head { font-size: .82rem; margin-bottom: 4px; } .w-kin-head b { font-weight: 650; }
.w-kin-hint { font-size: .74rem; color: var(--text-muted); margin-top: 2px; }
.w-track-wrap { margin-top: 4px; }
.w-tl-text.outside { fill: var(--text); }
.w-tl-item.active .w-tl-text.outside { fill: var(--accent); }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .6em 0; }
.tbl table { margin: 0; min-width: 320px; }
@media (max-width: 640px) {
  .w { padding: 10px; margin: 12px 0; }
  .w-slider { width: 100%; } .w-slider input { flex: 1; width: auto; }
  .w-controls { gap: 8px 12px; }
  .doc { font-size: .98rem; }
  .flashcard .face { padding: 16px 14px 14px; }
  .flashcard .front { font-size: 1.05rem; }
  .card { padding: 14px; }
  .exercise .task { font-size: 1.25rem; padding: 14px 4px; }
  .rate button b { font-size: .86rem; }
  .summary .nums { gap: 18px; }
  .week-grid { display: none; }
}
.w-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.w-step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); animation: stepIn .3s var(--ease) both; }
.w-step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-text); display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; margin-top: 2px; }
.w-step-body { flex: 1; min-width: 0; } .w-step-main { font-size: 1rem; } .w-step-why { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }
.w-order-list { display: flex; flex-direction: column; gap: 6px; }
.w-order-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; }
.w-order-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.w-order-item.ok { border-color: var(--ok); background: var(--ok-soft); } .w-order-item.bad { border-color: var(--bad); background: var(--bad-soft); }
.w-order-n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: .72rem; font-weight: 700; flex: none; }
.w-order-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; } .w-order-btns { display: flex; gap: 2px; flex: none; }
.w-ib { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-size: .9rem; }
.w-match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.w-match-col { display: flex; flex-direction: column; gap: 6px; }
.w-match-item { padding: 9px 10px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; text-align: left; font-size: .9rem; transition: all .15s; }
.w-match-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.w-match-item.ok { border-color: var(--ok); background: var(--ok-soft); opacity: .7; } .w-match-item.bad { border-color: var(--bad); background: var(--bad-soft); animation: shake .35s; }
.w-match-item p { margin: 0; display: inline; }
.w-tip { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-color: transparent; }
.w-tip-icon { color: var(--warn); margin-top: 2px; } .w-tip-title { font-weight: 600; margin-bottom: 2px; } .w-tip-body p:last-child { margin-bottom: 0; }
.w-table { width: 100%; } .w-table td, .w-table th { padding: 7px 9px; } .w-table p { margin: 0; }
.w-compare-badgood th:first-child, .w-compare-badgood td:first-child { background: var(--bad-soft); } .w-compare-badgood th:last-child, .w-compare-badgood td:last-child { background: var(--ok-soft); }
.w.done { border-color: var(--ok); }
.w-list { padding-left: 22px; }
.widget-error { color: var(--bad); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 900px) { .kbd-hint, .kbd { display: none; } .flashcard .face { min-height: 200px; } }

/* ===== Mikrointeraktionen ===== */
.btn { transition: background .15s, border-color .15s, transform .12s var(--ease), box-shadow .15s; }
.btn:active:not(:disabled) { transform: scale(.96); }
.card, .subject-card, .topic, .mode-card { transition: transform .2s var(--ease), box-shadow .2s, border-color .15s; }
.subject-card:active, .topic:active, .mode-card:active { transform: scale(.985); }
.flashcard .face { animation: dealIn .35s var(--ease); }
@keyframes dealIn { from { opacity: 0; transform: translateY(18px) scale(.97) } to { opacity: 1; transform: none } }
.flashcard .divider { transform-origin: left; animation: growX .4s var(--ease); }
@keyframes growX { from { transform: scaleX(0) } to { transform: scaleX(1) } }
.result { animation: popIn .35s var(--ease); }
.result.ok .ico { animation: tick .5s var(--ease); }
@keyframes popIn { 0% { opacity: 0; transform: scale(.9) } 60% { transform: scale(1.03) } 100% { opacity: 1; transform: none } }
@keyframes tick { 0% { transform: scale(0) rotate(-30deg) } 60% { transform: scale(1.3) } 100% { transform: scale(1) } }
.face.ok-flash { animation: okFlash .6s var(--ease); }
.face.bad-flash { animation: badFlash .5s var(--ease); }
@keyframes okFlash { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.0) } 30% { box-shadow: 0 0 0 6px rgba(22,163,74,.25) } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0) } }
@keyframes badFlash { 0%,100% { transform: translateX(0) } 20% { transform: translateX(-6px) } 40% { transform: translateX(6px) } 60% { transform: translateX(-4px) } 80% { transform: translateX(4px) } }
.rate button { transition: transform .12s var(--ease), background .15s; }
.rate button:active { transform: scale(.94); }
.opt { transition: transform .12s var(--ease), border-color .15s, background .15s; }
.opt:active { transform: scale(.985); }
.progress > i { transition: width .5s var(--ease); }
.ring .bar { transition: stroke-dashoffset 1s var(--ease); }
.stat .v, .hero .n { animation: countIn .5s var(--ease); }
@keyframes countIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.streak-pulse { animation: pulse 1.6s ease-in-out infinite; color: var(--warn); }
@keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.12) } }
.cloze-show { animation: popIn .35s var(--ease); }
.w-step { animation: stepIn .35s var(--ease) both; }
.xp-pop { font-size: 1.5rem; }
.summary .big-ring { margin: 0 auto 10px; }

/* ===== Startseite (Handy) ===== */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-top h1 { margin: 0; font-size: 1.35rem; }
.home-top .sub { color: var(--text-muted); font-size: .9rem; }
.home-streak { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 650; }
.home-cta { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: var(--primary); color: var(--primary-text); cursor: pointer; position: relative; overflow: hidden; }
.home-cta .ring .track { stroke: rgba(255,255,255,.18); } .home-cta .ring .bar { stroke: var(--accent); }
:root[data-theme="dark"] .home-cta .ring .bar, .home-cta .ring .bar { stroke: #7c9cff; }
.home-cta .ring .label { color: inherit; } .home-cta .ring .label small { color: inherit; opacity: .7; }
.home-cta .t { font-size: 1.15rem; font-weight: 650; }
.home-cta .s { opacity: .75; font-size: .9rem; margin-top: 2px; }
.home-cta .go { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.home-cta.done { background: var(--ok); color: #fff; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .82rem; cursor: pointer; }
.quick button:active { transform: scale(.96); }
.quick .qico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.subject-list { display: flex; flex-direction: column; gap: 8px; }
.subject-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.subject-row .nm { font-weight: 600; } .subject-row .meta { font-size: .78rem; color: var(--text-muted); }
.subject-row .progress { width: 100%; margin-top: 5px; }
.subject-row .due-pill { font-weight: 700; font-size: .9rem; min-width: 34px; text-align: center; padding: 4px 8px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); }
.subject-row .due-pill.zero { background: var(--surface-2); color: var(--text-muted); font-weight: 500; }
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.section-h h2 { margin: 0; font-size: 1rem; }
.mini-list .list-item { padding: 8px 2px; }
