/* Chronometer & Lap Timer — big face, controls, lap table. Shares web-* primitives from main.css. */
.chrono-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; min-height: 150px; padding: 1rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-md, 12px); background: var(--surface); text-align: center; container-type: inline-size; }
.chrono-main { font-family: var(--font-mono); font-weight: 600; font-size: clamp(2.4rem, 17cqw, 5.2rem); line-height: 1; letter-spacing: -0.02em; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.chrono-main small { font-size: 0.5em; color: var(--text-secondary); }
.chrono-face.is-running .chrono-main { color: var(--brand); }
.chrono-face.is-over { border-color: var(--brand); animation: chrono-flash 0.8s ease-in-out 4; }
@keyframes chrono-flash { 50% { background: rgba(220, 70, 20, 0.12); } }
.chrono-sub { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); min-height: 1.2em; font-variant-numeric: tabular-nums; }
.chrono-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.85rem; }
.chrono-btn { min-height: 52px; justify-content: center; font-size: 0.92rem; }
.chrono-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chrono-set { margin-top: 0.85rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.chrono-set[hidden], .chrono-presets[hidden] { display: none; }
.chrono-set-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.74rem; color: var(--text-muted); min-width: 0; }
.chrono-set-field input { min-height: 44px; font-family: var(--font-mono); font-size: 1.1rem; text-align: center; min-width: 0; }
.chrono-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.chrono-presets .btn-toolbar-sm { min-height: 44px; }
.chrono-keys { margin: 0.85rem 0 0; text-align: center; }
.chrono-keys kbd { font-family: var(--font-mono); font-size: 0.72rem; padding: 0.05rem 0.35rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); }
.chrono-table-wrap { margin-top: 0.75rem; max-height: 440px; }
.chrono-table th { width: auto; }
.chrono-table td:first-child, .chrono-table th:first-child { width: 2.6rem; color: var(--text-muted); }
.chrono-table tr.is-best td { color: #15803d; font-weight: 600; }
.chrono-table tr.is-worst td { color: #b91c1c; }
[data-theme="dark"] .chrono-table tr.is-best td { color: #4ade80; }
[data-theme="dark"] .chrono-table tr.is-worst td { color: #f87171; }
#tool-card:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 2rem; background: var(--bg, #fff); }
#tool-card:fullscreen .chrono-main { font-size: clamp(4rem, 22cqw, 18rem); }
