.keyword {
  color: #d43f3a;
  font-weight: 800;
  background: #fff0ef;
  border-radius: 4px;
  padding: 0 2px;
}
.quiz-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}
.quiz-nav .reveal {
  margin-left: auto;
  color: var(--red);
  border-color: #e7aaa8;
}
.quiz-nav button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.card-actions button {
  flex: 1 1 calc(50% - 8px);
  padding: 9px 10px;
  font-size: 13px;
}
.library-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}
.library-tools{display:flex;gap:9px;align-items:center}.library-tools select,.library-tools input{border:1px solid var(--line);border-radius:9px;background:white;padding:10px 12px;color:var(--ink)}.library-tools input{width:220px}.library-tools select{max-width:210px}
.library-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 10px;
}
.library-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef2f0;
  color: var(--muted);
  font-weight: bold;
}
.library-item small { color: var(--muted); }
.library-item h3 { margin: 7px 0 9px; line-height: 1.75; font-size: 16px; }
.library-item p { margin: 0; color: #195ca8; line-height: 1.65; font-weight: 600; }
.wrong-mark { color: #d43f3a; white-space: nowrap; }
.answer-arrow { color: #195ca8; font-weight: 900; }
@media (max-width: 900px) {
  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .reveal { margin-left: 0; }
  .library-head,.library-tools{flex-wrap:wrap}.library-tools input,.library-tools select{width:100%;max-width:none}
}
.number-panel {
  position: fixed;
  top: 0;
  right: -430px;
  width: min(420px, 92vw);
  height: 100vh;
  z-index: 20;
  background: #fff;
  color: var(--ink);
  padding: 26px;
  box-shadow: -14px 0 45px #11243d24;
  overflow-y: auto;
  transition: right .25s ease;
}
.number-backdrop{position:fixed;inset:0;z-index:19;background:#11243d2b;opacity:0;visibility:hidden;transition:.2s}.number-backdrop.show{opacity:1;visibility:visible}
.number-panel.show { right: 0; }
.number-panel-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.number-panel-head p { color: var(--muted); margin: 8px 0 0; }
.number-panel-head .icon-btn { background: #f4f6f3; color: var(--navy); border-color: var(--line); }
.number-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 10px; }
.number-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #b8c4ce;
  background: #fff;
  color: var(--navy);
  font-weight: bold;
  cursor: pointer;
}
.number-dot:hover,.number-dot.current { border-color: var(--orange); color: #c66c18; background:#fff5e9; }
.number-dot.correct { background: var(--green); border-color: var(--green); color: white; }
.number-dot.wrong { background: #db5b59; border-color: #db5b59; color: white; }
.quiz-summary{display:none;position:fixed;inset:0;z-index:30;background:#0d1d2fb8;place-items:center;padding:24px}.quiz-summary.show{display:grid}.summary-card{width:min(650px,96vw);background:white;border-radius:18px;padding:38px;text-align:center;box-shadow:0 22px 70px #07111d66}.summary-icon{display:grid;place-items:center;width:58px;height:58px;margin:auto;background:#e4f6ef;color:var(--green);border-radius:50%;font-size:30px;font-weight:bold}.summary-card h2{margin:14px 0 5px}.summary-card>p{color:var(--muted);margin:0 0 26px}.summary-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.summary-stats div{background:var(--paper);border-radius:11px;padding:16px 8px}.summary-stats strong,.summary-stats span{display:block}.summary-stats strong{font-size:24px}.summary-stats span{color:var(--muted);font-size:12px;margin-top:5px}.summary-actions{display:flex;justify-content:center;gap:12px;margin-top:26px}.summary-actions button:disabled,.wrong-category:disabled{opacity:.4;cursor:not-allowed}@media(max-width:600px){.summary-stats{grid-template-columns:repeat(2,1fr)}}
@media (min-width: 901px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .library-mode main > header {
    position: sticky;
    top: 0;
    z-index: 12;
    margin: -34px -5vw 0;
    padding: 34px 5vw 18px;
    background: rgba(244, 246, 243, .97);
    backdrop-filter: blur(10px);
  }
  .library-mode .library-head {
    position: sticky;
    top: 105px;
    z-index: 11;
    margin: 0 -5vw 18px;
    padding: 12px 5vw 18px;
    background: rgba(244, 246, 243, .97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
}
