/* Timer app. Uses the site.css variables only. */
.t-modes ul { list-style: none; display: flex; gap: 6px; padding: 4px; margin: 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.t-modes a { display: block; padding: 8px 16px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; min-height: 40px; }
.t-modes a[aria-current="page"] { background: var(--ink); color: var(--bg); }

.t-app { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 20px; text-align: center; }
.t-label { margin: 0; color: var(--muted); font-size: 15px; min-height: 1.6em; }
.t-display { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-size: clamp(48px, 17vw, 140px); margin: 10px 0 18px; white-space: nowrap; }
.t-app[data-timer="countdown"] .t-display { font-size: clamp(36px, 12vw, 112px); }
.t-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.t-btn { min-height: 48px; min-width: 48px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.t-btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.t-btn[disabled] { opacity: 0.45; cursor: default; }
.t-btn[data-act="start"] { min-width: 120px; }

.t-setup { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: end; margin: 20px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.t-hms { display: flex; gap: 8px; border: 0; padding: 0; margin: 0; }
.t-setup label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); text-align: left; }
.t-setup input { font: inherit; font-size: 18px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); min-height: 48px; }
.t-hms input { width: 76px; text-align: center; font-family: var(--mono); }
.t-wide { flex: 1 1 220px; }
.t-presets ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0; margin: 12px 0 0; }
.t-presets a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; }
.t-presets a:hover { border-color: var(--accent); }

.t-laps { list-style: none; padding: 0; margin: 16px auto 0; max-width: 420px; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: left; }
.t-laps li { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.t-keys { margin-top: 14px; text-align: left; font-size: 14px; color: var(--muted); }
.t-keys summary { cursor: pointer; min-height: 32px; }
.t-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; }
.t-keys dd { margin: 0; }
kbd { font-family: var(--mono); font-size: 13px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--bg); }

.t-done .t-display { color: var(--bad); animation: t-blink 1s steps(2, start) infinite; }
@keyframes t-blink { to { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .t-done .t-display { animation: none; } }

/* Full screen: the real API, or a fixed overlay where the API is missing (iPhone). */
.t-app:fullscreen, .t-app.t-big { display: flex; flex-direction: column; justify-content: center; border-radius: 0; border: 0; padding: 24px; background: var(--bg); }
.t-app.t-big { position: fixed; inset: 0; z-index: 50; }
.t-app:fullscreen .t-display, .t-app.t-big .t-display { font-size: min(22vw, 40vh); }
.t-app[data-timer="countdown"]:fullscreen .t-display, .t-app[data-timer="countdown"].t-big .t-display { font-size: min(14vw, 30vh); }
.t-app:fullscreen .t-setup, .t-app:fullscreen .t-presets, .t-app:fullscreen .t-keys, .t-app:fullscreen .t-laps,
.t-app.t-big .t-setup, .t-app.t-big .t-presets, .t-app.t-big .t-keys { display: none; }
