.history-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:20px 0; padding:16px; background:#fff; border:1px solid #d9e0e8; border-radius:12px; }
.history-toolbar p { color:#475569; font-size:14px; margin:0; }
.history-actions { display:flex; gap:8px; flex-wrap:wrap; }
#customPeriod:not([hidden]) { display:flex; align-items:center; gap:12px; flex-wrap:wrap; width:100%; }
#customPeriod label { color:#334155; font-size:14px; }
#customPeriod input { border:1px solid #cbd5e1; padding:8px; border-radius:6px; font:inherit; }
.history-comparison { margin-bottom:20px; }
.history-comparison table { min-width:750px; width:100%; border-collapse:collapse; }
.history-comparison th,.history-comparison td { padding:13px 12px; text-align:left; border-bottom:1px solid #e2e8f0; color:#334155; font-size:14px; }
.history-comparison th { background:#f1f5f9; font-size:12px; }
.history-link { border:0; background:none; color:#17355d; cursor:pointer; text-align:left; font:inherit; font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.history-badge { display:inline-block; border-radius:6px; padding:5px 8px; color:#475569; background:#f1f5f9; white-space:nowrap; font-size:12px; }
.history-badge.good { background:#e5f5f3; color:#087f83; }
.history-badge.review { background:#fff3dc; color:#9a6016; }
.history-count { color:#64748b; font-size:13px; }
.record-mode #historyToolbar { display:none; }
button:disabled { cursor:wait; opacity:.6; }
#pageContent[aria-busy="true"] .filter-bar,#pageContent[aria-busy="true"] #viewOverview,#pageContent[aria-busy="true"] #viewDetail,#pageContent[aria-busy="true"] .tbl-card { pointer-events:none; opacity:.5; }
@media(max-width:700px) { .history-toolbar { padding:12px; } .history-actions { width:100%; } .history-actions button { flex:1; } }
.care-optional { margin:10px 0; border:1px solid #dbe3ec; border-radius:10px; background:#f8fafc; padding:10px 12px; }
.care-optional > summary { color:#475569; cursor:pointer; font-weight:800; }
.exception-launch { display:flex; align-items:end; gap:9px; margin-top:12px; flex-wrap:wrap; }
.exception-launch label { display:grid; gap:5px; color:#475569; font-size:.82rem; font-weight:800; }
.exception-launch select { min-width:220px; border:1px solid #cbd5e1; border-radius:8px; padding:9px; background:#fff; }
.exception-editor { margin:12px 0; padding:16px; border:2px solid #247a87; border-radius:12px; background:#f4fbfb; }
.exception-editor h3 { margin:0 0 5px; color:#17355d; }
.exception-editor textarea,.exception-editor input { width:100%; margin:6px 0 10px; border:1px solid #cbd5e1; border-radius:8px; padding:10px; font:inherit; }
.exception-presets { display:flex; gap:7px; margin:12px 0; flex-wrap:wrap; }
.exception-presets button { border:1px solid #9ccbd0; border-radius:999px; padding:7px 11px; background:#fff; color:#17656d; cursor:pointer; font-weight:800; }
.exception-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:12px; border-bottom:1px solid #e2e8f0; background:#fff; }
.exception-row p { margin:4px 0 0; color:#64748b; font-size:.84rem; }
.exception-row .exception-note { color:#9a6016; }
@media(max-width:700px) { .exception-row { grid-template-columns:1fr auto; } .exception-row button { grid-column:1/-1; } .exception-launch>* { width:100%; } }
@media print {
  header,.filter-bar,.history-actions,#customPeriod,#historyRetry,#tblMoreWrap,#btnBackOverview,.score-detail-modal,#practitionerPanel { display:none!important; }
  body,body.result-mode { background:#fff!important; color:#111!important; }
  .main { max-width:none!important; padding:0!important; }
  .result-hero { background:#fff!important; border-bottom:2px solid #17355d; color:#17355d!important; padding:12px 0!important; }
  .result-hero h1,.result-hero p,.result-period label { color:#17355d!important; }
  .chart-card,.stat-card,.detail-card,.history-toolbar,.tbl-card { box-shadow:none!important; break-inside:avoid; }
  .tbl-wrap { overflow:visible!important; }
  table { min-width:0!important; }
  th,td { font-size:9px!important; padding:5px!important; }
  .chart-wrap { height:190px!important; }
  .game-grid { display:none!important; }
  @page { size:A4 landscape; margin:12mm; }
}
