.reaction-page {
    --reaction-ink: #172033;
    --reaction-muted: #64748b;
    --reaction-green: #35b682;
    --reaction-green-dark: #237a5e;
    --reaction-page-space: 64px;
    --reaction-panel-space: 32px;

    border-radius: 32px;
    width: min(1200px, 100%);
    max-width: 1200px;
    min-width: 0;
    background-color: #ffffff;
    margin: 32px 0;
    padding: var(--reaction-page-space);
}

#reaction-test {
    scroll-margin-top: 128px;
}

.reaction-container {
    width: 100%;
    min-width: 0;
    padding-inline: 0;
}

.reaction-intro {
    width: 100%;
    max-width: 720px;
    min-width: 0;
    margin: 0 auto 28px;
    text-align: center;
}

.reaction-eyebrow,
.section-eyebrow {
    margin-bottom: 8px;
    color: var(--reaction-green-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.reaction-intro h2 {
    margin-bottom: 12px;
    color: var(--reaction-ink);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.reaction-intro > p:last-child {
    color: #475569;
    font-size: 18px;
    line-height: 1.6;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    position: absolute;
}

.mode-picker {
    border: 0;
    width: fit-content;
    min-height: 52px;
    background: #f6f7f8;
    margin: 0 auto;
    padding: 4px;
    display: flex;
    gap: 4px;
    border-radius: 999px;
    isolation: isolate;
    position: relative;
}

.mode-picker::before {
    border-radius: 999px;
    width: calc((100% - 12px) / 2);
    background: #ffffff;
    content: "";
    position: absolute;
    inset: 4px auto 4px 4px;
    z-index: 0;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mode-picker[data-mode="five"]::before {
    transform: translateX(calc(100% + 4px));
}

.mode-picker label {
    min-width: 116px;
    min-height: 44px;
    display: flex;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.mode-picker input {
    width: 1px;
    height: 1px;
    opacity: 0;
    position: absolute;
}

.mode-picker span {
    border-radius: 999px;
    width: 100%;
    min-height: 44px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #586579;
    font-size: 14px;
    font-weight: 650;
    transition: color 180ms ease;
}

.mode-picker input:checked + span {
    color: var(--reaction-ink);
}

.mode-picker input:focus-visible + span {
    outline: 3px solid rgb(53 182 130 / 34%);
    outline-offset: 1px;
}

.mode-picker:disabled label {
    cursor: not-allowed;
    opacity: 0.56;
}

.mode-help {
    margin: 8px auto 20px;
    color: #7b8797;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.reaction-stage-shell {
    width: 100%;
    min-width: 0;
    position: relative;
}

.reaction-stage {
    border: 0;
    border-radius: 28px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 360px;
    background: #f7f7f4;
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--reaction-ink);
    font: inherit;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    transition: background-color 220ms ease, color 220ms ease;
}

.fullscreen-button,
.stats-toggle-button {
    border: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: rgb(255 255 255 / 82%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #425066;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: absolute;
    z-index: 2;
    transition: opacity 180ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms ease,
    color 180ms ease;
}

.fullscreen-button {
    top: 16px;
    right: 16px;
}

.stats-toggle-button {
    bottom: 16px;
    left: 16px;
}

.stats-toggle-button svg {
    transform-origin: 50% 55%;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stats-toggle-button[aria-expanded="true"] {
    background: #ffffff;
    color: var(--reaction-green-dark);
}

.stats-toggle-button[aria-expanded="true"] svg {
    transform: rotate(-12deg);
}

.fullscreen-button:disabled {
    cursor: default;
    opacity: 0.42;
}

.fullscreen-button:focus-visible,
.stats-toggle-button:focus-visible {
    outline: 3px solid rgb(53 182 130 / 42%);
    outline-offset: 3px;
}

.fullscreen-exit-icon {
    display: none;
}

.reaction-stage-shell[data-fullscreen="true"] {
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.reaction-stage-shell[data-fullscreen="true"] .reaction-stage {
    border-radius: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.reaction-stage-shell[data-fullscreen="true"] .stage-title {
    font-size: clamp(52px, 9vw, 112px);
}

.reaction-stage-shell[data-fullscreen="true"] .fullscreen-button {
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
}

.reaction-stage-shell[data-fullscreen="true"] .stats-toggle-button {
    display: none;
}

.reaction-stage-shell[data-fullscreen="true"] .stage-action {
    bottom: max(24px, env(safe-area-inset-bottom));
}

.reaction-stage-shell[data-fullscreen="true"] .fullscreen-enter-icon {
    display: none;
}

.reaction-stage-shell[data-fullscreen="true"] .fullscreen-exit-icon {
    display: block;
}

.reaction-stage:focus-visible {
    outline: 4px solid rgb(53 182 130 / 36%);
    outline-offset: 4px;
}

.reaction-stage[data-state="waiting"] {
    background: #fff3e5;
    color: #72451e;
}

.reaction-stage[data-state="ready"] {
    background: var(--reaction-green);
    color: #ffffff;
}

.reaction-stage[data-state="too-soon"] {
    background: #fff0ec;
    color: #903e32;
}

.reaction-stage[data-state="round-result"],
.reaction-stage[data-state="complete"] {
    background: #edf8f3;
    color: var(--reaction-green-dark);
}

.reaction-stage[data-state="interrupted"],
.reaction-stage[data-state="timed-out"] {
    background: #f2f4f7;
    color: #475569;
}

.stage-kicker {
    max-width: 100%;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.14em;
    overflow-wrap: anywhere;
}

.stage-title {
    max-width: 100%;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.stage-hint {
    width: 100%;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.84;
    overflow-wrap: anywhere;
}

.stage-action {
    border-radius: 999px;
    min-height: 44px;
    background: radial-gradient(circle, #ffffff 8%, transparent 100%);
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--reaction-green-dark);
    font-size: 14px;
    font-weight: 700;

    position: absolute;
    bottom: 24px;
    left: 50%;

    transform: translateX(-50%);
}

.history-clear-button {
    border: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: transparent;
    color: #7c8985;
    font: inherit;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: opacity 180ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms ease,
    color 180ms ease;
}

.history-clear-button svg {
    display: block;
}

.history-clear-button:focus-visible {
    outline: 3px solid rgb(53 182 130 / 36%);
    outline-offset: 3px;
}

.history-clear-button:disabled {
    cursor: default;
    opacity: 0.36;
}

.history-clear-button:not(:disabled):active {
    opacity: 0.62;
}

.five-round-results {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 32px;
    padding: var(--reaction-panel-space);
    border-radius: 28px;
    background: radial-gradient(circle, #faf8f5 8%, transparent 100%);
}

.reaction-results {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 32px;
}

.history-summary::marker {
    content: "";
}

.results-panel {
    border-radius: 28px;
    background: radial-gradient(circle, #edf8f3 8%, transparent 100%);
    padding: var(--reaction-panel-space);
}

.recent-tests {
    position: relative;
    min-width: 0;
    margin-top: 24px;
}

.section-heading {
    min-width: 0;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading > div,
.section-heading h2,
.reaction-chart,
.chart-bars {
    min-width: 0;
}

.section-heading h2 {
    color: var(--reaction-ink);
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.section-heading > p {
    color: var(--reaction-muted);
    font-size: 13px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.result-summary > div {
    border-radius: 20px;
    min-width: 0;
    background: #ffffff;
    padding: 22px;
}

.result-summary dt {
    margin-bottom: 8px;
    color: var(--reaction-muted);
    font-size: 13px;
}

.result-summary dd {
    color: var(--reaction-ink);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 750;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.8fr));
    align-items: end;
    gap: clamp(16px, 3vw, 40px);
}

.stat-item {
    min-width: 0;
    min-height: 76px;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
}

.stat-item dt {
    margin-bottom: 5px;
    color: var(--reaction-muted);
    font-size: 13px;
}

.stat-item dd {
    color: var(--reaction-ink);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 750;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stat-best {
    min-height: 92px;
}

.stat-best dt {
    color: var(--reaction-green-dark);
}

.stat-best dd {
    color: var(--reaction-green-dark);
    font-size: clamp(44px, 6vw, 64px);
    line-height: 1;
}

.reaction-chart {
    margin-top: 28px;
    border-radius: 22px;
    background: #ffffff;
    padding: 24px 24px 20px;
}

.chart-bars {
    position: relative;
    height: 230px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(8px, 2vw, 28px);
}

.chart-bars::after {
    position: absolute;
    right: 0;
    bottom: 38px;
    left: 0;
    height: 1px;
    background: #edf1ee;
    content: "";
}

.chart-bar-item {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    grid-template-rows: 22px minmax(0, 1fr) 30px;
    gap: 8px;
    text-align: center;
}

.chart-bar-value {
    align-self: start;
    color: #536174;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.chart-bar-track {
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-inline: 4px;
}

.chart-bar {
    border-radius: 10px 10px 3px 3px;
    width: min(54px, 72%);
    height: var(--bar-size);
    display: block;
    background: #dce7e1;
    transform-origin: center bottom;
    animation: reaction-bar-rise 360ms ease-out var(--bar-delay) both;
}

.chart-bar-item.is-best .chart-bar {
    background: var(--reaction-green);
}

.chart-bar-label {
    min-height: 30px;
    color: var(--reaction-muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.chart-bar-label strong {
    margin-top: 2px;
    display: block;
    color: var(--reaction-green-dark);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.chart-bar-item.is-best .chart-bar-value {
    color: var(--reaction-green-dark);
}

@keyframes reaction-bar-rise {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

.device-note {
    max-width: 560px;
    margin-top: 14px;
    color: var(--reaction-muted);
    font-size: 13px;
    line-height: 1.6;
}

.fullscreen-button:not(:disabled):active,
.stats-toggle-button:active {
    opacity: 0.68;
}

.history-summary {
    min-height: 48px;
    padding: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--reaction-ink);
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
}

.history-summary::-webkit-details-marker {
    display: none;
}

.history-summary:focus-visible {
    outline: 3px solid rgb(53 182 130 / 36%);
    outline-offset: 3px;
}

.history-summary-copy {
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.recent-tests[open] .history-summary-copy {
    padding-right: 60px;
}

.history-summary-copy strong {
    font-size: 15px;
    font-weight: 700;
}

.history-summary-icon {
    flex: none;
    color: #718092;
    transition: opacity 180ms ease, transform 180ms ease;
}

.recent-tests[open] .history-summary-icon {
    transform: rotate(180deg);
}

.history-panel {
    margin-top: 4px;
}

.history-actions {
    position: absolute;
    z-index: 1;
    top: 4px;
    right: 34px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.history-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    gap: 4px;
}

.history-item {
    min-width: 0;
    padding: 16px 0;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    align-items: start;
    gap: 12px 24px;
}

.history-item:first-child {
    padding-top: 8px;
}

.history-list .history-item:last-child {
    padding-bottom: 0;
}

.history-meta {
    min-width: 0;
}

.history-mode {
    margin-bottom: 5px;
    color: #536174;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.history-time {
    color: var(--reaction-muted);
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
}

.history-time span {
    white-space: nowrap;
}

.history-score {
    min-width: 0;
    text-align: right;
}

.history-score strong {
    display: block;
    color: var(--reaction-ink);
    font-size: 22px;
    letter-spacing: -0.025em;
}

.history-item--single .history-score strong {
    font-size: 24px;
}

.history-score span {
    margin-bottom: 4px;
    display: block;
    color: var(--reaction-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.history-rounds {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    list-style: none;
}

.history-rounds li {
    min-width: 0;
    padding: 0;
    text-align: center;
}

.history-rounds span {
    display: block;
    color: var(--reaction-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.history-rounds strong {
    margin-top: 4px;
    display: block;
    color: #344155;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.history-rounds small {
    font: inherit;
}

.history-range {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 18px;
    color: var(--reaction-muted);
    font-size: 12px;
    line-height: 1.5;
}

.history-range span {
    white-space: nowrap;
}

.history-range span:first-child {
    color: var(--reaction-green-dark);
    font-weight: 700;
}

.feature-kicker {
    margin-bottom: 16px;
    display: block;
    color: #237a5e;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.14em;
}

[hidden] {
    display: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .fullscreen-button,
    .stats-toggle-button {
        opacity: 0;
        pointer-events: none;
        transition-duration: 480ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(3px);
    }

    .fullscreen-button:disabled {
        opacity: 0;
    }

    .reaction-stage-shell:hover .fullscreen-button:not(:disabled),
    .fullscreen-button:focus-visible,
    .reaction-stage-shell[data-fullscreen="true"] .fullscreen-button {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        transition-duration: 560ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reaction-stage-shell:hover .stats-toggle-button,
    .stats-toggle-button:focus-visible,
    .stats-toggle-button[aria-expanded="true"] {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        transition-duration: 560ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    .history-summary-icon {
        opacity: 0;
        transition-duration: 480ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    .history-clear-button {
        opacity: 0;
        pointer-events: none;
        transform: translateY(3px);
        transition-duration: 480ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reaction-results:hover .history-summary-icon,
    .history-summary:focus-visible .history-summary-icon {
        opacity: 1;
        transition-duration: 560ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reaction-results:hover .history-clear-button:not(:disabled),
    .history-clear-button:focus-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        transition-duration: 560ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mode-picker label:hover span {
        color: var(--reaction-green-dark);
    }

    .history-clear-button:not(:disabled):hover {
        background: rgb(142 104 86 / 9%);
        color: #8e6856;
    }

    .reaction-stage[data-state="idle"]:hover,
    .reaction-stage[data-state="interrupted"]:hover,
    .reaction-stage[data-state="timed-out"]:hover,
    .reaction-stage[data-state="too-soon"]:hover {
        background: #f0f6f2;
    }

    .reaction-stage[data-state="complete"]:hover,
    .reaction-stage[data-state="round-result"]:hover {
        background: #e6f4ed;
    }

    .reaction-stage[data-state="complete"]:hover .stage-action,
    .reaction-stage[data-state="round-result"]:hover .stage-action {
        color: var(--reaction-ink);
    }

    .fullscreen-button:not(:disabled):hover,
    .stats-toggle-button:hover {
        background: #ffffff;
        color: var(--reaction-green-dark);
    }
}

@media (max-width: 1023.98px) {
    .reaction-page {
        --reaction-page-space: 40px;
    }
}

@media (max-width: 767.98px) {
    .reaction-page {
        --reaction-page-space: 24px;
        --reaction-panel-space: 20px;
    }

    .reaction-intro {
        margin-bottom: 24px;
    }

    .reaction-intro > p:last-child {
        font-size: 16px;
    }

    .mode-picker {
        width: 100%;
    }

    .mode-picker label {
        min-width: 0;
        flex: 1;
    }

    .reaction-stage {
        border-radius: 24px;
        min-height: 300px;
        padding: 24px 18px;
    }

    .fullscreen-button {
        top: 12px;
        right: 12px;
    }

    .stats-toggle-button {
        bottom: 12px;
        left: 12px;
    }

    .stage-title {
        font-size: clamp(42px, 14vw, 60px);
    }

    .five-round-results {
        margin-top: 24px;
        border-radius: 24px;
    }

    .reaction-results {
        margin-top: 24px;
    }

    .results-panel {
        border-radius: 24px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading h2 {
        font-size: 24px;
    }

    .result-summary {
        gap: 8px;
    }

    .result-summary > div {
        padding: 16px;
        text-align: center;
    }

    .result-summary dd {
        font-size: clamp(18px, 5.25vw, 26px);
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 16px;
    }

    .stat-item {
        min-height: 64px;
    }

    .stat-best {
        grid-column: 1 / -1;
        min-height: 80px;
    }

    .stat-best dd {
        font-size: clamp(42px, 11vw, 56px);
    }

    .reaction-chart {
        border-radius: 18px;
        padding: 20px 16px 16px;
    }

    .chart-bars {
        height: 210px;
        gap: 8px;
    }

    .chart-bar {
        width: min(44px, 78%);
    }

    .chart-bar-value,
    .chart-bar-label {
        font-size: 10px;
    }

    .recent-tests {
        margin-top: 24px;
    }

    .history-item {
        padding: 14px 0;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 10px 16px;
    }

    .history-mode {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .history-time {
        font-size: 13px;
    }

    .history-score strong {
        font-size: 24px;
    }

    .history-rounds {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .history-rounds li {
        padding: 0;
        text-align: center;
    }

    .history-score span,
    .history-rounds span,
    .history-range {
        font-size: 12px;
    }

    .history-rounds strong {
        margin-top: 3px;
        font-size: clamp(11px, 3.4vw, 13px);
    }

    .history-rounds small {
        display: none;
    }

    .history-range {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
    }

    .device-note {
        font-size: 14px;
    }
}

@media (max-width: 559.98px) {
    .section-heading {
        gap: 12px;
    }

    .result-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .result-summary > div {
        padding: 16px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: baseline;
        gap: 16px;
        text-align: left;
    }

    .result-summary dt {
        margin-bottom: 0;
        font-size: 14px;
    }

    .result-summary dd {
        font-size: clamp(20px, 6vw, 24px);
    }

    .reaction-chart {
        padding: 18px 10px 14px;
    }

    .chart-bars {
        height: 190px;
        gap: 6px;
    }

    .chart-bars::after {
        bottom: 33px;
    }

    .chart-bar-item {
        grid-template-rows: 20px minmax(0, 1fr) 26px;
        gap: 7px;
    }

    .chart-bar {
        border-radius: 8px 8px 3px 3px;
        width: min(36px, 80%);
    }
}

@media (max-width: 420px) {
    .reaction-page {
        --reaction-page-space: 16px;
        --reaction-panel-space: 16px;
    }

    .mode-picker span {
        padding-inline: 10px;
    }

    .reaction-stage {
        padding-inline: 14px;
    }

    .stage-action {
        max-width: calc(100% - 28px);
        bottom: 18px;
        white-space: nowrap;
    }

    .five-round-results .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .reaction-chart {
        padding-inline: 0;
    }

    .history-item--five .history-score strong {
        font-size: 22px;
    }

    .history-time,
    .history-range {
        font-size: 11px;
    }

    .history-range {
        gap: 6px;
    }

}

@media (max-width: 347.98px) {
    .features-grid,
    .faq-grid {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (prefers-reduced-motion: reduce) {
    .mode-picker::before,
    .mode-picker span,
    .reaction-stage,
    .fullscreen-button,
    .stats-toggle-button,
    .stats-toggle-button svg,
    .history-clear-button,
    .history-summary-icon {
        transition: none;
    }

    .chart-bar {
        animation: none;
        transform: none;
    }
}

@media (forced-colors: active) {
    .mode-picker::before {
        border: 2px solid Highlight;
        background: Canvas;
    }

    .mode-picker input:checked + span {
        color: Highlight;
    }

    .reaction-stage,
    .fullscreen-button,
    .stats-toggle-button,
    .history-clear-button,
    .history-summary,
    .mode-picker span {
        border: 1px solid CanvasText;
    }

    .reaction-chart {
        border: 1px solid CanvasText;
    }

    .chart-bars::after,
    .chart-bar {
        background: CanvasText;
    }

    .chart-bar-item.is-best .chart-bar {
        background: Highlight;
    }
}
