.timer-app {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0 20px 20px;
    gap: 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--luma-accent)) 0%, var(--surface) 26%);
}

.timer-header h1 { font-size: 19px; font-weight: 640; }
.timer-header p { color: var(--ink-muted); font-size: 12px; margin-top: 2px; }

.timer-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--ink) 6%, var(--surface-raised));
}
.timer-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 560;
    color: var(--ink-muted);
    background: transparent;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.timer-tab:hover { color: var(--ink); }
.timer-tab.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 14%, transparent);
}
.timer-tab:focus-visible { outline: 2px solid var(--luma-accent); outline-offset: 1px; }

.timer-body { flex: 1; display: flex; }
.timer-panel { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; justify-content: center; }

.timer-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.timer-preset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 560;
    color: var(--ink-muted);
    background: color-mix(in srgb, var(--ink) 6%, var(--surface-raised));
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.timer-preset:hover { color: var(--ink); }
.timer-preset.is-active {
    background: color-mix(in srgb, var(--luma-accent) 14%, var(--surface-raised));
    color: var(--luma-accent);
}
.timer-preset__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--preset-tone);
}
.timer-preset:focus-visible { outline: 2px solid var(--luma-accent); outline-offset: 2px; }

.timer-display {
    font-size: 64px;
    font-weight: 680;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.timer-display--stopwatch { font-size: 52px; }

.timer-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.timer-btn {
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    background: color-mix(in srgb, var(--ink) 6%, var(--surface-raised));
    cursor: pointer;
    transition: background 0.12s ease, transform 0.05s ease;
}
.timer-btn:hover { background: color-mix(in srgb, var(--ink) 11%, var(--surface-raised)); }
.timer-btn:active { transform: scale(0.97); }
.timer-btn:focus-visible { outline: 2px solid var(--luma-accent); outline-offset: 2px; }
.timer-btn--primary { background: var(--luma-accent); color: var(--surface); }
.timer-btn--primary:hover { background: color-mix(in srgb, var(--luma-accent) 85%, black); filter: brightness(1.05); }

.timer-laps {
    list-style: none;
    width: 100%;
    max-width: 360px;
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.timer-lap {
    display: flex;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--ink) 5%, var(--surface-raised));
    font-variant-numeric: tabular-nums;
}
.timer-lap__label { color: var(--ink-muted); font-size: 12px; }
.timer-lap__time { font-size: 14px; font-weight: 600; }

@container (max-width: 300px) {
    .timer-display { font-size: 46px; }
    .timer-display--stopwatch { font-size: 38px; }
}
