.stopwatch-page {
    height: auto;
    min-height: 100%;
    max-height: none;
    background: #f7f8fa;
    color: #21272d;
    line-height: 1.6;
}

.stopwatch-page #blog_badge {
    display: none;
}

.stopwatch {
    box-sizing: border-box;
    margin: 0 auto;
    padding: 12px;
    text-align: left;
}

.stopwatch *,
.stopwatch *::before,
.stopwatch *::after {
    box-sizing: border-box;
}

.stopwatch [hidden] {
    display: none !important;
}

.stopwatch-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    margin-bottom: 12px;
}

.stopwatch h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.stopwatch h2 {
    font-size: 22px;
    font-weight: 700;
}

.stopwatch-heading p {
    flex: 1;
    color: #53606d;
}

.stopwatch-heading a {
    color: #973737;
    white-space: nowrap;
}

.stopwatch label {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.stopwatch-help {
    color: #53606d;
    font-size: 14px;
    font-weight: 400;
}

.stopwatch input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #aeb8c2;
    border-radius: 6px;
    background: #fff;
    color: #21272d;
    font: inherit;
}

.stopwatch button {
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #963737;
    border-radius: 6px;
    background: #a63e3e;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.stopwatch button.secondary {
    border-color: #aeb8c2;
    background: #fff;
    color: #343e48;
}

.stopwatch button:hover:not(:disabled) {
    border-color: #732626;
    background: #873030;
    color: #fff;
}

.stopwatch button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.stopwatch :focus-visible {
    outline: 3px solid #175d9a;
    outline-offset: 3px;
}

.stopwatch-toolbar,
.stopwatch-summary,
.stopwatch-card-heading,
.stopwatch-section-heading,
.stopwatch-controls,
.stopwatch-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.stopwatch-toolbar {
    margin-bottom: 8px;
}

.stopwatch-summary {
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.stopwatch-summary > :last-child {
    white-space: nowrap;
}

#stopwatch-notes summary {
    cursor: pointer;
}

#stopwatch-notes p {
    margin-top: 8px;
}

.stopwatch-warning {
    padding: 12px;
    border-left: 4px solid #a63e3e;
    background: #fff0e8;
}

.stopwatch-section-heading {
    justify-content: space-between;
    margin-bottom: 18px;
}

#total-time,
.stopwatch-time,
.stopwatch table td {
    font-variant-numeric: tabular-nums;
}

.stopwatch-add {
    flex-wrap: nowrap;
}

.stopwatch-add input {
    width: 180px;
}

.stopwatch-add button {
    flex-shrink: 0;
}

.stopwatch-empty {
    padding: 32px 16px;
    border: 1px dashed #aeb8c2;
    border-radius: 8px;
    text-align: center;
}

.stopwatch-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 144px), 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.stopwatch-card {
    min-width: 0;
    padding: 8px;
    border: 2px solid #dce1e6;
    border-radius: 8px;
    background: #fff;
}

.stopwatch-card.is-running {
    border-color: #a63e3e;
    background: #fff8f6;
}

.stopwatch-card-heading {
    flex-wrap: nowrap;
    gap: 4px;
}

.stopwatch-card-heading label {
    flex: 1;
    min-width: 0;
}

.stopwatch-card input {
    min-height: 30px;
    padding: 4px 6px;
    font-size: 13px;
}

.stopwatch-card button {
    min-height: 30px;
    padding: 3px 6px;
}

.stopwatch-card [data-action="remove"] {
    flex-shrink: 0;
    width: 28px;
    font-size: 18px;
    line-height: 1;
}

.stopwatch-card [data-action="toggle"] {
    width: 100%;
}

.stopwatch-time {
    display: block;
    margin: 6px 0;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 20px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.stopwatch-status {
    flex: 1;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.stopwatch-report {
    margin-top: 36px;
    padding: 28px;
    border: 1px solid #dce1e6;
    border-radius: 10px;
    background: #fff;
    scroll-margin-top: 20px;
}

.stopwatch-table-wrap {
    margin: 20px 0;
    overflow-x: auto;
}

.stopwatch table {
    width: 100%;
    font-size: 15px;
}

.stopwatch th,
.stopwatch td {
    padding: 12px 10px;
    border-bottom: 1px solid #dce1e6;
    text-align: right;
    white-space: nowrap;
}

.stopwatch th {
    font-weight: 700;
}

.stopwatch th:first-child,
.stopwatch td:first-child {
    min-width: 100px;
    max-width: 320px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.stopwatch tfoot th,
.stopwatch tfoot td {
    border-top: 2px solid #aeb8c2;
    font-weight: 700;
}

.stopwatch .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 580px) {
    .stopwatch-heading p {
        flex-basis: 100%;
        order: 1;
    }

    .stopwatch-report {
        padding: 18px 12px;
    }
}

@media (pointer: coarse) {
    .stopwatch button,
    .stopwatch input {
        min-height: 44px;
    }

    .stopwatch-card [data-action="remove"] {
        width: 44px;
    }
}

@media print {
    .stopwatch-page {
        background: #fff;
        color: #000;
    }

    .stopwatch-page > header,
    .stopwatch-page #blog_badge,
    .stopwatch-heading,
    #stopwatch-app > :not(.stopwatch-report),
    .stopwatch-report .stopwatch-controls {
        display: none !important;
    }

    .stopwatch,
    .stopwatch-report {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .stopwatch-table-wrap {
        overflow: visible;
    }

    .stopwatch table {
        font-size: 11pt;
    }

    .stopwatch th,
    .stopwatch td {
        padding: 8px 4px;
    }

    .stopwatch tr {
        break-inside: avoid;
    }
}
