/* ========== Deck select ========== */
.deck-select { padding-top: 8px; }
.select-hero {
  text-align: center;
  margin-bottom: 48px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.select-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 16px;
}
.select-title {
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.select-sub {
  font-size: 17px;
  color: var(--text-light);
  text-wrap: pretty;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.deck-card {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  color: inherit;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.deck-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: oklch(0.62 0.12 var(--deck-hue, 145));
  opacity: 0.85;
}
.deck-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.deck-glyph {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: oklch(0.95 0.04 var(--deck-hue, 145));
  color: oklch(0.42 0.13 var(--deck-hue, 145));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Fraunces', serif;
}
.deck-title { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.deck-subtitle { font-size: 13px; color: var(--text-light); }
.deck-meta { text-align: right; }
.deck-count { display: block; font-size: 20px; font-weight: 700; color: var(--primary-dark); font-family: 'Fraunces', serif; line-height: 1; }
.deck-count-l { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); }

.deck-card-special {
  background: linear-gradient(180deg, #fffdf0 0%, #ffffff 100%);
  border-color: #e5d389;
}
.deck-card-special::before { background: var(--accent); }
.deck-card-special .deck-glyph {
  background: var(--accent-50);
  color: #9d7f00;
}
.deck-ribbon {
  position: absolute;
  top: 10px; right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9d7f00;
  background: var(--accent-50);
  padding: 3px 8px;
  border-radius: 999px;
}

.select-footer {
  margin-top: 48px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}

/* ========== Config screen ========== */
.config-screen { max-width: 680px; margin: 0 auto; padding-top: 8px; }
.config-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.config-back { position: absolute; top: 16px; left: 16px; }
.config-eyebrow {
  text-align: center;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--primary); font-weight: 600;
  margin-top: 4px;
}
.config-title {
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  margin: 10px 0 6px;
}
.config-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 32px;
}
.config-group { margin-bottom: 22px; }
.config-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 10px;
}
.config-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.config-options-row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.config-opt {
  text-align: left;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: all 0.15s ease;
}
.config-opt:hover { border-color: var(--primary); }
.config-opt.sel {
  border-color: var(--primary);
  background: var(--primary-50);
}
.config-opt.opt-sm { padding: 12px 14px; }
.opt-ttl { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.opt-desc { font-size: 12px; color: var(--text-light); }

.config-chip {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.config-chip:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.config-chip.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.config-chip:disabled { opacity: 0.35; cursor: not-allowed; }

.config-info {
  font-size: 14px;
  color: var(--text-soft);
  background: var(--accent-50);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.6;
}

.config-actions { margin-top: 28px; text-align: center; }
.config-start { padding: 14px 28px; font-size: 15px; }

/* ========== Mode head (shared) ========== */
.mode-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.mode-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.mode-deck { color: var(--text); }
.mode-dot { color: var(--text-light); margin: 0 8px; }
.mode-kind { color: var(--text-light); font-weight: 500; }
.mode-dir {
  font-size: 13px;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
}
.mode-dir .active { color: var(--primary); }
.mode-dir .swap { opacity: 0.5; }

/* ========== Flip mode ========== */
.flip-container { max-width: 640px; margin: 0 auto; }

.flip-progress { margin-bottom: 40px; }
.progress-wrap {}
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.35s ease;
  border-radius: 3px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.again-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--accent);
  text-align: center;
  font-weight: 500;
}

.fc-stage {
  position: relative;
  height: 340px;
  margin-bottom: 36px;
  perspective: 1600px;
}

.fc {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  max-width: 520px;
  left: 0; right: 0;
  height: 340px;
  border-radius: 22px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.05), opacity 0.3s;
  cursor: pointer;
}
.fc-bg {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  border-radius: 22px;
}
.fc-main.flipped { transform: rotateY(180deg); }
.fc-face {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fc-front {
  background: var(--card-warm);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
}
.fc-back {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  transform: rotateY(180deg);
  box-shadow: var(--shadow-md);
}
.fc-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}
.fc-word {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  text-align: center;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.fc-meta {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
}
.fc-alts {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.fc-alts-label {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fc-alt-pill {
  background: rgba(255,255,255,0.18);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-family: 'Fraunces', serif;
}
.fc-hint {
  position: absolute;
  bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
}

.fc-anim-right { transform: translateX(60%) rotate(6deg) !important; opacity: 0; }
.fc-anim-left  { transform: translateX(-60%) rotate(-6deg) !important; opacity: 0; }
.fc-main.flipped.fc-anim-right { transform: translateX(60%) rotateY(180deg) rotate(6deg) !important; opacity: 0; }
.fc-main.flipped.fc-anim-left  { transform: translateX(-60%) rotateY(180deg) rotate(-6deg) !important; opacity: 0; }

.flip-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.flip-action { padding: 14px 20px; font-size: 14px; justify-content: center; }
.flip-action-mid { padding: 14px 16px; font-size: 13px; color: var(--text-light); justify-content: center; }
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.06);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  margin: 0 2px;
}
.btn.primary .kbd { background: rgba(255,255,255,0.22); }
.btn.danger .kbd { background: rgba(192,0,0,0.12); }

/* ========== Match mode ========== */
.match-container { max-width: 820px; margin: 0 auto; }
.match-instr {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 14px;
}
.match-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}
.match-count { color: var(--primary); font-weight: 700; }
.match-sep { margin: 0 8px; opacity: 0.5; }
.match-miss { color: var(--red); }

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-col-head {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.match-col-head-hy { color: var(--primary-dark); }

.match-cell {
  padding: 18px 18px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  color: var(--text);
  text-align: center;
  min-height: 58px;
}
.match-cell:hover:not(:disabled) {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.match-cell.match-sel {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary-dark);
}
.match-cell.match-wrong {
  border-color: var(--red);
  background: var(--red-50);
  color: var(--red);
  animation: shake 0.36s ease;
}
.match-cell.match-done {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  opacity: 0.55;
  cursor: default;
  transform: scale(0.97);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ========== Contrast mode ========== */
.contrast-container { max-width: 720px; margin: 0 auto; }
.contrast-intro {
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 32px;
}
.contrast-intro strong { color: var(--text); }
.contrast-prompt {
  background: var(--card-warm);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.contrast-prompt-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 8px;
}
.contrast-prompt-word {
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.contrast-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.contrast-opt {
  padding: 28px 20px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: all 0.2s ease;
  text-align: center;
}
.contrast-opt:hover:not(:disabled) {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.contrast-opt .opt-text {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contrast-opt .opt-tag {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-light);
}
.contrast-opt.opt-correct {
  border-color: var(--primary);
  background: var(--primary-50);
}
.contrast-opt.opt-correct .opt-tag { color: var(--primary-dark); }
.contrast-opt.opt-wrong {
  border-color: #e5d389;
  background: var(--accent-50);
  opacity: 0.75;
}
.contrast-opt.opt-wrong .opt-tag { color: #9d7f00; }
.contrast-opt.opt-chosen {
  box-shadow: 0 0 0 3px rgba(0,141,56,0.15);
}
.contrast-opt.opt-chosen.opt-wrong {
  box-shadow: 0 0 0 3px rgba(212,176,14,0.25);
}

.contrast-feedback {
  padding: 22px 24px;
  border-radius: 14px;
  text-align: center;
  animation: fadeIn 0.25s ease;
}
.contrast-feedback.fb-ok {
  background: var(--primary-50);
  border: 1px solid #b9dfc3;
}
.contrast-feedback.fb-no {
  background: var(--accent-50);
  border: 1px solid #e5d389;
}
.fb-head { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.fb-body { font-size: 14px; color: var(--text-soft); line-height: 1.6; margin-bottom: 16px; text-wrap: pretty; }
.fb-body strong { font-size: 17px; color: var(--text); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ========== Session done ========== */
.session-done {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.done-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.done-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 14px;
}
.done-card h2 { font-size: 36px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.done-sub { color: var(--text-light); margin-bottom: 28px; }
.done-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 28px;
}
.done-stat-n { font-family: 'Fraunces', serif; font-size: 40px; font-weight: 600; color: var(--primary-dark); line-height: 1; }
.done-stat-l { font-size: 11px; color: var(--text-light); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 6px; }
.done-divider { width: 1px; height: 48px; background: var(--border); }
.done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ========== Mobile ========== */
@media (max-width: 680px) {
  .shell { padding: 20px 16px 60px; }
  .config-card { padding: 28px 20px; }
  .config-options { grid-template-columns: 1fr; }
  .deck-grid { grid-template-columns: 1fr; }
  .match-grid { gap: 14px; }
  .match-cell { font-size: 17px; padding: 14px; min-height: 50px; }
  .contrast-prompt-word { font-size: 40px; }
  .contrast-opt .opt-text { font-size: 24px; }
  .contrast-options { grid-template-columns: 1fr; }
  .fc-stage { height: 280px; }
  .fc { height: 280px; }
  .fc-face { padding: 28px 20px; }
  .flip-actions { grid-template-columns: 1fr 1fr; }
  .flip-action-mid { grid-column: 1 / -1; order: -1; }
  .done-card { padding: 32px 24px; }
}


/* ========== Quick-start card ========== */
.quick-start {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 22px 26px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.quick-start::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(245,220,15,0.2), transparent 60%);
  pointer-events: none;
}
.qs-body { flex: 1; }
.qs-eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-bright); font-weight: 700; margin-bottom: 8px;
}
.qs-title {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em; line-height: 1.2;
  margin-bottom: 4px; text-wrap: balance;
}
.qs-sub { font-size: 13px; opacity: 0.8; }
.qs-btn {
  background: var(--accent-bright); color: var(--text);
  border-color: var(--accent-bright); flex-shrink: 0;
  position: relative; z-index: 1;
}
.qs-btn:hover { background: #fff; color: var(--primary-dark); border-color: #fff; transform: translateY(-1px); }
@media (max-width: 680px) {
  .quick-start { flex-direction: column; align-items: stretch; text-align: left; }
  .qs-btn { width: 100%; justify-content: center; }
}

/* ========== Flip counters ========== */
.flip-counters {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
}
.counter {
  flex: 1;
  max-width: 120px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.counter-n {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 600;
  line-height: 1;
}
.counter-l {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
}
.counter-known .counter-n { color: var(--primary); }
.counter-again .counter-n { color: #b8860b; }
.counter-left .counter-n { color: var(--text); }

/* Hide old again-note since we have counters */
.again-note { display: none; }

/* ========== Softer "Nog niet" button ========== */
.btn.soft-again {
  border-color: #e8d39a;
  color: #8b6914;
  background: var(--card);
}
.btn.soft-again:hover {
  background: var(--accent-50);
  border-color: #d4b00e;
  color: #8b6914;
  transform: translateY(-1px);
}
.btn.soft-again .kbd { background: rgba(180, 130, 0, 0.12); }

/* ========== Example sentence ========== */
.ex-btn {
  margin-top: 14px;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  background: transparent;
  border: 1px dashed currentColor;
  border-radius: 999px;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ex-btn:hover { opacity: 1; }

.ex-loading {
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.6;
  font-style: italic;
}

.ex-box {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.14);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 100%;
  text-align: left;
}
.fc-front .ex-box {
  background: var(--bg);
  border: 1px solid var(--border);
}
.ex-line { display: block; }
.ex-line + .ex-line { margin-top: 4px; }
.ex-tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.12);
  margin-right: 6px;
  font-weight: 700;
  vertical-align: middle;
}
.fc-front .ex-tag { background: rgba(0,141,56,0.12); color: var(--primary-dark); }

/* ========== Match pair hue flashes ========== */
.match-cell.match-hue-0 { background: oklch(0.72 0.13 145); border-color: oklch(0.62 0.14 145); }
.match-cell.match-hue-1 { background: oklch(0.72 0.13 220); border-color: oklch(0.62 0.14 220); }
.match-cell.match-hue-2 { background: oklch(0.75 0.13 60);  border-color: oklch(0.65 0.14 60); }
.match-cell.match-hue-3 { background: oklch(0.72 0.13 310); border-color: oklch(0.62 0.14 310); }
.match-cell.match-hue-4 { background: oklch(0.72 0.13 25);  border-color: oklch(0.62 0.14 25); }
.match-cell.match-hue-5 { background: oklch(0.72 0.13 180); border-color: oklch(0.62 0.14 180); }
.match-cell.match-done {
  color: #fff !important;
  opacity: 1 !important;
  animation: pairPulse 0.5s ease;
}
@keyframes pairPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(0.97); }
}


/* ========== Rich session-done screen ========== */
.session-done-rich { position: relative; overflow: visible; }
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}
.done-card {
  position: relative;
  z-index: 10;
}
.done-tier-perfect .done-medal {
  background: linear-gradient(135deg, #f5dc0f, #d4b00e);
  color: #5a4400;
  box-shadow: 0 8px 24px rgba(212,176,14,0.35);
}
.done-tier-great .done-medal {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,141,56,0.3);
}
.done-tier-good .done-medal {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.done-tier-ok .done-medal {
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
}
.done-medal {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 34px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  animation: medalIn 0.55s cubic-bezier(0.2,1.4,0.4,1);
}
@keyframes medalIn {
  0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.medal-glyph { line-height: 1; }
.done-title { margin-bottom: 10px; }
.done-ratio-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 20px 0 24px;
}
.done-ratio-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-bright));
  transition: width 0.8s cubic-bezier(0.2,0.9,0.25,1) 0.2s;
  border-radius: 3px;
  animation: fillGrow 0.9s ease;
}
@keyframes fillGrow { from { width: 0%; } }
.done-tier-perfect .done-title { color: #8b6914; }
.done-tier-perfect { border-color: #e5d389; background: linear-gradient(180deg, #fffdf0, #ffffff); }
