/* Okul Paneli — kareli defter teması */
:root {
  --paper: #f5f8fa;
  --grid: #dde7ee;
  --ink: #1c3557;
  --ink-soft: #4d6582;
  --muted: #7b8ea3;
  --surface: #ffffff;
  --line: #c9d6e0;
  --margin: #d9473f;      /* defterin kırmızı kenar çizgisi; ✗ */
  --done: #2b7a4b;        /* ✓ */
  --partial: #b7790f;     /* ◐ */
  --missing: #c63a33;     /* ✗ */
  --accent: #0b6e5e;
  --wa: #1f8f4e;
  --radius-s: 6px;
  --radius-m: 12px;
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --paper: #1d2a26;     /* yazı tahtası */
    --grid: #26362f;
    --ink: #eef3ea;       /* tebeşir */
    --ink-soft: #c3d0c4;
    --muted: #8fa394;
    --surface: #233430;
    --line: #36493f;
    --margin: #f07a6c;
    --done: #7fd39c;
    --partial: #f0c15a;
    --missing: #f08679;
    --accent: #3dc4a9;
    --wa: #5bd08a;
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
    --paper: #1d2a26;     /* yazı tahtası */
    --grid: #26362f;
    --ink: #eef3ea;       /* tebeşir */
    --ink-soft: #c3d0c4;
    --muted: #8fa394;
    --surface: #233430;
    --line: #36493f;
    --margin: #f07a6c;
    --done: #7fd39c;
    --partial: #f0c15a;
    --missing: #f08679;
    --accent: #3dc4a9;
    --wa: #5bd08a;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.45 var(--font);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

#app { max-width: 640px; margin: 0 auto; }
.page { padding: 12px 16px 96px; }
.loading, .empty { color: var(--muted); padding: 24px 16px; }

/* Üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: var(--tap) 1fr auto; align-items: center; gap: 4px;
  padding: calc(env(safe-area-inset-top) + 6px) 8px 6px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 4px; }
.icon-btn {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-grid; place-items: center;
  font-size: 1.7rem; line-height: 1; text-decoration: none; color: var(--ink);
  background: none; border: 0; border-radius: var(--radius-s); cursor: pointer;
}
.icon-btn.ghost { visibility: hidden; }
.text-link { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 10px; text-decoration: none; font-weight: 600; }

/* Butonlar */
.btn {
  min-height: var(--tap); padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: .95rem; }
.btn.danger { border-color: var(--missing); color: var(--missing); }
.btn:disabled { opacity: .55; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* Defter sayfası: Şimdi kartı */
.now-card {
  position: relative;
  margin: 8px 0 20px;
  padding: 16px 16px 16px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px var(--radius-m) var(--radius-m) 4px;
  box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(28, 53, 87, .45);
}
.now-card::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 18px;
  border-left: 2px solid var(--margin);
}
.now-when { color: var(--margin); font-weight: 700; font-size: .95rem; margin: 0; }
.now-class { font-family: var(--font-num); font-size: 2.6rem; font-weight: 750; line-height: 1.05; margin: 2px 0 2px; letter-spacing: -.01em; }
.now-class small { font-size: 1rem; font-weight: 600; color: var(--ink-soft); margin-left: 6px; }
.now-last { margin: 10px 0 4px; font-size: 1.1rem; }
.now-last .lbl, .muted { color: var(--muted); }
.now-pending { margin: 4px 0 14px; color: var(--partial); font-weight: 600; }

.date-head { font-size: 1.05rem; color: var(--ink-soft); margin: 4px 0 0; font-weight: 600; }

/* Bölümler */
.section { margin: 22px 0; }
.section h2 { font-size: 1rem; margin: 0 0 8px; color: var(--ink-soft); font-weight: 650; }

/* Ders çipleri */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: var(--tap); padding: 6px 12px;
  display: inline-flex; flex-direction: column; justify-content: center;
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.15;
}
.chip b { font-family: var(--font-num); font-size: 1.05rem; }
.chip span { font-size: .8rem; color: var(--muted); }
.chip.past { opacity: .55; }
.chip.current { border-color: var(--margin); box-shadow: inset 3px 0 0 var(--margin); }
.chip.toggle { flex-direction: row; gap: 8px; align-items: center; cursor: pointer; font-weight: 600; }
.chip.toggle.on { border-color: var(--done); color: var(--done); }

/* Listeler */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.row {
  min-height: 56px; width: 100%; padding: 8px 14px;
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; text-align: left; text-decoration: none; color: var(--ink); cursor: pointer;
}
.row .grow { flex: 1; min-width: 0; }
.row .sub { display: block; font-size: .85rem; color: var(--muted); }
.row.inactive { opacity: .5; }

/* Görevler */
.task { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.task .check { width: var(--tap); height: var(--tap); flex: none; font-size: 1.4rem; background: none; border: 0; color: var(--ink); cursor: pointer; }
.task .text { flex: 1; padding: 8px 0; }
.task.done .text { text-decoration: line-through; color: var(--muted); }
.task .due { font-size: .8rem; color: var(--margin); margin-left: 6px; }
.add-line { display: flex; gap: 8px; margin-top: 8px; }
.add-line input { flex: 1; }

/* Formlar */
label { display: block; font-weight: 600; font-size: .95rem; margin: 12px 0 4px; }
label > input, label > textarea, label > select { margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=tel], textarea, select {
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
  font-weight: 400;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.form-error { color: var(--missing); min-height: 1.2em; margin: 8px 0; }
.hint { font-size: .85rem; color: var(--muted); margin: 4px 0; font-weight: 400; }
.save-state { font-size: .85rem; color: var(--muted); min-height: 1.2em; }

/* Giriş */
.login { min-height: 100dvh; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-m); }
.login-title { font-family: var(--font-num); font-size: 1.8rem; margin: 0 0 8px; }

/* Ödev kontrolü */
.hw-head p { margin: 4px 0; color: var(--ink-soft); }
.students .st {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  min-height: 60px; padding: 6px 10px 6px 6px; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.st .mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 800; border-radius: 50%;
  border: 2px dashed var(--line); color: var(--muted);
}
.st.done .mark { border: 2px solid var(--done); color: var(--done); }
.st.partial .mark { border: 2px solid var(--partial); color: var(--partial); }
.st.missing .mark { border: 2px solid var(--missing); color: var(--missing); }
.st .name { font-size: 1.08rem; cursor: pointer; padding: 8px 0; }
.st .note { display: block; font-size: .85rem; color: var(--ink-soft); }
.st .opened { display: block; font-size: .8rem; color: var(--muted); }
.st .nophone { font-size: .8rem; color: var(--muted); }
.wa {
  min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--wa); color: #fff; border-radius: var(--radius-s); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.note-edit { grid-column: 2 / -1; display: flex; gap: 6px; }
.note-edit input { flex: 1; min-height: 44px; }
.summary-bar {
  position: sticky; bottom: 0; z-index: 4;
  margin: 12px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  display: flex; gap: 14px; font-family: var(--font-num); font-weight: 700; font-size: 1.05rem;
}
.c-done { color: var(--done); } .c-partial { color: var(--partial); } .c-missing { color: var(--missing); } .c-unmarked { color: var(--muted); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; border: 1.5px solid var(--partial); color: var(--partial); }
.badge.closed { border-color: var(--muted); color: var(--muted); }

/* Ders ekranı */
.last-lesson { background: var(--surface); border-left: 3px solid var(--margin); padding: 10px 12px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 8px 0 4px; }
.last-lesson p { margin: 2px 0; }

/* Ayarlar: program ızgarası */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tabs button { min-height: 44px; min-width: 52px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-weight: 600; }
.tabs button[aria-selected=true] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.bell-row { display: grid; grid-template-columns: 40px 1fr 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.bell-row b { font-family: var(--font-num); text-align: center; }
.cell-editor { background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius-m); padding: 12px; margin: 8px 0; }
.switch { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; }
.switch input { width: 24px; height: 24px; }

/* Bant ve bildirim */
.offline-band {
  position: sticky; top: 0; z-index: 10; padding: calc(env(safe-area-inset-top) + 6px) 12px 6px;
  background: var(--partial); color: #1b1300; text-align: center; font-weight: 700; font-size: .9rem;
}
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--radius-s);
  background: var(--ink); color: var(--paper); font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--missing); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Alt gezinme: dört bölüm */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav[hidden] { display: none; }
.bottom-nav a {
  min-height: 56px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px;
}
.bottom-nav a[aria-current] { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
@media (min-width: 900px) {
  .bottom-nav { max-width: 900px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* ===== Okul Paneli ortak parçalar ===== */
#app { max-width: 900px; }
.page { padding-bottom: 170px; }
.toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 30, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 680px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 16px 16px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}
@media (min-width: 720px) { .scrim { align-items: center; } .sheet { border-radius: 16px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.btn.armed { background: var(--missing); border-color: var(--missing); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; margin: 10px 0; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line); margin-right: 4px; }
.pill.on { border-color: var(--accent); color: var(--accent); }
.bad { color: var(--missing); }
.search { margin: 8px 0; }
.grid2 { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.tabs a { min-height: 44px; min-width: 52px; padding: 0 12px; display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.tabs a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
a.btn[aria-disabled=true] { opacity: .45; pointer-events: none; }

/* ===== Ödev ===== */
.k-done { --k: var(--done); } .k-notdone { --k: var(--missing); } .k-late { --k: #6b5bd6; }
.k-missing { --k: var(--partial); } .k-nobook { --k: #8a5a2b; } .k-none { --k: var(--muted); }
.c-notdone { color: var(--missing); } .c-late { color: #6b5bd6; } .c-nobook { color: #8a5a2b; }
.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 8px; }
.pc { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; color: var(--ink); }
.pc strong { font-family: var(--font-num); font-size: 1.6rem; }
.prog { height: 6px; background: var(--grid); border-radius: 99px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent); }
.sbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--grid); }
.sbar i { background: var(--k); }
.pcst { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; }
.pcrow { display: grid; grid-template-columns: 10px 1fr auto; gap: 6px; align-items: center; }
.pcrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.hw { border-left: 3px solid var(--accent); }
.hwdate { margin: 0 0 4px; font-size: .9rem; }
.hwsum { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hwsum strong { font-size: 1.15rem; display: block; }
.hwsum small { display: block; }
.labrow { display: flex; justify-content: space-between; align-items: center; }
.bchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bchips button { min-height: 36px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); cursor: pointer; font-size: .9rem; }
.bchips button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip.toggle .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.chip.toggle[aria-pressed=true] { border-color: var(--k); box-shadow: inset 0 0 0 1px var(--k); }
.listtitle { font-size: 1rem; color: var(--ink-soft); margin: 18px 0 8px; }
.stlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; display: grid; gap: 8px; }
@media (min-width: 760px) { .st2 { grid-template-columns: minmax(180px, 1fr) auto; align-items: center; } .st2 .acts { grid-column: 1 / -1; } }
.who { display: flex; flex-direction: column; font-size: .88rem; }
.nameBtn { all: unset; cursor: pointer; font-size: 1.08rem; font-weight: 650; color: var(--ink); }
.nameBtn:focus-visible { outline: 3px solid var(--accent); }
.rate b { color: var(--accent); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { min-height: 44px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--k); border-color: var(--k); color: #fff; }
.seg.big { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0; }
.seg.big button { min-height: 60px; font-size: 1.15rem; }
@media (min-width: 560px) { .seg.big { grid-template-columns: repeat(5, 1fr); } }
.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bar { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 6; display: flex; gap: 8px; justify-content: center; padding: 8px 12px; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.bar .cnt { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 99px; background: var(--paper); color: var(--ink); font-size: .85rem; }
.bigname { font-size: 1.5rem; font-weight: 700; margin: 10px 0 4px; }
.quote { white-space: pre-wrap; background: var(--paper); border-left: 3px solid var(--accent); padding: 10px 12px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.list.compact .row, .sendrow, .dayrow { min-height: 48px; }
.sendrow, .dayrow { display: flex; align-items: center; gap: 8px; padding: 6px 12px; flex-wrap: wrap; }
.sendrow .grow, .dayrow .grow { flex: 1; min-width: 140px; }
.sendrow .btn-row { margin: 0; }
.dayrow b { color: var(--k); }
.row[aria-current] { background: var(--paper); font-weight: 700; }
.weekpick { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.bul { padding-left: 18px; }
.pill.k-done, .pill.k-notdone, .pill.k-late, .pill.k-missing, .pill.k-nobook { color: var(--k); border-color: var(--k); }

/* ===== Morpa ===== */
.m-y { --m: var(--done); } .m-e { --m: var(--partial); } .m-n { --m: var(--missing); } .m-g { --m: #6b5bd6; } .m-x { --m: var(--line); }
.morpa-card { border-left: 3px solid #0b6bcb; }
.sheet.wide { max-width: 980px; }
.mstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mstats .card { margin: 0; text-align: center; padding: 8px; }
.mstats b { display: block; font-size: 1.4rem; color: var(--m); }
.mtbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; }
.mtbl th, .mtbl td { border-bottom: 1px solid var(--line); padding: 4px 2px; text-align: center; overflow-wrap: anywhere; }
.mtbl th:first-child, .mtbl td:first-child { width: 30%; text-align: left; }
.mtbl th:nth-child(2), .mtbl td:nth-child(2) { width: 12%; }
.mhw { all: unset; cursor: pointer; display: block; font-size: .78rem; line-height: 1.2; font-weight: 650; }
.mhw .muted { display: block; font-weight: 400; font-size: .72rem; }
.mtbl .nameBtn { font-size: .92rem; font-weight: 600; }
.ms { width: 100%; max-width: 48px; min-height: 40px; border: 1.5px solid var(--m, var(--line)); color: var(--m); background: var(--surface); border-radius: var(--radius-s); font-weight: 800; cursor: pointer; }
.ms small { display: block; font-size: .65rem; line-height: 1; font-weight: 500; }
.ms.yok { border-style: dashed; color: var(--muted); font-size: .72rem; font-weight: 400; background: transparent; }
.uyari { border-color: var(--partial); }
.uyari b { color: var(--partial); }
.q { border-top: 1px solid var(--line); padding: 8px 0; }

/* ===== Mentörlük ===== */
:root { --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent); }
.databar { margin-bottom: 8px; }
.databar .btn-row { align-items: center; margin: 4px 0; }
.notice { background: color-mix(in srgb, var(--partial) 14%, var(--surface)); border: 1px solid var(--partial); border-radius: var(--radius-s); padding: 8px 10px; }
.mstats .card span { display: block; font-size: .82rem; }
.mlist { display: grid; gap: 8px; margin: 8px 0 16px; }
.mrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; }
.mrow.good { border-left-color: var(--done); } .mrow.warn { border-left-color: var(--partial); } .mrow.crit { border-left-color: var(--missing); }
.mrow .name { font-weight: 650; }
.mrow .score { font-family: var(--font-num); font-size: 1.5rem; font-weight: 750; }
.mrow .spark { grid-column: 1 / -1; width: 100%; height: 36px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.small { font-size: .85rem; }
.chip-s { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; border: 1.5px solid var(--line); color: var(--ink-soft); }
.chip-s.good { border-color: var(--done); color: var(--done); } .chip-s.warn { border-color: var(--partial); color: var(--partial); } .chip-s.crit { border-color: var(--missing); color: var(--missing); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.tile { background: var(--paper); border-radius: var(--radius-s); padding: 8px 10px; }
.tile b { display: block; font-family: var(--font-num); font-size: 1.3rem; }
.tile span { font-size: .8rem; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; margin: 8px 0; }
.scroll { overflow-x: auto; }
.tbl .avgrow { font-weight: 700; border-top: 2px solid currentColor; }
.hi { color: var(--done); } .lo { color: var(--missing); }
.kz { margin: 8px 0; }
.kzh { font-weight: 650; margin-bottom: 4px; }
.kzl { list-style: none; margin: 0; padding: 0; }
.kzl li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }

/* ===== Etüt ===== */
.seg.tabs { margin: 10px 0 12px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.pick { min-height: 52px; text-align: left; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .92rem; cursor: pointer; overflow-wrap: anywhere; }
.pick.grp { border-left: 4px solid var(--accent); }
.pick[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick[aria-pressed=true]::before { content: '✓ '; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
details.yk summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
.st { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.st span { flex: 1; min-width: 0; }
.att { min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.att.g[aria-pressed=true] { background: var(--done); border-color: var(--done); color: #fff; }
.att.y[aria-pressed=true] { background: var(--missing); border-color: var(--missing); color: #fff; }
.tbl tr.p { cursor: pointer; }
.daygrid th[scope=row] { text-align: left; white-space: nowrap; font-weight: 600; }
.daygrid td { text-align: center; padding: 3px; }
.day { width: 40px; height: 40px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface); color: transparent; font-weight: 800; cursor: pointer; }
.day[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
