/* ============================================================
   notes.css — 오답노트 / Wrong-Answer Notebook screen
   ------------------------------------------------------------
   "Calm Scholar" design system. Tokens only.
   Mobile-first. 44px+ tap targets for delete buttons.
   ============================================================ */

/* ── Screen wrapper ─────────────────────────────────────────── */
.notes-screen {
  padding: var(--sp-4);
  padding-bottom: calc(var(--nav-h) + var(--sp-6));
  max-width: 640px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════
   LOCKED (free-tier upsell) state
   ════════════════════════════════════════════════════════════ */
.notes-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-4);
}

.notes-locked-icon {
  font-size: 3.5rem;
  color: var(--text-3);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.notes-locked-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin: 0;
}

.notes-locked-sub {
  font-size: var(--fs-base);
  color: var(--text-3);
  line-height: var(--lh-snug);
  max-width: 300px;
  margin: 0;
}

.btn-upsell {
  margin-top: var(--sp-2);
}

/* ════════════════════════════════════════════════════════════
   EMPTY state
   ════════════════════════════════════════════════════════════ */
.notes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-4);
}

.notes-empty-icon {
  font-size: 3.5rem;
  color: var(--success);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.notes-empty-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin: 0;
}

.notes-empty-sub {
  font-size: var(--fs-base);
  color: var(--text-3);
  line-height: var(--lh-snug);
  max-width: 300px;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   TOOLBAR — total count + clear-all button
   ════════════════════════════════════════════════════════════ */
.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.notes-count {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
}

/* ════════════════════════════════════════════════════════════
   MODE GROUP
   ════════════════════════════════════════════════════════════ */
.notes-group {
  margin-bottom: var(--sp-5);
}

.notes-group-hd {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}

.notes-group-hd .material-symbols-rounded {
  font-size: 1.1rem;
  color: var(--primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.notes-group-count {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-3);
}

/* ════════════════════════════════════════════════════════════
   NOTE CARD
   ════════════════════════════════════════════════════════════ */
.note-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  box-shadow: var(--sh-sm);
  min-height: 44px;
  transition: box-shadow var(--dur-fast) var(--ease-out);
}

.note-card:last-child {
  margin-bottom: 0;
}

/* ── Flag thumbnail ─────────────────────────────────────────── */
.note-flag {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: var(--r-xs);
  flex-shrink: 0;
  border: 1px solid var(--border);
}

/* ── Text body ──────────────────────────────────────────────── */
.note-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.note-q {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin: 0;
  line-height: var(--lh-snug);
  /* 2-line clamp — truncate long question text with CSS */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-a {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--success);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Misses badge ───────────────────────────────────────────── */
.note-misses {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--on-primary);
  background: var(--danger);
  border-radius: var(--r-full);
  padding: 2px 7px;
  line-height: 1.4;
  white-space: nowrap;
}

/* ── Delete icon button (44px tap target) ───────────────────── */
.note-del {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  color: var(--text-3);
  transition:
    color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.note-del:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.note-del .material-symbols-rounded {
  font-size: 1.2rem;
}

/* ════════════════════════════════════════════════════════════
   RE-QUIZ CTA WRAPPER
   ════════════════════════════════════════════════════════════ */
.notes-cta-wrap {
  margin-top: var(--sp-4);
}
