.tt-app { display: grid; gap: 18px; min-width: 0; }
.tt-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-width: 0; }
.tt-app h2 { margin: 0; font-size: 1rem; letter-spacing: -0.02em; }
.tt-heading-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tt-caption { color: var(--muted); font-size: 0.74rem; font-weight: 500; }
.tt-settings { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.tt-settings label { font-size: 0.8rem; }
.tt-settings .select { width: 100%; font-family: inherit; font-size: 0.85rem; min-height: 44px; }
.tt-live { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 12px; gap: 12px; }
.tt-live dt, .tt-personal-stats dt { color: var(--muted); font-size: 0.75rem; }
.tt-live dd { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 750; line-height: 1.5; font-variant-numeric: tabular-nums; }
.tt-live small { margin-left: 3px; font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.tt-live > div:first-child dd { color: var(--accent); }
.tt-progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 4px; overflow: hidden; background: var(--bg-soft); margin-bottom: 20px; }
.tt-progress::-webkit-progress-bar { background: var(--bg-soft); }
.tt-progress::-webkit-progress-value { background: var(--accent); }
.tt-progress::-moz-progress-bar { background: var(--accent); }
.tt-passage { position: relative; height: 176px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--muted); overflow-y: auto; overscroll-behavior: contain; font-size: 1.1rem; line-height: 2; letter-spacing: 0.02em; cursor: text; }
.tt-word { display: inline-block; white-space: pre; }
.tt-char.is-correct { color: var(--accent); }
.tt-char.is-error { color: var(--bad); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tt-char.is-current { box-shadow: -2px 0 0 var(--accent); }
.tt-input-wrap { margin-top: 18px; }
.tt-input-label { display: block; margin-bottom: 8px; font-size: 0.83rem; font-weight: 600; }
.tt-input { width: 100%; font-family: var(--sans); font-size: 1rem; line-height: 1.7; min-height: 106px; resize: vertical; }
.tt-input:focus { border-color: var(--accent); }
.tt-input:disabled { opacity: 0.65; }
.tt-note { margin: 12px 0; color: var(--muted); font-size: 0.76rem; line-height: 1.65; }
.tt-daily { padding: 10px 12px; background: var(--accent-soft); border-radius: var(--radius-sm); color: var(--accent); }
.tt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tt-app .btn { min-height: 44px; }
.tt-app button:disabled, .tt-app select:disabled { opacity: 0.55; cursor: not-allowed; }
.tt-shortcut { margin-left: auto; color: var(--muted); font-size: 0.71rem; }
.tt-shortcut kbd { font-size: 0.67rem; padding: 2px 5px; }
.tt-status { margin: 14px 0 0; font-size: 0.8rem; min-height: 1.6em; }
.tt-result { border-color: var(--accent); }
.tt-result-body { display: flex; align-items: center; gap: 36px; }
.tt-score { display: flex; flex-direction: column; min-width: 180px; }
.tt-score strong { font-size: clamp(2.8rem, 7vw, 4rem); line-height: 1.2; letter-spacing: -0.05em; font-weight: 800; color: var(--accent); }
.tt-score span { font-size: 0.8rem; color: var(--muted); }
.tt-result-details { margin: 0; flex: 1; }
.tt-result-details > div { display: flex; gap: 14px; justify-content: space-between; font-size: 0.8rem; margin: 6px 0; }
.tt-result-details dt { color: var(--muted); }
.tt-result-details dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-result .tt-actions { margin-top: 18px; }
.tt-personal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
.tt-personal-stats dd { margin: 4px 0 0; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tt-chart-wrap { margin: 18px 0 0; }
.tt-chart { display: flex; align-items: end; gap: 7px; height: 145px; padding: 20px 0 0; border-bottom: 1px solid var(--border); }
.tt-chart-item { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 5px; }
.tt-chart-label { color: var(--muted); font-size: 0.66rem; font-variant-numeric: tabular-nums; }
.tt-chart-bar { background: var(--accent-soft); border-top: 2px solid var(--accent); width: 100%; max-width: 42px; min-height: 3px; border-radius: 4px 4px 0 0; }
.tt-history-list { margin: 0; padding: 0; list-style: none; max-height: 355px; overflow-y: auto; }
.tt-history-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; border-top: 1px solid var(--border); padding: 12px 0; }
.tt-history-score { min-width: 74px; font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.tt-history-info { flex: 1; min-width: 180px; font-size: 0.76rem; }
.tt-history-info > span { display: block; color: var(--muted); font-size: 0.71rem; }
.tt-history-list time { color: var(--muted); font-size: 0.71rem; }
.tt-save-note { border-top: 1px solid var(--border); padding-top: 14px; margin-bottom: 0; }
body.tt-focus-view .sidebar, body.tt-focus-view .related-tools, body.tt-focus-view .tool-guide { display: none; }
body.tt-focus-view .tool-layout { display: block; }
body.tt-focus-view .tool-main { max-width: 950px; margin-inline: auto; }
body.tt-focus-view #tt-personal, body.tt-focus-view #tt-history { display: none; }
@media (max-width: 680px) {
  .tt-panel { padding: 16px; }
  .tt-settings { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tt-settings .field:first-child { grid-column: 1 / -1; }
  .tt-live { gap: 8px; }
  .tt-live dt { font-size: 0.66rem; }
  .tt-personal-stats { grid-template-columns: 1fr 1fr; }
  .tt-passage { padding: 12px; height: 152px; font-size: 1rem; }
  .tt-shortcut { display: none; }
  .tt-result-body { flex-direction: column; align-items: stretch; gap: 18px; }
  .tt-result-details { width: 100%; }
  .tt-score { min-width: 0; }
  .tt-history-info { min-width: 140px; }
  .tt-history-list time { flex-basis: 100%; }
  .tt-caption { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .tt-app *, body.tt-focus-view { scroll-behavior: auto; transition: none; }
}
