.mc-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; position: sticky; top: var(--head-h, 0px); z-index: 5; }
.mc-total { font-weight: 800; color: var(--cream); margin-right: auto; font-variant-numeric: tabular-nums; }
.mc-opt { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; font-size: 15px; color: var(--text); cursor: pointer; }
.mc-reset { min-height: 36px; padding: 6px 12px 4px; border-radius: 6px; border: 1.5px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mc-reset:hover { border-color: var(--muted); }
.mc-reset:focus-visible, .mc-reveal:focus-visible, .mc-tick:focus-visible, .mc-opt input:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* chapter head = pink road sign: name big on the left, count in a right-aligned column */
.mc-chapter { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.mc-chapter > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px 10px; cursor: pointer; background: var(--primary); color: var(--on-primary); border-radius: var(--radius); box-shadow: inset 0 0 0 2px var(--on-primary), 0 0 0 2px var(--primary); font-weight: 800; font-size: 20px; line-height: 1.25; }
.mc-chapter > summary::-webkit-details-marker { display: none; }
.mc-chapter > summary:hover { background: var(--primary-dark); box-shadow: inset 0 0 0 2px var(--on-primary), 0 0 0 2px var(--primary-dark); }
.mc-chapter > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: -4px 2px 0 0; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.mc-chapter[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.mc-chapter[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.mc-chapter-name { flex: 1 1 auto; min-width: 0; }
.mc-meter { width: 120px; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--on-primary) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--on-primary); overflow: hidden; flex: none; }
.mc-meter > span { display: block; height: 100%; width: 0; background: var(--on-primary); }
.mc-chapter-progress { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; white-space: nowrap; }

.mc-list { list-style: none; margin: 0; padding: 8px 8px 10px; }
.mc-list > li + li { border-top: 1px solid var(--line); }
.mc-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; cursor: pointer; }
.mc-row:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
/* ticks: dark box, lime when done (lime = found/done across the site) */
.mc-tick, .mc-opt input { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin: 0; flex: none; border: 2px solid var(--muted); border-radius: 5px; background: var(--bg-deep); cursor: pointer; }
.mc-tick::after, .mc-opt input::after { content: ""; width: 6px; height: 11px; margin-top: -3px; border-right: 3px solid var(--on-primary); border-bottom: 3px solid var(--on-primary); transform: rotate(45deg); opacity: 0; }
.mc-tick:checked, .mc-opt input:checked { background: var(--lime); border-color: var(--lime); }
.mc-tick:checked::after, .mc-opt input:checked::after { opacity: 1; }
.mc-n { width: 26px; text-align: right; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.mc-thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; background: var(--line); }
.mc-text { display: grid; gap: 2px; min-width: 0; }
.mc-name, .mc-hidden-name { font-weight: 700; }
.mc-note { color: var(--muted); font-size: 14px; }
.mc-done .mc-name, .mc-done .mc-hidden-name { color: var(--muted); text-decoration: line-through; }
.mc-done .mc-n { color: var(--lime); }
.mc-done .mc-thumb { opacity: .45; }
.mc-reveal { justify-self: start; border: 1.5px dashed var(--primary); background: transparent; color: var(--primary); border-radius: 6px; padding: 4px 10px 2px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mc-reveal:hover { background: var(--primary); color: var(--on-primary); border-style: solid; }
@media (max-width: 640px) {
  .mc-meter { display: none; }
  .mc-thumb { width: 64px; height: 36px; }
  .mc-bar { padding: 8px 12px; gap: 4px 12px; }
  .mc-total { flex-basis: 100%; }
  .mc-chapter > summary { font-size: 17px; padding: 12px 14px 10px; }
  .mc-chapter-progress { font-size: 16px; min-width: 0; }
  .mc-text, .mc-note { font-size: 15px; }
  .mc-list { padding: 6px 4px 8px; }
  .mc-row { padding: 8px 4px; gap: 10px; }
}
