    .flash-timer {
        position: absolute;
        top: 62px;
        /* just below toolbar */
        right: 24px;
        width: 220px;
        background: var(--surface-elevated);
        border: 1px solid var(--surface-border);
        border-radius: 14px;
        padding: 12px;
        color: var(--text-primary);
        box-shadow: var(--shadow-soft);
        z-index: 40;
    }

    .flash-timer.hidden {
        display: none;
    }

    .timer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        color: var(--text-secondary);
        opacity: 1;
    }

    .timer-header button {
        background: none;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
    }

    #timerDisplay {
        margin: 14px 0;
        font-size: 32px;
        font-weight: 600;
        text-align: center;
    }

    .timer-controls {
        display: flex;
        gap: 6px;
    }

    .timer-controls input {
        width: 70px;
        padding: 6px;
        border-radius: 8px;
        border: 1px solid var(--surface-border);
        background: var(--surface-base);
        color: var(--text-primary);
    }

    .timer-controls button {
        flex: 1;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        background: var(--accent-primary);
        color: var(--text-on-accent);
    }

    #timerBody {
        overflow: hidden;
        transition: max-height 0.25s ease, opacity 0.2s ease;
        max-height: 300px;
        opacity: 1;
    }

    #flashTimerPanel.collapsed #timerBody {
        max-height: 0;
        opacity: 0;
    }

    #flashTimerPanel.collapsed #timerToggleBtn {
        transform: rotate(-90deg);
    }

    #timerMiniDisplay {
        font-size: 14px;
        font-weight: 500;
        opacity: 0.85;
        margin-left: auto;
        margin-right: 8px;
        font-variant-numeric: tabular-nums;
    }

    /* Hide mini time when expanded */
    #flashTimerPanel:not(.collapsed) #timerMiniDisplay {
        display: none;
    }

    #timerDisplay,
    #timerMiniDisplay {
        font-variant-numeric: tabular-nums;
    }
