/* Readable type and compact, aligned number rows at every viewport. */
body { font-size:16px; }
.filter-title, .settings-group>summary strong, .toolbar strong,
.lab-rule h3, .generate-config { font-size:16px; }
h2, .section-top h2 { font-size:18px; }
.field input, .field select, .friendly-content select,
.rule-policy select, .lab-result-controls select { font-size:16px; }
.filter-evidence, .setting-example, .setting-stat, .fineprint,
.settings-group>summary small, .rule-policy p { line-height:1.65; }
.filter-evidence small, .brand-sub { font-size:14px; }
.result-row-heading { flex-wrap:wrap;row-gap:4px; }
.result-row, #result-dialog .result-row { height:auto;min-height:94px;padding-top:14px;padding-bottom:14px; }
.result-panel .result-row .ball { font-size:14px; }
.result-rule-note { font-size:14px;line-height:1.55; }
#result-dialog { width:480px; }
#result-dialog .dialog-actions.result-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
#result-dialog .result-actions .button { width:100%;min-width:0;min-height:50px;font-size:14px;padding:10px 8px;white-space:nowrap; }
.result-empty { padding:20px 4px;font-size:16px;color:var(--muted);line-height:1.7; }
.saved-round-group { max-width:900px;margin-bottom:28px; }
.saved-round-heading { display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:16px;align-items:center;margin-bottom:12px;padding:12px 16px; }
.saved-round-heading strong { font-size:18px; }
.saved-round-heading small { line-height:1.6; }
.saved-delete-selected { min-height:44px;white-space:nowrap; }
.saved-list { list-style:none;padding:0;margin:0;display:grid;gap:10px; }
.saved-row { display:grid;grid-template-columns:48px minmax(0,1fr) 52px 60px;align-items:center;gap:16px;padding:12px 16px; }
.saved-row { border:1px solid var(--line);border-radius:12px;background:var(--paper); }
.saved-row.is-selected { background:var(--mint);border-color:var(--line-active); }
.saved-select-label { display:grid;place-items:center;min-height:44px;cursor:pointer; }
.saved-select-label input { width:22px;height:22px;margin:0;accent-color:var(--green); }
.saved-rank { text-align:center;font-size:14px;white-space:nowrap;color:var(--muted); }
.saved-rank.is-win { color:var(--accent-text);font-weight:700; }
.saved-row .balls { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;width:100%;max-width:380px; }
.saved-row .ball { width:100%;max-width:42px;height:auto;aspect-ratio:1;font-size:16px; }
.saved-remove { min-width:0;min-height:44px;padding:0;border:0;background:transparent;color:var(--danger);font-size:14px; }
.gap-choices span, .gap-choices small { white-space:normal;line-height:1.5; }
.gap-choices label { align-items:flex-start; }
.gap-choices input { margin-top:3px; }
.lab-rule-stat, .lab-results-title { flex-wrap:wrap;row-gap:8px; }
.lab-comparison-row { grid-template-columns:105px minmax(0,1fr) 65px;font-size:14px; }
.lab-draw-heading { flex-wrap:wrap;row-gap:8px; }
.lab-result-tag { font-size:14px; }
.lab-result-controls { flex-wrap:wrap; }
.lab-result-controls select { max-width:100%; }
.lab-card-actions { flex-wrap:wrap; }
.lab-category-tabs button { padding-left:9px;padding-right:9px; }
.lab-period-presets .button { min-width:0;padding-left:7px;padding-right:7px; }
.brand-sub { letter-spacing:.6px; }
.rail-label { letter-spacing:.6px; }
@media(max-width:900px) {
  .rail .nav { font-size:14px;white-space:nowrap; }
  .preset-tools .toolbar-actions #load-preset,
  .preset-tools .toolbar-actions .button { font-size:14px;min-height:44px; }
  .preset-tools #reset { font-size:14px; }
  .parity-summary, .filter-bottom strong { font-size:16px; }
  .filter p { font-size:14px; }
  .lab-category-tabs button { white-space:normal;line-height:1.4;padding-left:6px;padding-right:6px; }
  .saved-row { grid-template-columns:24px minmax(0,1fr) 32px 32px;gap:4px;padding-left:6px;padding-right:6px; }
  .saved-round-heading { grid-template-columns:24px minmax(0,1fr) auto;gap:8px;padding-left:6px;padding-right:6px; }
  .saved-delete-selected { padding-left:9px;padding-right:9px;font-size:14px; }
  .saved-row .balls { max-width:380px;gap:3px; }
  .saved-row .ball { max-width:36px; }
  .page-heading>.button { min-width:70px; }
  .history-row { gap:12px; }
  .history-row .balls { width:100%;justify-content:flex-start;gap:5px; }
  .history-row .ball { width:30px;height:30px;font-size:14px;flex-shrink:0; }
}
@media(max-width:380px) {
  .preset-tools .toolbar-actions { gap:4px; }
  .preset-tools .toolbar-actions #load-preset,
  .preset-tools .toolbar-actions .button { padding-left:6px;padding-right:6px; }
  .preset-tools #reset { padding-left:2px;padding-right:2px; }
  .saved-row .ball { font-size:14px; }
  .gap-choices label { padding-left:4px;padding-right:4px;gap:4px; }
  .parity-control { padding-left:10px;padding-right:10px; }
  #result-dialog .result-list { padding-left:8px;padding-right:8px; }
  .page-heading { flex-wrap:wrap; }
  .page-heading>div:first-child { flex:1; }
  .page-heading h1 { font-size:25px; }
  .page-heading>.button { font-size:14px;padding-left:8px;padding-right:8px; }
}
