/* JJ Academy Update History — compact, closed by default, isolated styles */
#jj-update-history{border:1px solid var(--stroke);border-radius:10px;background:var(--panel);margin:13px 0 15px;overflow:hidden;}
body.chapter-mode #jj-update-history{display:none}
#jj-update-history > summary{list-style:none;cursor:pointer;padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;user-select:none}
#jj-update-history > summary::-webkit-details-marker{display:none}
#jj-update-history > summary:hover{background:var(--hover)}
#jj-update-history .jj-history-heading{display:flex;flex-direction:column;gap:2px;min-width:0}
#jj-update-history .jj-history-heading strong{font-size:13px;letter-spacing:.01em}
#jj-update-history .jj-history-heading small{font-size:11px;color:var(--muted)}
#jj-update-history .jj-history-caret{font-size:17px;color:var(--accent);transition:transform .16s}
#jj-update-history[open] .jj-history-caret{transform:rotate(90deg)}
#jj-update-history .jj-history-main{border-top:1px solid var(--stroke);padding:11px 12px 12px}
#jj-update-history .jj-history-controls{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin-bottom:9px}
#jj-update-history .jj-history-controls label{display:flex;flex-direction:column;gap:3px;color:var(--muted);font-size:11px}
#jj-update-history select,#jj-update-history input{border:1px solid var(--stroke);background:var(--bg);color:var(--text);border-radius:6px;padding:7px 8px;min-height:32px;max-width:100%;font-size:12px}
#jj-update-history #jj-history-search{flex:1;min-width:130px}
#jj-update-history .jj-history-controls button,#jj-update-history .jj-history-pages button{font:inherit;font-size:12px;color:var(--text);border:1px solid var(--stroke);background:var(--bg);border-radius:6px;min-height:31px;padding:5px 9px;cursor:pointer}
#jj-update-history .jj-history-controls button:hover,#jj-update-history .jj-history-pages button:hover:not(:disabled){background:var(--hover)}
#jj-update-history .jj-history-pages button:disabled{opacity:.35;cursor:default}
#jj-update-history .jj-history-pages button[aria-current=page]{border-color:var(--accent);color:var(--accent);font-weight:700}
#jj-update-history .jj-history-wrap{max-width:100%;overflow-x:auto;border:1px solid var(--stroke);border-radius:7px}
#jj-update-history table{width:100%;border-collapse:collapse;font-size:12px;min-width:690px}
#jj-update-history th{color:var(--muted);font-size:10px;letter-spacing:.03em;font-weight:700;text-align:left;background:var(--bg);padding:9px 10px;white-space:nowrap}
#jj-update-history td{padding:9px 10px;border-top:1px solid var(--stroke);vertical-align:top}
#jj-update-history tbody tr:nth-child(even){background:var(--hover)}
#jj-update-history td:first-child,#jj-update-history th:first-child{text-align:right;width:48px;font-variant-numeric:tabular-nums}
#jj-update-history .jj-history-time{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);font-size:11px}
#jj-update-history .jj-history-kind{white-space:nowrap;color:var(--muted);font-size:11px}
#jj-update-history .jj-history-desc{font-weight:550;line-height:1.35}
#jj-update-history .jj-history-sub{display:block;color:var(--muted);font-size:11px;font-weight:400;margin-top:3px}
#jj-update-history .jj-history-state{font-size:11px;white-space:nowrap}
#jj-update-history .jj-history-state[data-state=failed]{color:#f1a2a2}
#jj-update-history .jj-history-state[data-state=verified]{color:var(--accent)}
#jj-update-history .jj-history-footer{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;margin-top:10px;font-size:11px;color:var(--muted)}
#jj-update-history .jj-history-pages{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
#jj-update-history .jj-history-footnote{color:var(--muted);font-size:10px;margin:7px 0 0;line-height:1.4}
#jj-update-history .jj-history-empty{padding:16px;text-align:center;color:var(--muted)}
@media(max-width:680px){
#jj-update-history .jj-history-main{padding:9px}
#jj-update-history > summary{padding:11px}
#jj-update-history .jj-history-controls label{flex:1;min-width:100px}
#jj-update-history #jj-history-search{width:100%;flex-basis:100%}
#jj-update-history .jj-history-footer{align-items:flex-start}
}