 

#panel-speedread { align-items: stretch; justify-content: flex-start; }

.sr-wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 4px 4px 40px; min-width: 0; }
.sr-card { margin-bottom: 12px; }
.sr-intro { font-size: 13px; line-height: 1.55; margin: 0 0 12px; }
.sr-intro code {
  background: rgba(0,0,0,0.05); border-radius: 5px; padding: 1px 5px;
  font-size: 0.92em; word-break: break-all;
}
.sr-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--muted); margin: 0 0 6px;
}
 
.sr-shelf-groups { display: flex; flex-direction: column; gap: 14px; }
.sr-shelf-group .sr-shelf-subhead {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  margin: 0 0 6px; font-weight: 700;
}
.sr-story-detail { font-size: 13px; line-height: 1.5; margin: 10px 0 0; }
 
.sr-guiraudline { margin-top: 6px; }
.sr-guiraud { font-size: 12px; color: var(--muted); cursor: help; }
.sr-guiraud b { color: var(--text); font-weight: 700; }
 
.sr-setup-card { position: relative; }
.sr-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sr-spacer { flex: 1 1 auto; }
.sr-gear {
  font: inherit; font-size: 15px; line-height: 1; cursor: pointer;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 11px; color: var(--muted); flex: 0 0 auto;
}
.sr-gear:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.sr-settings {
  position: absolute; right: 14px; top: 48px; z-index: 20; max-width: 280px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 8px 26px rgba(20,30,60,0.16);
}
.sr-settings.sr-hide { display: none; }
.sr-settings-lbl {
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.sr-settings-note { font-size: 11.5px; line-height: 1.45; margin-top: 9px; }

.sr-setup-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sr-setup-msg { font-size: 13px; line-height: 1.4; }
.sr-setup-msg.err, .sr-log-note.err { color: var(--accent-2); }
.sr-empty { font-size: 13px; padding: 8px 2px; }

 
.sr-runlist { display: flex; flex-direction: column; gap: 2px; }
.sr-runline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text);
  background: none; border: 0; border-radius: 8px; padding: 7px 8px;
}
.sr-runline:hover { background: rgba(0,0,0,0.035); }
.sr-runline-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.sr-runline-story { font-weight: 600; min-width: 0; }
.sr-runline-wpm, .sr-runline-time { font-variant-numeric: tabular-nums; }
.sr-runline-time { color: var(--muted); }
.sr-runline .sr-run-pills { margin-left: auto; }

 
.sr-table-wrap { overflow-x: auto; min-width: 0; max-width: 100%; }
.sr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sr-table th, .sr-table td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.sr-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.sr-table td.sr-num, .sr-table th.sr-num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-table tbody tr:last-child td { border-bottom: 0; }
.sr-run-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.sr-mini-pill {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--sr-c, var(--muted));
  border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums;
}
 
.sr-chapter-table tbody tr td:first-child { box-shadow: inset 6px 0 0 var(--sr-c, transparent); }
 
.sr-row-swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 999px;
  background: var(--sr-c, var(--muted)); margin-right: 6px; vertical-align: -1px;
}
.sr-chapter-table th[data-sr-sort] { cursor: pointer; user-select: none; }
.sr-chapter-table th[data-sr-sort]:hover { color: var(--text); }
.sr-chapter-table th[data-sr-sort]:hover .sr-sort-arrow { color: var(--text); }
.sr-allch-table th[data-sr-asort] { cursor: pointer; user-select: none; }
.sr-allch-table th[data-sr-asort]:hover { color: var(--text); }
.sr-allch-table th[data-sr-asort]:hover .sr-sort-arrow { color: var(--text); }
.sr-sort-active { color: var(--text) !important; }
 
.sr-sort-arrow { margin-left: 4px; font-size: 0.8em; color: var(--muted); }
.sr-sort-arrow-active { color: var(--accent); font-weight: 800; }
 
.sr-allch-table .sr-sort-arrow { display: none; }
 
.sr-allch-table th { position: relative; }
.sr-th-resize-grip {
  position: absolute; top: 0; right: -3px; bottom: 0; width: 6px;
  cursor: col-resize; touch-action: none; opacity: 0;
   
  z-index: 2;
}
.sr-allch-table th:hover .sr-th-resize-grip, .sr-th-resize-grip:active { opacity: 1; background: #cdd8f5; }
.sr-colwidths-reset-btn {
  border: none; background: transparent; color: var(--muted);
  font: inherit; font-size: inherit; cursor: pointer; padding: 0; text-decoration: underline;
  text-decoration-style: dotted;
}
.sr-colwidths-reset-btn:hover { color: var(--accent); }

 
.sr-allch-hint { font-size: 12px; }
 
.sr-allch-table { table-layout: fixed; }
 
.sr-allch-table th:nth-child(1), .sr-allch-table td:nth-child(1) { width: 10%; }
.sr-allch-table th:nth-child(2), .sr-allch-table td:nth-child(2) { width: 4%; }
.sr-allch-table th:nth-child(3), .sr-allch-table td:nth-child(3) { width: 9%; }
.sr-allch-table th:nth-child(4), .sr-allch-table td:nth-child(4) { width: 27%; }
.sr-allch-table th:nth-child(5), .sr-allch-table td:nth-child(5) { width: 6%; }
.sr-allch-table th:nth-child(6), .sr-allch-table td:nth-child(6) { width: 27%; }
.sr-allch-table th:nth-child(7), .sr-allch-table td:nth-child(7) { width: 6%; }
.sr-allch-table th:nth-child(8), .sr-allch-table td:nth-child(8) { width: 5.5%; }
.sr-allch-table th:nth-child(9), .sr-allch-table td:nth-child(9) { width: 5.5%; }
.sr-allch-table td { vertical-align: top; }
 
.sr-allch-table .sr-allch-story { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sr-allch-table td.sr-yes { font-weight: 700; }
.sr-allch-table td.sr-textcell { white-space: normal; cursor: pointer; line-height: 1.45; }
 
.sr-allch-table .sr-txt-short {
  display: block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
 
.sr-allch-table .sr-txt-full { display: none; max-width: 46ch; }
.sr-allch-table tr.sr-open .sr-txt-short { display: none; }
.sr-allch-table tr.sr-open .sr-txt-full { display: block; }
.sr-allch-table tbody tr:hover td { background: rgba(0,0,0,0.025); }
.sr-allch-table tbody tr.sr-open td { background: rgba(0,0,0,0.04); }
 
.sr-allch-table tbody tr td:first-child { box-shadow: inset 6px 0 0 var(--sr-c, transparent); }

 
.sr-results-card { margin-bottom: 12px; }
.sr-results-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.sr-big { font-size: 3rem; line-height: 1; font-weight: 800; letter-spacing: -0.02em; }
.sr-big-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.sr-results-sub { font-size: 13px; }
.sr-lang-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px; margin-bottom: 16px; min-width: 0;
}
.sr-lang-pill {
  border: 1px solid var(--border); border-left: 4px solid var(--sr-c, var(--muted));
  border-radius: 10px; padding: 8px 12px; background: var(--bg); min-width: 0;
}
.sr-lang-name { display: block; font-size: 12px; color: var(--muted); }
.sr-lang-wpm { display: block; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sr-lang-sub { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sr-chapter-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-bottom: 8px;
}
.sr-inline-title { margin: 0; }
.sr-log-note { font-size: 12px; line-height: 1.5; margin-top: 12px; }
.sr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

 
body.sr-reading header { display: none; }
body.sr-reading .app-footer { display: none; }
body.sr-reading .page-wrap { padding: 0; gap: 0; max-width: none; }
body.sr-reading #panel-speedread { padding: 0; }
body.sr-reading .sr-wrap { max-width: none; padding: 0; }

#sr-reading { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 0; }
#sr-reading[hidden] { display: none; }
.sr-read-inner {
  flex: 1 1 auto; min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center;
   
  justify-content: center;
  justify-content: safe center;
  padding: 28px 20px 40px;
}
 
.sr-read-title {
  display: none;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); text-align: center; margin-bottom: 22px; max-width: 100%;
}
 
.sr-passage {
  width: 100%; max-width: 34em; min-width: 0;
  font-size: clamp(1.05rem, 1.6vw + 0.75rem, 1.45rem);
  line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere;
  color: var(--text); margin: 0 auto;
}
@media (max-width: 600px) {
  .sr-wrap { padding: 2px 0 32px; }
  .sr-read-inner { padding: 18px 16px 32px; }
  .sr-big { font-size: 2.4rem; }
  .sr-lang-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
