/* wrongbook (H061): the shared 「wrong questions」 list and its end screen. Every class starts with .wb. Nothing floats (no fixed or sticky box).
   A subject may set --wb-accent (the big number) on a parent element. */
.wb { --wb-ink: var(--ink, #14213d); --wb-sub: var(--ink-2, #4b5563); --wb-line: var(--line, #e3e7ee); --wb-navy: var(--navy, #0f1f47); --wb-soft: #f6f8fb; --wb-link: #1f3c88; }
.wb p, .wb ul, .wb h2, .wb h3 { margin: 0; padding: 0; }
.wb ul { list-style: none; }
.wb [hidden] { display: none !important; }

.wb-sum { background: #fff; border: 1px solid var(--wb-line); border-radius: 16px; padding: 18px; margin: 0 0 16px; }
.wb-sum__n b { font-size: 2.6rem; line-height: 1.1; color: var(--wb-accent, var(--wb-navy)); margin-right: 6px; }
.wb-sum__n span { font-weight: 700; color: var(--wb-sub); }
.wb-sum .wb-chips { margin: 8px 0 14px; }

.wb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-chip { display: inline-block; background: var(--wb-soft); color: var(--wb-sub); border-radius: 8px; padding: 3px 9px; font-size: .875rem; }
.wb-chip--my { background: #fdecea; color: #a8201a; font-weight: 700; }
.wb-chip--ans { background: #e7f5ec; color: #126b3a; font-weight: 700; }
.wb-chip--sure { background: #fff1dc; color: #7c4700; font-weight: 700; }

.wb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.wb-btn--fill { display: flex; width: 100%; min-height: 52px; background: var(--wb-navy); border: 1px solid var(--wb-navy); color: #fff; }
.wb-btn--fill:hover, .wb-btn--fill:visited { color: #fff; }
.wb-btn--line { background: #fff; border: 1px solid #c7cedb; color: var(--wb-ink); }
.wb-btn--line:visited { color: var(--wb-ink); }
.wb-btn--danger { background: #a8201a; border: 1px solid #a8201a; color: #fff; }
.wb-btn:disabled { opacity: .5; cursor: default; }

.wb-gchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
.wb-gchip { flex: none; min-height: 44px; padding: 6px 16px; border: 1px solid #c7cedb; border-radius: 999px; background: #fff; color: var(--wb-sub); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.wb-gchip[aria-pressed="true"] { border-color: var(--wb-navy); background: #e9eefb; color: var(--wb-navy); }

.wb-card { background: #fff; border: 1px solid var(--wb-line); border-radius: 16px; margin: 0 0 14px; overflow: hidden; text-align: left; }
.wb-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--wb-line); }
.wb-card__name { font-size: 1.15rem; color: var(--wb-ink); }
.wb-card__sub { color: var(--wb-sub); font-size: .875rem; }
.wb-card__head .wb-btn { flex: none; }
.wb-row { padding: 14px 18px; }
.wb-row + .wb-row { border-top: 1px solid var(--wb-line); }
.wb-stem { font-weight: 700; color: var(--wb-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wb-row .wb-chips { margin: 10px 0 0; }
.wb .wb-from { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; color: var(--wb-sub); font-size: .8rem; }
.wb-from__hint { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wb-from__where { flex: none; margin-left: auto; white-space: nowrap; }
.wb .wb-learn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--wb-sub); font-size: .875rem; }
.wb-bar { display: inline-flex; gap: 5px; }
.wb-bar i { display: block; width: 26px; height: 10px; border-radius: 999px; background: var(--wb-line); }
.wb-bar i.on { background: var(--wb-link); }
.wb-explain { background: var(--wb-soft); border-radius: 12px; padding: 12px 16px; margin-top: 10px; line-height: 1.7; }
.wb-explain p + p { margin-top: 6px; }
.wb-acts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
@media (max-width: 420px) { .wb-acts { column-gap: 12px; } }
.wb-link { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--wb-link); text-decoration: none; cursor: pointer; }
.wb-more { display: block; width: 100%; min-height: 48px; background: none; border: 0; border-top: 1px solid var(--wb-line); font: inherit; font-weight: 700; color: var(--wb-link); cursor: pointer; }

.wb .wb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; color: var(--wb-sub); font-size: .875rem; margin-top: 4px; }
.wb-tidy__open { min-height: 44px; background: none; border: 0; padding: 0; margin-left: auto; font: inherit; color: var(--wb-sub); text-decoration: underline; cursor: pointer; }
.wb-tidy { border: 1px dashed #c7cedb; border-radius: 12px; padding: 12px; margin-top: 6px; }
.wb-tidy__row { display: flex; flex-wrap: wrap; gap: 8px; }
.wb .wb-tidy__ask { margin: 12px 0 8px; font-weight: 700; color: var(--wb-ink); }

.wb-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px solid var(--wb-line); border-radius: 16px; padding: 28px 18px; margin: 0 0 14px; text-align: center; }

.wb-end { text-align: center; margin: 8px 0 16px; }
.wb-end__h { font-size: 1.05rem; color: var(--wb-sub); }
.wb-end__score b { font-size: 3.6rem; line-height: 1.2; color: var(--wb-navy); }
.wb-end__score span { font-size: 1.5rem; font-weight: 700; color: var(--wb-sub); }
.wb .wb-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.wb-cell { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--wb-line); border-radius: 14px; padding: 14px 6px; font-size: .875rem; color: var(--wb-sub); word-break: keep-all; }
.wb-cell b { font-size: 1.8rem; line-height: 1.2; }
.wb-cell--out b { color: #126b3a; }
.wb-cell--once b { color: var(--wb-link); }
.wb-cell--again b { color: #a8201a; }
.wb-back { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 8px; font-weight: 700; color: var(--wb-link); text-decoration: none; }
