/* 复习测验（卡片式）。无 JS 时显示完整列表；.pn-quiz--js 时一次只显示一张卡片。 */
.pn-quiz { --pn-accent: #0f766e; --pn-accent-soft: #e7f3f1; --pn-ok: #15803d; --pn-ng: #b91c1c; --pn-line: #e4e0d8; --pn-soft: #f6f4ef; --pn-mut: #6b7078;
	font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif; }
.pn-quiz :where(h2, h3) { font-family: inherit; }
.pn-btn { font: inherit; font-size: 14px; line-height: 1.2; padding: 8px 14px; border-radius: 8px; cursor: pointer; border: 1px solid var(--pn-line); background: #fff; color: #1f2933; }
.pn-btn:hover:not(:disabled) { border-color: var(--pn-accent); }
.pn-btn:disabled { opacity: .4; cursor: default; }
.pn-btn-primary { background: var(--pn-accent); border-color: var(--pn-accent); color: #fff; }

/* 面板 */
.pn-quiz-panel { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; margin: 0 0 12px; padding: 14px 16px;
	background: #fff; border: 1px solid var(--pn-line); border-radius: 12px; }
.pn-quiz-score { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; }
.pn-quiz-score strong { font-size: 18px; color: var(--pn-accent); }
.pn-quiz-score span { color: var(--pn-mut); font-size: 13px; }
.pn-quiz-bar { grid-column: 1 / -1; height: 6px; background: var(--pn-soft); border-radius: 99px; overflow: hidden; }
.pn-quiz-bar span { display: block; height: 100%; width: 0; background: var(--pn-accent); transition: width .3s ease; }
.pn-quiz-note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--pn-mut); line-height: 1.5; }
.pn-hint { white-space: nowrap; }

/* 章节标签 */
.pn-tabs { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin: 0 0 14px; }
.pn-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; cursor: pointer;
	border: 1px solid var(--pn-line); background: #fff; color: #1f2933; font: inherit; }
.pn-tab-no { font-size: 16px; font-weight: 700; }
.pn-tab-score { font-size: 11px; color: var(--pn-mut); font-variant-numeric: tabular-nums; }
.pn-tab.is-done { border-color: #a7d7cf; }
.pn-tab.is-active { background: var(--pn-accent); border-color: var(--pn-accent); color: #fff; }
.pn-tab.is-active .pn-tab-score { color: #d5efea; }

/* 题目地图 */
.pn-map { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 4px 0 12px; }
.pn-map-group { display: flex; flex-wrap: wrap; gap: 4px; padding-right: 14px; border-right: 1px solid var(--pn-line); }
.pn-map-group:last-child { border-right: 0; }
.pn-dot { min-width: 34px; height: 26px; padding: 0 5px; border-radius: 6px; cursor: pointer; font: 11px/1 ui-monospace, Menlo, monospace;
	border: 1px solid var(--pn-line); background: #fff; color: var(--pn-mut); }
.pn-dot.is-seen { background: var(--pn-soft); }
.pn-dot.is-right { background: #dcfce7; border-color: #86efac; color: var(--pn-ok); }
.pn-dot.is-wrong { background: #fee2e2; border-color: #fca5a5; color: var(--pn-ng); }
.pn-dot.is-current { outline: 2px solid var(--pn-accent); outline-offset: 1px; color: #1f2933; }

/* 例题 */
.pn-ex-box { margin: 0 0 14px; font-size: 14px; }
.pn-ex-box summary { cursor: pointer; color: var(--pn-accent); font-weight: 600; }
.pn-ex-box .pn-ex { margin: 6px 0 0; color: #3a3f46; }

/* 章节、组标题 */
.pn-quiz-ch h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pn-ch-range { font-size: .6em; font-weight: 400; opacity: .7; }
.pn-quiz-group h3 { font-size: 15px; margin: 0 0 8px; color: var(--pn-mut); font-weight: 600; }
.pn-qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* 题目卡片 */
.pn-q { border: 1px solid var(--pn-line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.pn-q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pn-q-label { font: 600 13px/1 ui-monospace, Menlo, monospace; color: var(--pn-accent); background: var(--pn-accent-soft); padding: 4px 8px; border-radius: 6px; }
.pn-q-pts { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--pn-accent); }
.pn-q-body { font-family: var(--pn-serif, Georgia, "Hiragino Mincho ProN", serif); font-size: 17px; line-height: 1.75; }
.pn-q-meta { display: inline-block; font-family: system-ui, sans-serif; font-size: 13px; color: var(--pn-mut); }
.pn-proof { color: #9a3412; font-weight: 600; }
.pn-q-show, .pn-q-marks, .pn-q-head { display: none; }
.pn-q-marks { gap: 8px; margin-top: 14px; }
.pn-mark { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px;
	border: 1px solid var(--pn-line); background: #fff; color: #3a3f46; }
.pn-mark-sym { font-size: 18px; line-height: 1; }
.pn-mark-o[aria-pressed="true"] { background: var(--pn-ok); border-color: var(--pn-ok); color: #fff; }
.pn-mark-x[aria-pressed="true"] { background: var(--pn-ng); border-color: var(--pn-ng); color: #fff; }
.pn-q.is-right { border-color: #86efac; }
.pn-q.is-wrong { border-color: #fca5a5; }

/* 上一题 / 下一题 */
.pn-nav { display: none; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pn-pos { font-size: 13px; color: var(--pn-mut); font-variant-numeric: tabular-nums; }

/* ---- 有 JS：卡片模式 ---- */
.pn-quiz--js:focus { outline: none; }
.pn-quiz--js .pn-quiz-ch, .pn-quiz--js .pn-quiz-group, .pn-quiz--js .pn-q { display: none; }
.pn-quiz--js .pn-quiz-ch.is-active, .pn-quiz--js .pn-quiz-group.has-current, .pn-quiz--js .pn-q.is-current { display: block; }
.pn-quiz--js .pn-q-head { display: flex; }
.pn-quiz--js .pn-q-body { display: none; }
.pn-quiz--js .pn-q.is-open .pn-q-body { display: block; }
.pn-quiz--js .pn-q.is-open .pn-q-marks { display: flex; }
.pn-quiz--js .pn-q:not(.is-open) .pn-q-show { display: block; margin: 6px 0 2px; }
.pn-quiz--js .pn-q { min-height: 150px; }
.pn-quiz--js .pn-nav { display: flex; }

@media (max-width: 640px) {
	.pn-tabs { grid-template-columns: repeat(5, 1fr); }
	.pn-quiz-panel { grid-template-columns: 1fr; }
	.pn-map-group { border-right: 0; padding-right: 0; }
	.pn-mark-txt { display: none; }
}
