:root {
    /* Log surfaces retain this after promotion out of the app into a dialog. */
    --trip-log-shell-radius: 14px;
    --wm-blue: #0053e2;
    --wm-blue-dark: #001e60;
    --wm-blue-mid: #0053e2;
    --wm-yellow: #ffc220;
    --wm-white: #ffffff;
    --wm-blue-light: #a9ddf7;
    --wm-blue-sky: #4dbdf5;
    --wm-brown: #795548;
    --wm-maroon: #800020;
    --wm-gray: #a7a8aa;
    --wm-red: #e1251b;
    --control-border: 2px solid var(--wm-white);
}

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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 700;
    color: var(--wm-white);
    background: var(--wm-blue-dark);
}

button, input, select { font: inherit; }
button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app {
    --trip-log-row-height: 74px;
    /* Reserved collapsed Commands footprint; expansion is overlay-only. */
    --speech-command-row-height: 0px;
    --speech-mic-row-height: 0px;
    --home-clock-preferred-size: 56vw;
    --timer-summary-row-height: 142px;
    --trip-log-layout-duration: 1000ms;

    width: var(--app-viewport-width, 100vw);
    height: var(--app-viewport-height, 100dvh);
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows:
        var(--app-header-height,52px)
        var(--timer-summary-row-height)
        62px
        0px
        1fr
        calc(
            var(--trip-log-row-height) +
            var(--speech-command-row-height)
        )
        var(--speech-mic-row-height);
    background: linear-gradient(180deg, var(--wm-blue-dark) 0%, var(--wm-blue-mid) 25%, var(--wm-blue) 55%, var(--wm-blue-mid) 100%);
    overflow: hidden;
    transition:
        grid-template-rows var(--trip-log-layout-duration) ease-in-out;
}

.app[data-speech-active="true"] {
    --speech-command-row-height: 42px;
    --speech-mic-row-height: 74px;
}

speech-mic-bar {
    box-sizing: border-box;
    grid-row: 7;
    display: block;
    width: 100%;
    height: 74px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    align-self: start;
    overflow: visible;
    transform: translateY(calc(100% + 0.125in));
    opacity: 0;
    pointer-events: none;
    transition:
        transform var(--trip-log-layout-duration) ease-in-out,
        opacity 250ms linear;
    will-change: transform, opacity;
}

speech-mic-bar[popover] {
    position: fixed;
    inset:
        auto
        auto
        var(--speech-mic-fixed-bottom, 0px)
        var(--speech-mic-fixed-left, 0px);
    width:
        var(
            --speech-mic-fixed-width,
            100%
        );
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    z-index: 2147483645;
    transition:
        transform var(--trip-log-layout-duration) ease-in-out,
        opacity 250ms linear;
}

speech-mic-bar[popover]:popover-open {
    display: block;
    opacity: 0;
}

speech-mic-bar[popover]::backdrop {
    display: none;
}

speech-mic-bar:not(:defined) {
    border: 3px solid rgb(255 255 255 / 38%);
    border-radius: 14px;
    background: var(--ui-charcoal-gradient, #2f3943);
}

.app[data-speech-active="true"] speech-mic-bar,
.app[data-speech-active="true"] speech-mic-bar[popover]:popover-open,
speech-mic-bar[data-speech-active="true"],
speech-mic-bar[data-speech-active="true"][popover]:popover-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.app[data-trip-log-pinned="false"] {
    --trip-log-row-height: 0px;
    --home-clock-preferred-size: calc(56vw + 74px);
}

html[data-trip-log-startup="unpinned"] .app {
    --trip-log-row-height: 0px;
    --home-clock-preferred-size: calc(56vw + 74px);
    --trip-log-layout-duration: 0ms;
}

.app[data-trip-list-state="opening"],
.app[data-trip-list-state="open"] {
    --trip-log-row-height: 0px;
    --home-clock-preferred-size: calc(56vw + 74px);
    --trip-log-layout-duration: 750ms;
}

.app[data-trip-list-state="closing"] {
    --trip-log-layout-duration: 750ms;
}


.app-header {
    display: grid;
    grid-template-columns: auto 1fr;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.header-button {
    margin: 0;
    border: var(--control-border);
    border-radius: 12px;
    color: var(--wm-white);
    background: var(--wm-blue-dark);
}

.hamburger-button {
    appearance: none;
    height: 100%;
    width: auto;
    border: var(--control-border);
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    justify-self: start;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.2em;
    padding: 0;
    font-size: 24px;
}

.hamburger-button span {
    width: 1em;
    height: 0.14em;
    border-radius: 0.07em;
    background: var(--wm-white);
}

.scope-control {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    overflow: hidden;
    border: var(--control-border);
    border-radius: 12px;
    color: var(--wm-white);
    background: var(--wm-blue-dark);
}

.scope-toggle,
.scope-connection-button {
    appearance: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
}

.scope-toggle {
    min-width: 0;
    padding: 0 16px;
    font-size: 24px;
    font-weight: 700;
}

.scope-connection-button {
    width: 52px;
    height: 100%;
    padding: 0;
    display: grid;
    place-items: center;
    border-right: 1px solid rgb(255 255 255 / 30%);
    font-size: 24px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.scope-connection-button[hidden] {
    display: none;
}

.scope-connection-button::before {
    content: "";
    width: 1.35em;
    height: 1.35em;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.scope-connection-button[data-cloud-state="online"] {
    color: #a9ddf7;
}

.scope-connection-button[data-cloud-state="online"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
}

.scope-connection-button[data-cloud-state="offline"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.scope-connection-button[data-cloud-state="pending"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
}

.trip-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 78px 64px;
    margin: 0;
    padding: 0;
}

.summary-cell {
    appearance: none;
    container-type: inline-size;
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    place-content: center;
    gap: 3px;
    color: var(--wm-white);
    background: transparent;
    text-align: center;
}

.summary-label { font-size: 16px; font-weight: 700; }
.summary-label-short { display: none; }

@container (max-width: 190px) {
    .summary-label-responsive .summary-label-full { display: none; }
    .summary-label-responsive .summary-label-short { display: inline; }
}

.summary-cell strong { font-size: 34px; line-height: 1; }

.rendered-time-cell {position:relative;min-width:0;display:grid;}
.rendered-time-cell>.summary-cell {width:100%;height:100%;}
#toggleRenderedTimeButton {-webkit-touch-callout:none;user-select:none;}
.end-time-goal-lock {position:absolute;right:10px;bottom:7px;width:25px;height:25px;margin:0;padding:0;border:0;color:var(--wm-blue-light);background:transparent;}
.end-time-goal-lock::before {content:"";position:absolute;inset:1px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='black'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='black'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;}
.end-time-goal-lock[hidden] {display:none;}
.end-time-goal-lock.is-rejecting {animation:end-time-lock-reject 550ms ease-in-out both;}
@keyframes end-time-lock-reject {0%,100%{transform:translateX(0) scale(1);filter:drop-shadow(0 0 0 rgb(169 221 247 / 0%))}20%{transform:translateX(-4px) scale(1.15);filter:drop-shadow(0 0 7px rgb(169 221 247 / 92%))}40%{transform:translateX(4px) scale(1.08);filter:drop-shadow(0 0 12px rgb(169 221 247 / 72%))}60%{transform:translateX(-3px) scale(1.13);filter:drop-shadow(0 0 7px rgb(169 221 247 / 88%))}80%{transform:translateX(3px) scale(1.04);filter:drop-shadow(0 0 2px rgb(169 221 247 / 36%))}}
@media (prefers-reduced-motion:reduce) {.end-time-goal-lock.is-rejecting {animation:end-time-lock-reject-reduced 300ms linear both;}@keyframes end-time-lock-reject-reduced {50%{opacity:.45}}}
.app-dialog.end-time-lock-dialog {width:min(88vw,440px);background:rgb(0 30 96 / 88%);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);}
.app-dialog.end-time-lock-dialog form {padding-bottom:16px;}
.app-dialog.end-time-lock-dialog form>fieldset,.app-dialog.end-time-lock-dialog form>.end-time-lock-release-message,.app-dialog.end-time-lock-dialog form>.dialog-primary {margin-inline:16px;}
.app-dialog.end-time-lock-dialog fieldset label {grid-template-columns:1fr auto;}
.app-dialog.end-time-lock-dialog fieldset input {width:24px;height:24px;}
.app-dialog.end-time-lock-dialog .end-time-lock-release-message {padding:10px 12px;border:1px solid var(--wm-blue-light);border-radius:8px;color:var(--wm-blue-light);background:rgb(169 221 247 / 12%);text-align:center;}
.app-dialog.end-time-lock-dialog .dialog-primary {min-height:46px;border:1px solid var(--wm-blue-light);border-radius:8px;color:var(--wm-white);background:var(--wm-blue);font:inherit;font-weight:700;}

.percent-summary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content max-content minmax(0, 1fr) 40px;
    align-items: center;
    column-gap: 0;
    --summary-text-gap: 12px;
    padding-inline: 0 var(--summary-sync-inset, 6px);
    min-width: 0;
    font-size: 48px;
    line-height: 1;
}


.percent-value-button {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.trip-action-controls {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.active-trip-controls {
    width: 100%;
    height: 100%;
    display: none;
    grid-template-rows: 1fr 1fr;
}

.trip-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
}

.app[data-trip-state="running"], .app[data-trip-transition="pending"] {
    grid-template-rows:
        52px var(--timer-summary-row-height) 122px 0 1fr
        calc(
            var(--trip-log-row-height) +
            var(--speech-command-row-height)
        )
        var(--speech-mic-row-height);
}

.app[data-trip-state="running"] .new-trip-button, .app[data-trip-transition="pending"] .new-trip-button {
    display: none;
}

.app[data-trip-state="running"] .active-trip-controls, .app[data-trip-transition="pending"] .active-trip-controls {
    display: grid;
}

.app[data-operation-pending="true"] .active-trip-controls button:disabled,
.app[data-operation-pending="true"] .new-trip-button:disabled,
#tripTransitionSummaryActions button:disabled {
    opacity: .5;
    filter: grayscale(.8);
    cursor: progress;
    pointer-events: none;
}

/*
 * Legacy Down-state presentation:
 * retain the original light desaturation across the visible UI
 * while allowing the current component layout to remain unchanged.
 */
.app[data-interval-state="down"] :is(
    .app-header,
    .trip-action-controls,
    .clock-region,
    .trip-log-button,
    .main-menu,
    .app-dialog,
    speech-mic-bar
) {
    filter: grayscale(15%);
}

.trip-action-button {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #000;
    border-radius: 15px;
    color: var(--wm-blue-dark);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

.end-trip-button {
    background: var(--wm-yellow);
}

.break-button {
    color: var(--wm-white);
    background: var(--timer-break-color, #001e60);
}

.down-button {
    color: var(--wm-white);
    background: var(--timer-down-color, #5f6772);
}

.new-trip-button,
.idle-break-button {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #000;
    border-radius: 15px;
    color: var(--wm-blue-dark);
    background: var(--wm-yellow);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.summary-spacer { min-height: 0; }

.clock-region {
    min-height: 0;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    overflow: hidden;
    container-type: size;
    transition:
        height var(--trip-log-layout-duration, 1000ms) ease-in-out,
        transform var(--trip-log-layout-duration, 1000ms) ease-in-out;
    will-change: height, transform;
}

clock-timer {
    width: 56vw;
    height: 56vw;
    display: block;
    border: 0;
    border-radius: 50%;
    color: var(--wm-white);
    background: transparent;
    --clock-timer-time-font: Helvetica, Arial, sans-serif;
    --clock-timer-hour-font: Helvetica, Arial, sans-serif;
    --clock-timer-hour-hand-length: 28%;
    --clock-timer-hour-hand-color: var(--wm-white);
    --clock-timer-minute-hand-length: 38%;
    --clock-timer-minute-hand-color: var(--wm-white);
    --clock-timer-second-hand-length: 42%;
    --clock-timer-second-hand-color: var(--wm-yellow);
    --clock-timer-time-color: var(--wm-white);
    --clock-timer-tick-color: var(--wm-white);
    --clock-timer-border-color: var(--wm-blue-dark);
}

.clock-region > clock-timer {
    width: min(var(--home-clock-preferred-size), 100cqw, 100cqh);
    height: min(var(--home-clock-preferred-size), 100cqw, 100cqh);
    transition:
        width var(--trip-log-layout-duration, 1000ms) ease-in-out,
        height var(--trip-log-layout-duration, 1000ms) ease-in-out,
        transform var(--trip-log-layout-duration, 1000ms) ease-in-out;
    will-change: width, height, transform;
}

clock-timer::part(hour-hand),
clock-timer::part(minute-hand),
clock-timer::part(second-hand) {
    display: block;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 28%);
}

clock-timer::part(hour-hand) {
    width: var(--clock-timer-hour-hand-width, 5px);
    height: var(--clock-timer-hour-hand-length, 28%);
    background: var(--clock-timer-hour-hand-color, currentColor);
}

clock-timer::part(minute-hand) {
    width: var(--clock-timer-minute-hand-width, 4px);
    height: var(--clock-timer-minute-hand-length, 38%);
    background: var(--clock-timer-minute-hand-color, currentColor);
}

clock-timer::part(second-hand) {
    width: var(--clock-timer-second-hand-width, 2px);
    height: var(--clock-timer-second-hand-length, 42%);
    background: var(--clock-timer-second-hand-color, var(--wm-yellow));
}

clock-timer::part(time) {
    color: var(--clock-timer-time-color, currentColor);
    font-weight: 700;
}

clock-timer::part(tick-mark),
clock-timer::part(major-tick-mark) {
    background: var(--clock-timer-tick-color, currentColor);
}

clock-timer[hide-hour-hand]::part(hour-hand),
clock-timer[hide-minute-hand]::part(minute-hand),
clock-timer[hide-second-hand]::part(second-hand) {
    display: none;
}

.hand-caption {
    width: min(128px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 6px;
}

.hand-caption > span {
    min-width: 0;
    white-space: nowrap;
}

.hand-caption input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--wm-blue);
}


.trip-log-button {
    grid-row: 6;
    width: 100%;
    height: 74px;
    margin: 0;
    padding: 0;
    align-self: start;
    border: 3px solid #000;
    border-radius: var(--trip-log-shell-radius);
    color: var(--wm-white);
    background: var(--wm-gray);
    font-size: 48px;
    font-weight: 700;
    transform: translateY(0);
    transition: transform 1000ms ease-in-out, visibility 0s;
    will-change: transform;
}


.app:not([data-action-display="compact"])[data-trip-log-pinned="false"] .trip-log-button:not(.trip-log-floating) {
    visibility: hidden;
    pointer-events: none;
    /* Keep painting while the app's reserved Log row contracts. */
    transition: transform var(--trip-log-layout-duration, 1000ms) ease-in-out,
        visibility 0s var(--trip-log-layout-duration, 1000ms);
}

html[data-trip-log-startup="unpinned"] .trip-log-button:not(.trip-log-floating) {
    display: none;
    transition: none;
}

html[data-trip-log-startup="unpinned"] .clock-region > clock-timer {
    transition: none;
}

.trip-log-button.trip-log-floating {
    position: fixed;
    z-index: 3000;
    margin: 0;
    align-self: auto;
    transform: none;
    transition: none;
    pointer-events: auto;
    will-change: transform;
}

[popover] {
    opacity: 0;
    transition-property: opacity, display, overlay;
    transition-duration: 250ms;
    transition-timing-function: linear;
    transition-behavior: normal, allow-discrete, allow-discrete;
}

[popover]:popover-open {
    opacity: 1;
}

[popover].popover-immediate-close {
    transition: none !important;
}

@starting-style {
    [popover]:popover-open {
        opacity: 0;
    }
}

hamburger-menu.main-menu {
    /* The wrapper must not paint a square behind its rounded trigger. */
    background: transparent;
    box-shadow: none;
    height: 100%;
    align-self: stretch;
    justify-self: start;
    margin: 0;
    --hamburger-menu-indicator-color: var(--wm-blue-light, #a9ddf7);
    --hamburger-menu-focus-background: rgb(0 30 96 / 96%);
    --hamburger-menu-mask-background: rgb(0 30 96);
    --hamburger-menu-swipe-target-radius: 18px;
}

hamburger-menu.main-menu:not(:defined) > :not([slot="trigger"]) {
    display: none !important;
}

.main-menu > .hamburger-menu-popover:not([data-ready="true"]) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.main-menu > .hamburger-menu-popover {
    /* WMOF primary placement: below the hamburger with its left edge anchored there. */
    position-area: bottom span-right;
    inset: auto;
    align-self: start;
    justify-self: start;
    width: min(430px, 74vw);
    margin: 0;
    padding: 8px 0;
    overflow: visible;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 18px;
    color: var(--wm-white);
    background: rgb(0 30 96 / 86%);
    box-shadow: 0 12px 28px rgb(0 0 0 / 30%);
    backdrop-filter: blur(10px);
}

.main-menu > .hamburger-menu-popover::before,
.main-menu > .hamburger-menu-popover::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

.main-menu > .hamburger-menu-popover[data-placement="below"]::before {
    top: -14px;
    left: 26px;
    transform: translate(-50%, -50%);
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 14px solid rgb(255 255 255 / 78%);
}
.main-menu > .hamburger-menu-popover[data-placement="below"]::after {
    top: -11px;
    left: 26px;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-bottom: 12px solid rgb(0 30 96 / 96%);
}

.main-menu > .hamburger-menu-popover[data-placement="above"]::before {
    bottom: -14px;
    left: 26px;
    transform: translateX(-50%);
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 14px solid rgb(255 255 255 / 78%);
}
.main-menu > .hamburger-menu-popover[data-placement="above"]::after {
    bottom: -11px;
    left: 26px;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 12px solid rgb(0 30 96 / 96%);
}

.main-menu > .hamburger-menu-popover[data-placement="right"]::before {
    left: -14px;
    top: 26px;
    transform: translateY(-50%);
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 14px solid rgb(255 255 255 / 78%);
}
.main-menu > .hamburger-menu-popover[data-placement="right"]::after {
    left: -11px;
    top: 26px;
    transform: translateY(-50%);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-right: 12px solid rgb(0 30 96 / 96%);
}

.main-menu > .hamburger-menu-popover[data-placement="left"]::before {
    right: -14px;
    top: 26px;
    transform: translateY(-50%);
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 14px solid rgb(255 255 255 / 78%);
}
.main-menu > .hamburger-menu-popover[data-placement="left"]::after {
    right: -11px;
    top: 26px;
    transform: translateY(-50%);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 12px solid rgb(0 30 96 / 96%);
}

.main-menu .hamburger-menu-popover button,
.main-menu .hamburger-menu-popover a,
.main-menu .hamburger-menu-popover summary {
    width: 100%;
    border: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--wm-white);
    background: transparent;
    text-align: left;
    font-size: 18px;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
}

.main-menu .hamburger-menu-popover button[hidden] {
    display: none;
}

.main-menu-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    align-items: stretch;
}

.main-menu .main-menu-row > button {
    min-width: 0;
}

.main-menu .menu-pin-button {
    width: 58px;
    padding: 0;
    justify-content: center;
    gap: 0;
    color: rgb(255 255 255 / 70%);
}

.main-menu .menu-pin-button[aria-pressed="true"] {
    color: #a9ddf7;
}

.main-menu .hamburger-menu-popover button::before {
    content: "";
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

#profileMenuButton::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7' r='4' fill='black'/%3E%3Cpath d='M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8H4Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7' r='4' fill='black'/%3E%3Cpath d='M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8H4Z' fill='black'/%3E%3C/svg%3E");
}


#tripLogPinButton::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3h6l-1 5 3 3v2h-4v8l-1 1-1-1v-8H7v-2l3-3-1-5Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3h6l-1 5 3 3v2h-4v8l-1 1-1-1v-8H7v-2l3-3-1-5Z' fill='black'/%3E%3C/svg%3E");
    transform: rotate(45deg);
    transform-origin: center;
    opacity: 0.72;
    transition:
        transform 250ms ease-in-out,
        opacity 250ms linear;
}

#tripLogPinButton[aria-pressed="true"]::before {
    transform: rotate(0deg);
    opacity: 1;
}

.main-menu [data-dialog="stateSettingsDialog"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.8' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.8' fill='black'/%3E%3C/svg%3E");
}

.trip-log-date-menu {
    margin: 2px 16px 8px 64px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    color: rgb(255 255 255 / 78%);
    font-size: 12px;
    font-weight: 600;
}
.trip-log-date-menu input {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 5px 3px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 7px;
    color: var(--wm-white);
    background: rgb(32 41 51 / 94%);
    color-scheme: dark;
    font: inherit;
    font-size: 11px;
}
.trip-log-date-menu input:disabled { opacity: .65; }
.trip-log-date-menu input[aria-invalid="true"] { border-color: #ffb3b3; }
.trip-log-range-error { margin: 0 16px 8px 64px; color: #ffb3b3; font-size: 12px; }

.main-menu [data-dialog="graphicalSettingsDialog"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 1 0 0 18h1.4a2.1 2.1 0 0 0 0-4.2h-1.1a1.8 1.8 0 0 1 0-3.6H16A5 5 0 0 0 21 8.3C21 5.3 17 3 12 3Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='7.8' cy='10' r='1.15' fill='black'/%3E%3Ccircle cx='10.4' cy='6.9' r='1.15' fill='black'/%3E%3Ccircle cx='14.4' cy='6.7' r='1.15' fill='black'/%3E%3Ccircle cx='17.2' cy='9.4' r='1.15' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 1 0 0 18h1.4a2.1 2.1 0 0 0 0-4.2h-1.1a1.8 1.8 0 0 1 0-3.6H16A5 5 0 0 0 21 8.3C21 5.3 17 3 12 3Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='7.8' cy='10' r='1.15' fill='black'/%3E%3Ccircle cx='10.4' cy='6.9' r='1.15' fill='black'/%3E%3Ccircle cx='14.4' cy='6.7' r='1.15' fill='black'/%3E%3Ccircle cx='17.2' cy='9.4' r='1.15' fill='black'/%3E%3C/svg%3E");
}

#authButton::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h9v16H4V4Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M10 12h10M17 8.8 20.2 12 17 15.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h9v16H4V4Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M10 12h10M17 8.8 20.2 12 17 15.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.main-menu .hamburger-menu-popover button:hover,
.main-menu .hamburger-menu-popover button:focus-visible { background: rgb(255 255 255 / 10%); }
.main-menu hr { border: 0; border-top: 1px solid rgb(255 255 255 / 35%); margin: 6px 16px; }
.main-menu .logout-button { color: var(--wm-white); }
.main-menu .logout-button::before { background: #ff554d; }

.app-dialog {
    color: var(--wm-white);
    background: linear-gradient(135deg, rgb(0 83 226 / 98%), rgb(0 30 96 / 98%));
    border: 2px solid var(--wm-white);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgb(0 0 0 / 42%);
    opacity: 0;
    transition-property: opacity;
    transition-duration: var(--app-dialog-transition-duration, 250ms);
    transition-timing-function: linear;
    transition-behavior: normal;
}

.app-dialog[open] {
    opacity: 1;
}

/* Match native :modal geometry for the shared region's nonmodal children.
   Zero specificity lets each dialog retain its explicit size/position rules. */
:where(shared-modal-host > dialog) {
    position: fixed;
    inset: 8px 0 calc(100dvh - var(--shared-modal-safe-height, 100dvh) + 8px);
    margin: auto;
    max-width: calc(100% - 2em - 6px);
    max-height: max(0px, calc(var(--shared-modal-safe-height, 100dvh) - 16px));
}
shared-modal, trip-log-modal {display: contents;}
shared-modal-host {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(0 0 0 / 48%);
    overflow: visible;
    pointer-events: none;
}
shared-modal-host::backdrop {display: none;}
shared-modal-host > dialog {pointer-events: auto;z-index: var(--shared-modal-order, 1);}

.app-dialog::backdrop {
    background: rgb(0 0 0 / 48%);
    opacity: 0;
    transition: opacity var(--app-dialog-transition-duration, 250ms) linear;
}

.app-dialog[open]::backdrop {
    opacity: 1;
}

.app-dialog.dialog-closing,
.app-dialog.dialog-closing::backdrop {
    opacity: 0;
}

@starting-style {
    .app-dialog[open],
    .app-dialog[open]::backdrop {
        opacity: 0;
    }
}
.app-dialog form { display: grid; gap: 16px; }
.app-dialog h2 { margin: 0; text-align: center; font-size: 28px; }

.dialog-header {
    display: grid;
    grid-template-columns: 1fr 44px;
    align-items: center;
}

.dialog-close {
    appearance: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: var(--wm-white);
    background: transparent;
    font-size: 0;
    line-height: 1;
}

.dialog-close::before {
    content: "";
    width: 28px;
    height: 28px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-dialog { width: min(420px, 88vw); }
.auto-goal-dialog { width: min(460px, calc(100vw - 32px)); }
.settings-dialog { width: min(940px, 94vw); max-height: 90dvh; overflow: auto; }

.auto-goal-dialog form {
    min-width: 0;
}

.auto-goal-copy {
    margin-block: 0;
    text-align: center;
    line-height: 1.4;
}

.auto-goal-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.auto-goal-option {
    position: relative;
    min-width: 0;
    min-height: 96px;
    padding: 14px 10px;
    display: grid;
    place-items: center;
    gap: 8px;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: 12px;
    color: var(--wm-white);
    background: color-mix(in srgb, var(--wm-blue-dark) 78%, var(--wm-blue) 22%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}

#speechRecognitionButton::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='8' y='2' width='8' height='13' rx='4' fill='black'/%3E%3Cpath d='M5 11v1a7 7 0 0 0 14 0v-1M12 19v3M8 22h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='8' y='2' width='8' height='13' rx='4' fill='black'/%3E%3Cpath d='M5 11v1a7 7 0 0 0 14 0v-1M12 19v3M8 22h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.main-menu button:disabled {
    cursor: not-allowed;
    opacity: .48;
    filter: saturate(.35);
}

#speechTrainingButton[aria-pressed="true"] {
    color: var(--wm-yellow);
}

#speechRecognitionButton[aria-pressed="true"] { color: var(--wm-blue-light); }
#speechRecognitionButton.is-sleeping::after { content: "Muted"; margin-left:auto; color:rgb(255 255 255 / 72%); font-size:13px; }
.break-type-button.speech-focused { outline:3px solid var(--wm-blue-light); outline-offset:3px; }
.auto-goal-option:disabled {cursor:not-allowed;opacity:.62;filter:saturate(.55);}
.auto-goal-option:disabled::before {content:"";position:absolute;inset:0;border-radius:inherit;background:rgb(0 30 96 / 34%);}
.auto-goal-option:disabled::after {content:"";position:absolute;left:50%;top:50%;width:54px;height:54px;transform:translate(-50%,-50%);background:var(--wm-blue-light);filter:drop-shadow(0 2px 4px rgb(0 0 0 / 45%));-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='black'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='black'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;}

.auto-goal-option span {
    min-width: 0;
    text-align: center;
    font-size: 16px;
}

.auto-goal-option strong {
    font-size: 28px;
    line-height: 1;
}

.app-dialog fieldset {
    margin: 0;
    padding: 14px;
    display: grid;
    gap: 12px;
    border: 1px solid rgb(255 255 255 / 80%);
    border-radius: 12px;
}

.app-dialog legend { padding: 0 8px; font-size: 20px; }
.app-dialog label { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr); gap: 12px; align-items: center; }

.app-dialog input,
.app-dialog select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--wm-white);
    border-radius: 8px;
    color: var(--wm-white);
    background: rgb(0 30 96 / 78%);
}

.app-dialog input[type="color"] {
    min-height: 42px;
    padding: 4px;
    cursor: pointer;
}

.app-dialog option { color: var(--wm-white); background: var(--wm-blue-dark); }
.app-dialog .toggle-row { grid-template-columns: 1fr auto; }
.app-dialog .toggle-row input { width: 24px; height: 24px; }

.dialog-actions { display: grid; gap: 12px; }
.two-actions { grid-template-columns: 1fr 1fr; }
.three-actions { grid-template-columns: 1fr 1fr 1fr; }
.dialog-actions button,
.secondary-action {
    min-height: 48px;
    border: 2px solid var(--wm-white);
    border-radius: 9px;
    color: var(--wm-white);
    background: transparent;
}
.dialog-actions .primary-action {
    color: var(--wm-blue-dark);
    background: var(--wm-yellow);
    border-color: var(--wm-white);
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.settings-groups { display: grid; gap: 8px; }

.graphical-dialog .settings-category {
    margin: 0;
    overflow: clip;
    border: 1px solid rgb(255 255 255 / 54%);
    border-radius: 12px;
    background: color-mix(in srgb, var(--wm-blue-dark) 88%, var(--wm-blue) 12%);
}

.graphical-dialog .settings-category > summary {
    position: relative;
    min-height: 48px;
    padding: 11px 42px 11px 14px;
    box-sizing: border-box;
    cursor: pointer;
    list-style: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    user-select: none;
}

.graphical-dialog .settings-category > summary::-webkit-details-marker { display: none; }

.graphical-dialog .settings-category > summary::after {
    content: "›";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    transform-origin: center;
    font-size: 28px;
    line-height: 1;
    transition: transform 160ms ease;
}

.graphical-dialog .settings-category[open] > summary::after {
    transform: translateY(-50%) rotate(90deg);
}

.graphical-dialog .settings-category-content {
    padding: 12px 14px 14px;
    display: grid;
    gap: 12px;
    border-top: 1px solid rgb(255 255 255 / 22%);
}

.timer-color-grid { display: grid; gap: 12px; }
.timer-color-category { display: grid; gap: 7px; }
.timer-color-category > h3 { margin: 2px 0 0; font-size: 17px; line-height: 1.2; }
.timer-color-category-rows {
    overflow: hidden;
    display: grid;
    border: 1px solid rgb(169 221 247 / 28%);
    border-radius: 10px;
}
.timer-color-category-rows .timer-color-row { padding: 7px 8px; }
.timer-color-category-rows .timer-color-row + .timer-color-row {
    border-top: 1px solid rgb(169 221 247 / 18%);
}

.style-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 4px;
}

.style-row > span { font-size: 16px; }

.hand-style-row {
    grid-template-columns: minmax(130px, 1fr) minmax(90px, 0.7fr);
    align-items: end;
}

.hand-style-row > label {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 13px;
}

.clock-color-grid {
    display: grid;
    gap: 8px;
}

.clock-color-grid > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px;
    align-items: center;
    gap: 10px;
}

.clock-color-grid input[type="color"] {
    width: 68px;
    min-width: 68px;
    height: 38px;
    justify-self: end;
}

.clock-preview {
    position: sticky;
    top: 0;
    min-height: 430px;
    padding: 16px;
    display: grid;
    grid-template-rows: auto 1fr;
    place-items: center;
    gap: 10px;
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: 12px;
    background: rgb(0 30 96 / 28%);
}

.preview-title {
    justify-self: stretch;
    text-align: center;
    font-size: 18px;
}

.clock-preview clock-timer {
    width: min(34vw, 330px);
    height: min(34vw, 330px);
    min-width: 240px;
    min-height: 240px;
}

.form-error { min-height: 1.2em; margin: 0; color: #ffb8b4; text-align: center; }

@media (max-width: 720px) {
    .settings-dialog { width: 94vw; max-height: 92dvh; }
    .settings-grid { grid-template-columns: 1fr; }
    .clock-preview { position: static; min-height: 330px; }
    .clock-preview clock-timer { width: min(68vw, 310px); height: min(68vw, 310px); }
    .three-control-row { grid-template-columns: 1fr 1fr 1fr; }
    .three-control-row > span { grid-column: 1 / -1; }
}


.number-pad-dialog {
    width: min(430px, 94vw);
    max-width: none;
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    opacity: 0;
    transform:
        translateY(
            var(
                --number-pad-summary-shift-y,
                0px
            )
        )
        scale(
            var(
                --number-pad-summary-scale,
                1
            )
        );
    transform-origin: center;
    transition-property:
        opacity,
        transform,
        display,
        overlay;
    transition-duration:
        var(--app-dialog-transition-duration, 250ms),
        280ms,
        var(--app-dialog-transition-duration, 250ms),
        var(--app-dialog-transition-duration, 250ms);
    transition-timing-function:
        linear,
        ease,
        linear,
        linear;
    transition-behavior:
        normal,
        normal,
        allow-discrete,
        allow-discrete;
    will-change:
        transform,
        opacity;
}

.number-pad-dialog[open] { opacity: 1; }

.number-pad-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
    opacity: 0;
    transition: opacity var(--app-dialog-transition-duration, 250ms) linear;
}

.number-pad-dialog[open]::backdrop { opacity: 1; }

@starting-style {
    .number-pad-dialog[open],
    .number-pad-dialog[open]::backdrop { opacity: 0; }
}

.number-pad-shell {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: var(--wm-blue-dark);
    box-shadow: 0 18px 50px rgb(0 0 0 / 48%);
}

.number-pad-header {
    width: 100%;
    aspect-ratio: 3 / 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    background: var(--wm-yellow);
}

.number-pad-readout {
    min-width: 0;
    display: grid;
    place-items: center;
    background: var(--wm-yellow);
}

.number-pad-display {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 12px;
    display: grid;
    place-items: center;
    color: var(--wm-blue-dark);
    background: transparent;
    font-size: clamp(34px, 12vw, 58px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.number-pad-settings {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    color: var(--wm-white);
    background: var(--wm-blue);
    touch-action: manipulation;
}

.number-pad-settings[hidden] { display: none; }
.number-pad-header.percent-mode { grid-template-columns: 1fr; }
.number-pad-header.percent-mode .number-pad-readout { grid-column: 1 / -1; }

.number-pad-settings-gear {
    width: 48%;
    height: 48%;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.number-pad-settings[data-persistence="pending"] .number-pad-settings-gear {
    animation: number-pad-gear-spin 800ms linear infinite;
}

@keyframes number-pad-gear-spin {
    to { transform: rotate(360deg); }
}

.number-pad-persistence-badge {
    position: absolute;
    right: 8%;
    bottom: 8%;
    width: 31%;
    height: 31%;
    border: 2px solid var(--wm-white);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--wm-gray);
}

.number-pad-persistence-badge::before {
    content: "";
    width: 70%;
    height: 70%;
    background: var(--wm-white);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.number-pad-settings[data-persistence="pending"] .number-pad-persistence-badge { display: none; }
.number-pad-settings[data-connection-phase="handoff"][data-persistence="online"] .number-pad-persistence-badge,
.number-pad-settings[data-connection-phase="handoff"][data-persistence="offline"] .number-pad-persistence-badge {
    animation: number-pad-cloud-fade-in 250ms linear both;
}
.number-pad-settings[data-persistence="online"] .number-pad-persistence-badge { background: var(--wm-blue); }
.number-pad-settings[data-persistence="offline"] .number-pad-persistence-badge { background: var(--wm-gray); }

@keyframes number-pad-cloud-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.number-pad-settings[data-persistence="online"] .number-pad-persistence-badge::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
}

.number-pad-settings[data-persistence="offline"] .number-pad-persistence-badge::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.number-pad-voice-switch {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-top: 1px solid rgb(255 255 255 / 18%);
    border-bottom: 1px solid rgb(255 255 255 / 18%);
    border-radius: 0;
    color: var(--wm-white);
    background: var(--wm-blue);
    font: 700 15px/1.1 system-ui, sans-serif;
    letter-spacing: .01em;
    cursor: pointer;
    touch-action: manipulation;
}

.number-pad-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--wm-blue-dark);
}

.number-pad-key {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 0;
    display: grid;
    place-items: center;
    color: var(--wm-white);
    background: var(--wm-blue-dark);
    font-size: clamp(42px, 16vw, 72px);
    font-weight: 700;
    line-height: 1;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.number-pad-key:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.number-pad-confirm { background: var(--wm-blue); }

.number-pad-split-action::before,
.number-pad-confirm::before {
    content: "";
    width: 42%;
    height: 42%;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.number-pad-clear[data-action="clear"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 15 8.8-10a2 2 0 0 1 2.8-.2l4 3.5a2 2 0 0 1 .2 2.8L11 21H7.2L4 18.2A2.2 2.2 0 0 1 4 15Z' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'/%3E%3Cpath d='m9 18 7-8' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 15 8.8-10a2 2 0 0 1 2.8-.2l4 3.5a2 2 0 0 1 .2 2.8L11 21H7.2L4 18.2A2.2 2.2 0 0 1 4 15Z' fill='none' stroke='black' stroke-width='2.1' stroke-linejoin='round'/%3E%3Cpath d='m9 18 7-8' stroke='black' stroke-width='2.1'/%3E%3C/svg%3E");
}

.number-pad-clear[data-action="close"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.number-pad-clear[data-action="back"]::before {
    width: 54%;
    height: 54%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 66'%3E%3Cpath d='M24 8 8 24l16 15M10 24h43c11 0 20 7.5 20 17S65 57 55 57H41' fill='none' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 66'%3E%3Cpath d='M24 8 8 24l16 15M10 24h43c11 0 20 7.5 20 17S65 57 55 57H41' fill='none' stroke='black' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.number-pad-clear[data-action="home"]::before {
    width: 48%;
    height: 48%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3Z' fill='black'/%3E%3C/svg%3E");
}

.number-pad-clear[data-action="reset"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 7.1A7.5 7.5 0 1 1 4.8 15' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M6.5 3.5v4.2H2.3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 7.1A7.5 7.5 0 1 1 4.8 15' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M6.5 3.5v4.2H2.3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3C/svg%3E");
}

.number-pad-confirm[data-action="confirm"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 12 5 5L20 6' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 12 5 5L20 6' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.number-pad-confirm[data-action="start"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3.5 20 12 6 20.5Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3.5 20 12 6 20.5Z' fill='black'/%3E%3C/svg%3E");
}

.number-pad-confirm[data-action="autocorrect"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http%3A//www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M19%209a7.5%207.5%200%201%200%200%206M19%204v5h-5'/%3E%3Cpath%20d='m8.5%2012%202%202%204-4'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http%3A//www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M19%209a7.5%207.5%200%201%200%200%206M19%204v5h-5'/%3E%3Cpath%20d='m8.5%2012%202%202%204-4'/%3E%3C/g%3E%3C/svg%3E");
}


.break-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 20px;
}

.break-dialog-content {
    display: grid;
    gap: 18px;
}

.break-dialog-content p {
    margin: 0;
    text-align: center;
}


/* unified-gradient-ui-v1 */
:root {
    --ui-navy-gradient: linear-gradient(145deg, #0053e2 0%, #001e60 42%, #001e60 100%);
    --ui-blue-gradient: linear-gradient(145deg, #4dbdf5 0%, #0053e2 54%, #0053e2 100%);
    --ui-yellow-gradient: linear-gradient(145deg, #ffc220 0%, #ffc220 52%, #ffc220 100%);
    --ui-gray-gradient: linear-gradient(145deg, #667481 0%, #46515c 48%, #29343e 100%);
    --ui-charcoal-gradient: linear-gradient(180deg, #46515c 0%, #2f3943 45%, #202933 100%);
    --ui-green-gradient: linear-gradient(145deg, #42a447 0%, #2e7d32 58%, #1f5e24 100%);
    --ui-border: rgb(255 255 255 / 72%);
    --ui-inner-highlight: inset 0 1px 0 rgb(255 255 255 / 20%);
    --ui-shadow: 0 10px 24px rgb(0 0 0 / 28%);
}


.header-button:not(.hamburger-button) {
    background: transparent;
    border-color: rgb(255 255 255 / 52%);
    box-shadow: var(--ui-inner-highlight);
}

.new-trip-button,
.end-trip-button,
.break-button {
    background: var(--ui-yellow-gradient);
    border-color: rgb(255 255 255 / 38%);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
}

.down-button {
    background: var(--ui-green-gradient);
    border-color: rgb(255 255 255 / 35%);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
}

.trip-log-button {
    background: var(--ui-gray-gradient);
    border-color: rgb(255 255 255 / 38%);
    box-shadow: var(--ui-inner-highlight);
}

.main-menu {
    background: var(--ui-navy-gradient);
    border-color: var(--ui-border);
    box-shadow: var(--ui-shadow), var(--ui-inner-highlight);
}

.main-menu::after {
    border-bottom-color: #001e60;
}

.main-menu .hamburger-menu-popover button:hover,
.main-menu .hamburger-menu-popover button:focus-visible {
    background: linear-gradient(90deg, rgb(255 255 255 / 13%), rgb(255 255 255 / 4%));
}

.app-dialog {
    padding: 0;
    overflow: hidden;
    border: 1.5px solid rgb(169 221 247 / 86%);
    background: var(--ui-navy-gradient);
    box-shadow: 0 20px 55px rgb(0 0 0 / 48%), var(--ui-inner-highlight);
}

.app-dialog form,
.break-dialog-content {
    gap: 16px;
}

.dialog-header {
    min-height: 64px;
    margin: 0;
    padding: 10px 12px 10px 18px;
    background: linear-gradient(180deg, #0053e2 0%, #0053e2 45%, #001e60 100%);
    border-bottom: 1px solid rgb(169 221 247 / 58%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%);
}

.dialog-header h2 {
    text-shadow: 0 2px 3px rgb(0 0 0 / 22%);
}

.dialog-close {
    border-radius: 10px;
    background: linear-gradient(145deg, rgb(0 83 226 / 55%), rgb(0 30 96 / 35%));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 15%);
}

.app-dialog form > :not(.dialog-header),
.break-dialog-content > :not(.dialog-header) {
    margin-inline: 16px;
}

.app-dialog form > .dialog-actions,
.break-dialog-content > :last-child {
    margin-bottom: 16px;
}

.app-dialog fieldset,
.clock-preview {
    border-color: rgb(169 221 247 / 62%);
    background: linear-gradient(145deg, rgb(0 83 226 / 76%), rgb(0 30 96 / 74%));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
}

.app-dialog input,
.app-dialog select {
    border-color: rgb(169 221 247 / 78%);
    background: linear-gradient(145deg, rgb(0 83 226 / 92%), rgb(0 30 96 / 90%));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}

.dialog-actions button,
.secondary-action {
    background: var(--ui-navy-gradient);
    border-color: rgb(169 221 247 / 86%);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
}

.dialog-actions .primary-action {
    color: var(--wm-blue-dark);
    background: var(--ui-yellow-gradient);
    border-color: rgb(255 255 255 / 84%);
}

button:active:not(:disabled):not(#toggleSyncGoalButton) {
    filter: brightness(0.92);
    transform: translateY(1px);
}

/* Trip settings */
.settings-dialog,
.trip-settings-dialog {
    overflow: auto;
}

.trip-settings-dialog {
    width: min(760px, 94vw);
    max-height: 92dvh;
}

.trip-settings-times {
    display: grid;
    gap: 10px;
}

.trip-time-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(230px, 1.2fr) 54px;
    gap: 12px;
    align-items: center;
}

.trip-time-copy {
    display: grid;
    gap: 3px;
}

.trip-time-copy strong {
    font-size: 18px;
}

.trip-time-copy span {
    color: rgb(255 255 255 / 74%);
    font-size: 13px;
    font-weight: 400;
}

.trip-time-value {
    min-height: 54px;
    padding: 8px 12px;
    display: grid;
    place-items: center;
    border: 1.5px solid rgb(255 255 255 / 82%);
    border-radius: 12px;
    color: var(--wm-blue-dark);
    background: var(--ui-yellow-gradient);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
    font-size: 18px;
    text-align: center;
}

.trip-time-edit {
    width: 54px;
    height: 54px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1.5px solid rgb(169 221 247 / 88%);
    border-radius: 12px;
    color: var(--wm-white);
    background: var(--ui-blue-gradient);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
}

.trip-time-edit span {
    width: 27px;
    height: 27px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20l4.1-1 10.8-10.8a2.1 2.1 0 0 0 0-3l-.1-.1a2.1 2.1 0 0 0-3 0L5 15.9 4 20Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='m14.5 6.4 3.1 3.1M5 15.9l3.1 3.1' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20l4.1-1 10.8-10.8a2.1 2.1 0 0 0 0-3l-.1-.1a2.1 2.1 0 0 0-3 0L5 15.9 4 20Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='m14.5 6.4 3.1 3.1M5 15.9l3.1 3.1' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.trip-time-edit:disabled {
    opacity: 0.38;
    background: var(--wm-gray);
    cursor: not-allowed;
}

.trip-settings-behavior {
    margin-top: 2px !important;
}

/* Number pad */
.number-pad-dialog {
    width: min(430px, 94vw);
    overflow: visible;
}

.number-pad-shell {
    border: 1px solid rgb(169 221 247 / 58%);
    border-radius: 15px;
    box-shadow: 0 18px 50px rgb(0 0 0 / 52%), inset 0 1px 0 rgb(255 255 255 / 18%);
}

.number-pad-context {
    min-height: clamp(38px, 11vw, 52px);
    display: grid;
    place-items: center;
    color: var(--wm-white);
    background: var(--ui-charcoal-gradient);
    border-bottom: 1px solid rgb(255 255 255 / 28%);
    font-size: clamp(18px, 5.2vw, 24px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 3px rgb(0 0 0 / 28%);
}

.number-pad-header {
    aspect-ratio: auto;
    min-height: clamp(128px, 34vw, 154px);
    grid-template-columns: 2fr 1fr;
    background: transparent;
}

.number-pad-readout {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr;
    place-items: center;
    gap: 0;
    padding: 0;
    background: var(--ui-yellow-gradient);
}

.number-pad-readout.absolute-mode {
    grid-template-columns: minmax(0, 1fr) clamp(54px, 16vw, 72px);
    grid-template-rows: 1fr 1fr;
}

.number-pad-display {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding: 0 8px;
    font-size: clamp(32px, 11vw, 54px);
    cursor: pointer;
}

.number-pad-readout:not(.absolute-mode) .number-pad-display {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
}

.number-pad-meridiem {
    width: clamp(46px, 13vw, 60px);
    aspect-ratio: 1 / 1;
    justify-self: center;
    align-self: center;
    padding: 0;
    border: 4px solid #858585;
    border-radius: 50%;
    color: #6d6d6d;
    background: rgb(255 255 255 / 20%);
    font-size: clamp(13px, 4vw, 18px);
    font-weight: 700;
    box-shadow: inset 0 1px 1px rgb(255 255 255 / 40%);
}

.number-pad-meridiem.is-selected {
    color: #ffc220;
    background: #747474;
    border-color: #747474;
    box-shadow: 0 7px 13px rgb(0 0 0 / 42%), 0 0 0 2px rgb(255 194 32 / 24%);
}

.number-pad-am { grid-column: 2; grid-row: 1; }
.number-pad-pm { grid-column: 2; grid-row: 2; }

.number-pad-date-row {
    grid-column: 1;
    grid-row: 2;
    width: calc(100% - 18px);
    min-width: 0;
    justify-self: center;
    align-self: center;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--wm-blue-dark);
    background: linear-gradient(90deg, rgb(255 194 32 / 12%), rgb(255 255 255 / 10%));
    cursor: pointer;
}

.number-pad-date-row[hidden],
.number-pad-meridiem[hidden] {
    display: none;
}

.number-pad-calendar-icon {
    width: 22px;
    height: 22px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M7 3v4M17 3v4M3 9h18' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M7 3v4M17 3v4M3 9h18' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.number-pad-date-row input {
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--wm-blue-dark);
    background: transparent;
    font: inherit;
    font-size: clamp(12px, 3.5vw, 16px);
    font-weight: 700;
    cursor: pointer;
}

.number-pad-date-row input::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 0;
    padding: 0;
    margin: 0;
}

.number-pad-settings {
    border-left: 1px solid rgb(255 255 255 / 28%);
    background: var(--ui-blue-gradient);
    box-shadow: var(--ui-inner-highlight);
}

.number-pad-grid {
    background: var(--ui-navy-gradient);
}

.number-pad-key {
    background: transparent;
    border-color: rgb(169 221 247 / 28%);
    box-shadow: none;
}

.number-pad-confirm {
    background: var(--ui-blue-gradient);
}

.number-pad-key:disabled {
    filter: grayscale(0.28);
}

@media (max-width: 620px) {
    .trip-time-row {
        grid-template-columns: minmax(0, 1fr) 50px;
        gap: 8px;
        padding-top: 4px;
    }

    .trip-time-copy {
        grid-column: 1 / -1;
    }

    .trip-time-value {
        min-height: 50px;
        font-size: 15px;
    }

    .trip-time-edit {
        width: 50px;
        height: 50px;
    }
}


/* pixel6-reference-density-v1
   Main-screen proportions tuned against the legacy Pixel 6 reference.
   Structural row heights intentionally remain unchanged; the reference
   matches them closely. This block reduces the visual weight of type and
   icons and restores a little breathing room inside the controls. */
@media (max-width: 520px) {
    .hamburger-button {
        font-size: clamp(20px, 5.3vw, 22px);
    }

    .scope-toggle {
        padding-inline: clamp(8px, 3vw, 12px);
        font-size: clamp(20px, 5.8vw, 24px);
    }

    .summary-cell {
        padding-inline: clamp(4px, 1.6vw, 7px);
    }

    .summary-label {
        font-size: clamp(13px, 3.9vw, 16px);
        line-height: 1.08;
    }

    .summary-cell strong {
        font-size: clamp(29px, 8vw, 34px);
    }

    .percent-summary {
        --summary-text-gap: clamp(8px, 2.5vw, 11px);
        font-size: clamp(40px, 10.7vw, 44px);
    }

    .new-trip-button,
    .idle-break-button {
        padding-inline: clamp(10px, 3vw, 14px);
        font-size: clamp(36px, 10vw, 42px);
    }

    .trip-action-button:not(.idle-break-button) {
        padding-inline: clamp(8px, 2.6vw, 12px);
        font-size: clamp(28px, 8.3vw, 34px);
    }

    .trip-log-button {
        padding-inline: clamp(10px, 3vw, 14px);
        font-size: clamp(36px, 9.7vw, 40px);
    }
}


/* fullscreen-trip-editor-v1 */
.trip-settings-dialog,
.number-pad-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.trip-settings-dialog {
    overflow: auto;
}

.trip-settings-dialog form {
    min-height: 100%;
}

.number-pad-dialog {
    overflow: hidden;
    background: var(--wm-blue-dark);
}

.number-pad-shell {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.number-pad-grid {
    min-height: 0;
    grid-template-rows: repeat(4, minmax(0, 1fr));
}

.number-pad-key {
    height: 100%;
    aspect-ratio: auto;
}


/* compact-trip-settings-v2 */
.trip-time-copy {
    display: flex;
    align-items: baseline;
    gap: 0.55em;
    min-width: 0;
    line-height: 1.2;
}

.trip-time-copy strong {
    flex: 0 0 auto;
}

.trip-time-separator {
    flex: 0 0 auto;
    color: rgb(255 255 255 / 48%);
}

.trip-time-description,
.trip-goal-sync-status {
    color: rgb(255 255 255 / 74%);
    font-size: 13px;
    font-weight: 400;
}

.trip-time-description {
    min-width: 0;
}

.trip-now-action {
    min-height: 48px;
    padding: 10px 16px;
    border: 1.5px solid rgb(169 221 247 / 84%);
    border-radius: 10px;
    color: var(--wm-white);
    background: var(--ui-blue-gradient);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
    font-size: 16px;
    font-weight: 700;
}

.trip-now-action:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.trip-goal-sync-label {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    min-width: 0;
}

.trip-goal-sync-option.is-unavailable .trip-goal-sync-text {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    opacity: 0.62;
}

.trip-goal-sync-status {
    flex: 0 0 auto;
    text-decoration: none;
}

@media (max-width: 620px) {
    .trip-time-copy {
        gap: 0.45em;
    }

    .trip-time-description,
    .trip-goal-sync-status {
        font-size: 12px;
    }
}


/* trip-settings-disabled-primary-v1 */
.trip-settings-dialog #tripSettingsPrimary:disabled {
    color: rgb(255 255 255 / 68%);
    border-color: rgb(255 255 255 / 32%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
    opacity: 0.5;
    filter: grayscale(1) saturate(0.25);
    cursor: not-allowed;
    transform: none;
    text-shadow: none;
}


/* Active interval controls */
.app[data-interval-state="break"] .active-trip-controls {
    grid-template-rows: 1fr;
}

.app[data-interval-state="down"] {
    grid-template-rows:
        52px
        var(--timer-summary-row-height)
        230px
        0
        1fr
        calc(
            var(--trip-log-row-height) +
            var(--speech-command-row-height)
        )
        var(--speech-mic-row-height);
}

.app[data-interval-state="down"] .active-trip-controls {
    grid-template-rows: 1fr;
}

.down-trip-controls {
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .85fr);
    gap: 4px;
    padding: 3px;
    border-radius: 18px;
    background: var(--wm-blue);
}

.down-trip-controls[hidden] {
    display: none;
}

.trip-action-controls [hidden] {
    display: none !important;
}

.down-elapsed-panel {
    display: grid;
    grid-template-rows: auto 1fr;
    place-items: center;
    min-height: 0;
    padding: 7px 12px 4px;
    border: 3px solid #91a1b0;
    border-radius: 15px;
    color: var(--wm-white);
    background: linear-gradient(180deg, #001e60, #03184e);
    box-shadow: inset 0 1px 7px rgb(0 0 0 / 35%);
}

.down-elapsed-panel > span {
    font-size: clamp(16px, 3.4vw, 25px);
    line-height: 1;
}

.down-elapsed-value {
    align-self: center;
    color: var(--wm-blue-light, #a9ddf7);
    background: transparent;
    font-size: clamp(43px, 10vw, 68px);
    font-weight: 800;
    line-height: 1;
}

.down-action-row {
    display: grid;
    grid-template-columns: minmax(62px, .34fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
}

.down-trip-controls .trip-action-button {
    border-color: #91a1b0;
    border-radius: 15px;
    box-shadow: inset 0 1px 7px rgb(0 0 0 / 32%);
    font-size: clamp(27px, 7vw, 48px);
}

.down-details-button {
    display: grid;
    place-items: center;
    color: var(--wm-white);
    background: linear-gradient(180deg, #001e60, #03184e);
}

.down-details-button svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.down-action-row .break-button {
    color: var(--wm-white);
    background: linear-gradient(180deg, #001e60, #03184e);
}

.down-resume-button {
    color: var(--wm-blue-dark);
    background: linear-gradient(180deg, #ffad13, var(--wm-yellow));
}

.down-cancel-button {
    color: var(--timer-down-text-color, #ffffff);
    background: linear-gradient(180deg, #3f3f3f, #303030);
}

/* Down mode quiets the full viewport while its controls and modal remain colored. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
    background: rgb(0 0 0 / 0.001);
    -webkit-backdrop-filter: grayscale(100%);
    backdrop-filter: grayscale(100%);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

body:has(.app[data-interval-state="down"])::after {
    opacity: 1;
}

.app[data-interval-state="down"][data-trip-list-state="closed"] .trip-action-controls {
    position: relative;
    z-index: 3001;
}

.app[data-interval-state="down"]:is(
    [data-trip-list-state="opening"],
    [data-trip-list-state="open"],
    [data-trip-list-state="closing"]
) .trip-log-button,
.app[data-interval-state="down"]:is(
    [data-trip-list-state="opening"],
    [data-trip-list-state="open"],
    [data-trip-list-state="closing"]
) .trip-log-body {
    z-index: 3003;
    filter: grayscale(100%);
}

.app[data-interval-state="down"]:is(
    [data-trip-list-state="opening"],
    [data-trip-list-state="open"],
    [data-trip-list-state="closing"]
) .trip-log-close-button {
    z-index: 3004;
}

.app[data-interval-state="down"] .clock-region {
    perspective: 800px;
}

.app[data-interval-state="down"] .clock-region > clock-timer {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.trip-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483644;
    display: grid;
    place-items: center;
    padding: 18px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 260ms ease-out,
        visibility 260ms step-end;
}

.trip-transition-overlay[hidden] {
    display: none;
}

.trip-transition-overlay[popover] {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    background: transparent;
}

.trip-transition-overlay[popover]:popover-open {
    display: grid;
}

.trip-transition-overlay[popover]::backdrop {
    display: none;
}

.trip-transition-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 260ms ease-out,
        visibility 0ms step-start;
}

.trip-transition-overlay-panel {
    width: min(620px, calc(100vw - 36px));
    max-height: min(82dvh, 720px);
    overflow: hidden auto;
    padding: clamp(18px, 4vw, 30px);
    border: 5px solid rgb(169 221 247 / 92%);
    transform:
        translateY(
            var(
                --trip-transition-summary-shift-y,
                0px
            )
        );
    transition:
        transform 280ms ease;
    border-radius: 24px;
    color: var(--wm-white);
    background: rgb(0 30 96 / 18%);
    box-shadow:
        0 18px 70px rgb(0 0 0 / 38%),
        inset 0 0 36px rgb(169 221 247 / 7%),
        0 0 30px rgb(169 221 247 / 18%);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    backdrop-filter: blur(10px) saturate(115%);
}

.trip-transition-overlay.has-voice-entry
.trip-transition-overlay-panel,
.trip-transition-overlay.has-number-pad
.trip-transition-overlay-panel {
    max-height:
        var(
            --trip-transition-summary-max-height,
            82dvh
        );
}

.trip-transition-overlay-panel h2 {
    margin: 0 0 18px;
    color: var(--wm-blue-light, #a9ddf7);
    font-size: clamp(28px, 7vw, 46px);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 12px rgb(0 0 0 / 45%);
}

.trip-transition-overlay-details {
    display: grid;
    gap: 10px;
}

.trip-transition-overlay-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: baseline;
    padding: 9px 0;
    border-top: 1px solid rgb(169 221 247 / 18%);
    font-size: clamp(15px, 3.8vw, 21px);
}

.trip-transition-overlay-row:first-child {
    border-top: 0;
}

.trip-transition-overlay-row > span {
    color: rgb(255 255 255 / 76%);
    font-weight: 650;
}

.trip-transition-overlay-row code {
    color: #111;
    background: var(--wm-yellow, #ffc220);
    border: 1px solid rgb(0 0 0 / 35%);
    border-radius: 8px;
    padding: 3px 8px;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 1.08em;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .02em;
    text-shadow: none;
    box-shadow: 0 1px 4px rgb(0 0 0 / 24%);
}

@media (max-width: 520px) {
    .trip-transition-overlay-panel {
        width: min(94vw, 620px);
        padding: 18px 16px;
        border-width: 4px;
        border-radius: 20px;
    }

    .trip-transition-overlay-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .trip-transition-overlay-row code {
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trip-transition-overlay,
    .trip-transition-overlay-panel,
    .voice-entry-surface,
    .number-pad-dialog {
        transition: none;
    }

    .voice-entry-instructions.is-attention {
        animation: none;
        border-color: rgb(255 194 32 / 92%);
        background: rgb(255 194 32 / 18%);
    }
}

.break-dialog {
    width: min(680px, calc(100vw - 24px));
}

.scheduled-start-dialog {width:min(560px,calc(100vw - 24px));}
.scheduled-start-dialog form {display:grid;gap:14px;}
.scheduled-start-content {display:grid;gap:12px;padding:16px;}
.scheduled-start-countdown,.scheduled-start-standard {display:grid;place-items:center;gap:5px;min-height:96px;padding:12px;border:2px solid var(--wm-blue-light);border-radius:13px;background:var(--wm-blue-dark);color:var(--wm-white);}
.scheduled-start-countdown strong {color:var(--wm-blue-light);font-size:clamp(38px,10vw,58px);line-height:1;}
.scheduled-start-standard {width:100%;font:inherit;}
.scheduled-start-standard strong {font-size:clamp(25px,7vw,36px);}
.scheduled-start-standard.needs-value {animation:scheduled-standard-alert .7s ease-in-out 2;box-shadow:0 0 0 4px rgb(255 194 32 / 65%);}
.scheduled-start-auto {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--wm-blue-light);border-radius:10px;font-weight:700;}
.scheduled-start-auto input {width:24px;height:24px;}
.scheduled-start-message {margin:0;text-align:center;color:var(--wm-yellow);font-weight:700;}
.scheduled-start-actions {padding:0 16px 16px;}
@keyframes scheduled-standard-alert {50%{background:var(--wm-yellow);color:var(--wm-blue-dark);}}
.trip-settings-dialog #tripSettingsPrimary[data-future-trip="true"] {display:grid;place-items:center;}
.trip-settings-dialog #tripSettingsPrimary[data-future-trip="true"] svg {width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}

.break-dialog-content {
    display: grid;
    gap: 20px;
}

.break-type-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 8px 4px 4px;
}

.break-type-button {
    min-height: 88px;
    margin: 0;
    padding: 12px 8px;
    border: 3px solid #000;
    border-radius: 15px;
    color: var(--wm-white);
    background: var(--timer-break-color, #001e60);
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 700;
    line-height: 1.05;
}

.break-type-button.lunch {
    color: var(--wm-blue-dark);
    background: var(--timer-lunch-color, #ffc220);
}

@media (max-width: 480px) {
    .break-type-actions { gap: 8px; }
    .break-type-button { min-height: 78px; }
}


/* Connection indicators */
.number-pad-settings {
    position: relative;
}

.number-pad-settings-control {
    appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    color: inherit;
    background: transparent;
    touch-action: manipulation;
}

.number-pad-persistence-badge {
    appearance: none;
    margin: 0;
    padding: 0;
    z-index: 2;
    color: var(--wm-white);
    cursor: default;
    touch-action: manipulation;
}

.number-pad-settings[data-persistence="offline"] .number-pad-persistence-badge {
    cursor: pointer;
}

.number-pad-settings[data-persistence="offline"] .number-pad-persistence-badge:hover,
.number-pad-settings[data-persistence="offline"] .number-pad-persistence-badge:focus-visible {
    box-shadow: 0 0 0 3px rgb(255 255 255 / 28%);
}

.trip-settings-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.trip-settings-cloud {
    appearance: none;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 4px;
    border: 0;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: var(--wm-white);
    background: transparent;
    cursor: default;
}

.trip-settings-cloud::before {
    content: "";
    width: 26px;
    height: 26px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.trip-settings-cloud[data-network-status="online"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
}

.trip-settings-cloud[data-network-status="offline"] {
    color: rgb(255 255 255 / 78%);
    cursor: pointer;
}

.trip-settings-cloud[data-network-status="offline"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.trip-settings-cloud[data-network-status="offline"]:hover,
.trip-settings-cloud[data-network-status="offline"]:focus-visible {
    background: rgb(255 255 255 / 10%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%);
}

.trip-settings-cloud[data-network-status="pending"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    animation: connection-cloud-pulse 700ms ease-in-out infinite alternate;
}

.number-pad-settings[data-connection-phase="handoff"] .number-pad-settings-gear {
    animation: number-pad-gear-spin 800ms linear infinite;
}

.number-pad-settings[data-connection-phase="retry"][data-persistence="pending"] .number-pad-settings-gear {
    animation: none;
}

.number-pad-settings[data-connection-phase="retry"][data-persistence="pending"] .number-pad-persistence-badge {
    display: grid;
}

.number-pad-settings[data-connection-phase="retry"][data-persistence="pending"] .number-pad-persistence-badge::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    animation: connection-cloud-pulse 700ms ease-in-out infinite alternate;
}

@keyframes connection-cloud-pulse {
    from { opacity: 0.35; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}


/* staged-trip-settings-timestamp-v2 */
.trip-settings-dialog {
    --trip-start-transition-duration: 250ms;
}

.trip-now-actions {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 0;
    align-items: stretch;
    transition: gap var(--trip-start-transition-duration) ease-in-out;
}

.trip-now-actions[hidden] {
    display: none;
}

.trip-now-action {
    flex: 1 1 100%;
    min-width: 0;
    transition:
        flex-basis var(--trip-start-transition-duration) ease-in-out,
        padding-inline var(--trip-start-transition-duration) ease-in-out,
        font-size var(--trip-start-transition-duration) ease-in-out;
}

.trip-now-actions.is-selecting {
    gap: 12px;
}

.trip-now-actions.is-selecting .trip-now-action,
.trip-now-actions.is-selecting .trip-now-cancel {
    flex-basis: calc(50% - 6px);
}

.trip-now-actions.is-selecting .trip-now-action {
    padding-inline: 10px;
    font-size: clamp(13px, 3vw, 16px);
}

.trip-now-cancel {
    box-sizing: border-box;
    flex: 0 0 0%;
    min-width: 0;
    min-height: 48px;
    overflow: hidden;
    padding: 10px 0;
    border: 1.5px solid rgb(255 255 255 / 72%);
    border-radius: 10px;
    color: var(--wm-white);
    background: var(--ui-charcoal-gradient);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
    opacity: 0;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    pointer-events: none;
    transition:
        flex-basis var(--trip-start-transition-duration) ease-in-out,
        padding-inline var(--trip-start-transition-duration) ease-in-out,
        opacity var(--trip-start-transition-duration) ease-in-out;
}

.trip-now-actions.is-selecting .trip-now-cancel {
    padding-inline: 16px;
    opacity: 1;
    pointer-events: auto;
}

.trip-time-now-toggle {
    width: 54px;
    height: 54px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1.5px solid rgb(169 221 247 / 92%);
    border-radius: 12px;
    color: var(--wm-white);
    background: var(--ui-blue-gradient);
    box-shadow: var(--ui-inner-highlight), 0 5px 12px rgb(0 0 0 / 18%);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.trip-time-row .trip-time-edit,
.trip-time-row .trip-time-now-toggle {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    transition: opacity var(--trip-start-transition-duration) linear;
}

.trip-time-row .trip-time-edit {
    z-index: 2;
    opacity: 1;
}

.trip-time-row .trip-time-now-toggle {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.trip-settings-dialog.is-setting-starts-now .trip-time-edit {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.trip-settings-dialog.is-setting-starts-now .trip-time-now-toggle {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.trip-time-now-toggle[aria-pressed="true"] {
    box-shadow: inset 0 2px 5px rgb(0 0 0 / 24%), 0 4px 10px rgb(0 0 0 / 18%);
}

@media (max-width: 620px) {
    .trip-time-row .trip-time-edit,
    .trip-time-row .trip-time-now-toggle {
        grid-column: 2;
        grid-row: 2;
    }

    .trip-time-now-toggle {
        width: 50px;
        height: 50px;
    }
}


/* explicit-numberpad-navigation-v1 */
.number-pad-header.settings-hidden {
    grid-template-columns: 1fr;
}

/* reversible-disabled-ui-v1 */
.number-pad-key,
.trip-time-edit,
.trip-settings-dialog #tripSettingsPrimary {
    transition:
        opacity 250ms ease-in-out,
        filter 250ms ease-in-out,
        color 250ms ease-in-out,
        border-color 250ms ease-in-out,
        box-shadow 250ms ease-in-out;
}

.trip-now-action {
    transition:
        flex-basis var(--trip-start-transition-duration) ease-in-out,
        padding-inline var(--trip-start-transition-duration) ease-in-out,
        font-size var(--trip-start-transition-duration) ease-in-out,
        opacity 250ms ease-in-out,
        filter 250ms ease-in-out,
        color 250ms ease-in-out,
        border-color 250ms ease-in-out,
        box-shadow 250ms ease-in-out;
}


/* connection-failure-login-handoff-v1 */
.number-pad-settings[data-connection-phase="awaiting-login"] .number-pad-settings-gear {
    animation: number-pad-gear-spin 800ms linear infinite;
}

/* trip-start-now-content-transition-v1 */
.trip-now-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    white-space: nowrap;
    overflow: hidden;
}

.trip-now-start-copy {
    width: var(--trip-now-start-copy-width, auto);
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transform-origin: left center;
    transition:
        width var(--trip-start-transition-duration) ease-in-out,
        opacity var(--trip-start-transition-duration) linear;
}

.trip-now-actions.is-selecting .trip-now-start-copy {
    width: 0;
    opacity: 0;
}

.trip-now-value-copy {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: var(--trip-now-now-width, 3ch);
    min-width: 0;
    height: 1em;
    line-height: 1;
    overflow: visible;
    transition: width var(--trip-start-transition-duration) ease-in-out;
}

.trip-now-actions.is-selecting .trip-now-value-copy {
    width: var(--trip-now-timestamp-width, 9ch);
}

.trip-now-now-label,
.trip-now-timestamp-label {
    position: absolute;
    left: 0;
    top: 50%;
    display: inline-block;
    width: max-content;
    white-space: nowrap;
    transition:
        opacity var(--trip-start-transition-duration) ease-in-out,
        transform var(--trip-start-transition-duration) ease-in-out;
}

.trip-now-now-label {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.trip-now-timestamp-label {
    opacity: 0;
    transform: translateY(-35%) scale(0.94);
}

.trip-now-actions.is-selecting .trip-now-now-label {
    opacity: 0;
    transform: translateY(-65%) scale(0.94);
}

.trip-now-actions.is-selecting .trip-now-timestamp-label {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}


/* connection-animation-anchor-v2 */
.number-pad-settings[data-connection-phase="initial"][data-persistence="pending"] .number-pad-persistence-badge {
    display: grid;
    animation: number-pad-cloud-fade-in 1000ms linear both;
}

.number-pad-settings[data-connection-phase="initial"][data-persistence="pending"] .number-pad-persistence-badge::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
}

.number-pad-settings[data-connection-phase="retry"] .number-pad-settings-gear,
.number-pad-settings[data-connection-phase="awaiting-login"] .number-pad-settings-gear {
    animation: number-pad-gear-spin 800ms linear infinite;
}

/* numberpad-connection-timing-v4 */
.number-pad-settings[data-connection-phase="initial"][data-persistence="pending"] .number-pad-settings-gear {
    animation: number-pad-gear-spin 1000ms linear 1;
}

.number-pad-settings[data-connection-phase="initial"][data-persistence="pending"] .number-pad-persistence-badge {
    display: none;
    animation: none;
}

.number-pad-settings[data-connection-phase="initial-cloud"] .number-pad-persistence-badge {
    animation: number-pad-cloud-fade-in 250ms linear both;
}

.number-pad-settings[data-connection-phase="cloud-fade"] .number-pad-persistence-badge,
.number-pad-settings[data-connection-phase="handoff"] .number-pad-persistence-badge {
    animation: none;
}

.number-pad-settings[data-connection-phase="retry"] .number-pad-settings-gear {
    animation: none;
}

.number-pad-settings[data-connection-phase="retry"][data-persistence="pending"] .number-pad-persistence-badge::before {
    animation: none;
}

/* trip-start-copy-return-anchor-v1 */
.trip-now-actions.is-exiting .trip-now-start-copy {
    width: var(--trip-now-start-copy-width, auto);
    opacity: 1;
    transition: none;
    transform-origin: right center;
    animation: trip-now-start-copy-grow-from-right var(--trip-start-transition-duration) ease-in-out both;
}

@keyframes trip-now-start-copy-grow-from-right {
    from { clip-path: inset(0 0 0 100%); }
    to { clip-path: inset(0); }
}

/* cloud-icon-y-flip-v1 */
.number-pad-persistence-badge,
.trip-settings-cloud {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

/* restore-reference-palette-and-cloud-state-v1 */
:root {
    --wm-blue: #0053e2;
    --wm-blue-dark: #001e60;
    --wm-blue-mid: #0053e2;
    --wm-yellow: #ffc220;
    --ui-navy-gradient: #001e60;
    --ui-blue-gradient: #0053e2;
    --ui-yellow-gradient: #ffc220;
}

.app {
    background: var(--wm-blue);
}

.number-pad-settings .number-pad-persistence-badge[data-cloud-state="online"] {
    display: grid;
    background: var(--wm-blue);
}

.number-pad-settings .number-pad-persistence-badge[data-cloud-state="offline"] {
    display: grid;
    background: var(--wm-gray);
}

.number-pad-settings .number-pad-persistence-badge[data-cloud-state="pending"] {
    display: grid;
}

.number-pad-settings .number-pad-persistence-badge[data-cloud-state="online"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black'/%3E%3C/svg%3E");
}

.number-pad-settings .number-pad-persistence-badge[data-cloud-state="offline"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 5l14 14' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.number-pad-settings .number-pad-persistence-badge[data-cloud-state="pending"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='q'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M10.2 9.4a2.3 2.3 0 1 1 4.2 1.3c-.3.5-.8.8-1.3 1.15-.7.5-1.1.95-1.1 1.85' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.1' r='.9' fill='black'/%3E%3C/mask%3E%3C/defs%3E%3Cpath d='M7 18h10a4 4 0 0 0 .8-7.9A6 6 0 0 0 6.4 8.4 4.8 4.8 0 0 0 7 18Z' fill='black' mask='url(%23q)'/%3E%3C/svg%3E");
    animation: none;
}

/* reference-pattern-sitewide-v1 */
:root {
    --app-document-padding: 8px;
    --wm-blue: #0053e2;
    --wm-blue-dark: #001e60;
    --wm-blue-mid: #0053e2;
    --wm-yellow: #ffc220;
    --ui-navy-gradient: #001e60;
    --ui-blue-gradient: #0053e2;
    --ui-yellow-gradient: #ffc220;
    --ui-gray-gradient: #5f6772;
    --ui-charcoal-gradient: linear-gradient(180deg, #46515c 0%, #2f3943 45%, #202933 100%);
    --ui-green-gradient: #2e7d32;
}

.app {
    margin: 0;
    padding: var(--app-document-padding);
    background: var(--wm-blue);
}

.app .trip-action-controls,
.app .active-trip-controls,
.app .trip-action-row,
.app .percent-summary {
    background: transparent;
}

.main-menu:popover-open {
    inset:
        calc(var(--app-document-padding) + 52px + 14px)
        auto
        auto
        var(--app-document-padding);
}

.main-menu::before,
.main-menu::after {
    left: 26px;
}

.main-menu {
    background: var(--wm-blue-dark);
}

.main-menu::after {
    border-bottom-color: var(--wm-blue-dark);
}

.dialog-header,
.number-pad-context {
    background: var(--ui-charcoal-gradient);
    border-bottom: 1px solid rgb(255 255 255 / 28%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%);
}

.dialog-close {
    background: transparent;
}

.app-dialog {
    background: var(--wm-blue-dark);
}

.app-dialog fieldset,
.clock-preview {
    background: color-mix(in srgb, var(--wm-blue-dark) 88%, var(--wm-blue) 12%);
    border-color: rgb(255 255 255 / 54%);
}

.app-dialog input,
.app-dialog select {
    background: var(--wm-blue-dark);
    border-color: rgb(255 255 255 / 62%);
}

.trip-time-edit,
.trip-now-action,
.trip-time-now-toggle,
.number-pad-settings {
    background: var(--wm-blue);
}

.trip-time-value,
.dialog-actions .primary-action,
.number-pad-readout,
.new-trip-button,
.end-trip-button,
.break-button,
.break-type-button.lunch {
    background: var(--wm-yellow);
}

.number-pad-grid,
.number-pad-key,
.break-type-button {
    background: var(--wm-blue-dark);
}

.number-pad-confirm {
    background: var(--wm-blue);
}

.number-pad-meridiem.is-selected {
    color: var(--wm-yellow);
    box-shadow: 0 7px 13px rgb(0 0 0 / 42%), 0 0 0 2px rgb(255 194 32 / 24%);
}

.trip-now-action {
    display: grid;
    grid-template-columns:
        min-content
        minmax(0, 1fr)
        min-content
        min-content;
    align-items: center;
    justify-content: stretch;
    column-gap: 0.3em;
    transition:
        grid-template-columns var(--trip-start-transition-duration) ease-in-out,
        flex-basis var(--trip-start-transition-duration) ease-in-out,
        padding-inline var(--trip-start-transition-duration) ease-in-out,
        font-size var(--trip-start-transition-duration) ease-in-out,
        opacity 250ms ease-in-out,
        filter 250ms ease-in-out,
        color 250ms ease-in-out,
        border-color 250ms ease-in-out,
        box-shadow 250ms ease-in-out;
}

.trip-now-actions.is-selecting .trip-now-action {
    grid-template-columns:
        min-content
        minmax(0, 0fr)
        min-content
        min-content;
}

.trip-now-start-copy,
.trip-now-actions.is-selecting .trip-now-start-copy,
.trip-now-actions.is-exiting .trip-now-start-copy {
    width: auto;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    text-align: right;
    transform: none;
    animation: none;
    transition: none;
}

/* trip-start-seven-column-grid-v4 */
.trip-now-action {
    display: grid;
    width: 100%;
    grid-template-columns:
        1fr
        repeat(2, min-content)
        minmax(0, var(--trip-now-start-copy-width, 21ch))
        repeat(2, min-content)
        1fr;
    grid-template-rows: 1fr;
    gap: 0;
    align-items: center;
    justify-content: stretch;
    text-align: center;
    transition:
        grid-template-columns var(--trip-start-transition-duration) ease-in-out,
        flex-basis var(--trip-start-transition-duration) ease-in-out,
        padding-inline var(--trip-start-transition-duration) ease-in-out,
        font-size var(--trip-start-transition-duration) ease-in-out,
        opacity 250ms ease-in-out,
        filter 250ms ease-in-out,
        color 250ms ease-in-out,
        border-color 250ms ease-in-out,
        box-shadow 250ms ease-in-out;
}

.trip-now-actions.is-selecting .trip-now-action {
    grid-template-columns:
        1fr
        repeat(2, min-content)
        minmax(0, 0px)
        repeat(2, min-content)
        1fr;
}

.trip-now-set-word {
    grid-column: 2;
    grid-row: 1;
}

.trip-now-space {
    grid-column: 3;
    grid-row: 1;
}

.trip-now-start-copy,
.trip-now-actions.is-selecting .trip-now-start-copy,
.trip-now-actions.is-exiting .trip-now-start-copy {
    grid-column: 4;
    grid-row: 1;
    width: auto;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    text-align: center;
    transform: none;
    animation: none;
    transition: none;
}

.trip-now-to-word {
    grid-column: 5;
    grid-row: 1;
    white-space: nowrap;
}

.trip-now-value-copy {
    grid-column: 6;
    grid-row: 1;
    justify-self: center;
}


/* timer-settings-v1 */
.timer-settings-divider {
    width: 100%;
    height: 1px;
    margin: 2px 0 4px;
    border: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgb(255 255 255 / 55%) 14%,
        rgb(255 255 255 / 55%) 86%,
        transparent
    );
}

.timer-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.timer-color-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 10px;
    align-items: center;
}

.timer-color-row.with-toggle {
    grid-template-columns: minmax(0, 1fr) 28px 68px;
}

.app-dialog .timer-color-row > label {
    display: block;
    min-width: 0;
}

.app-dialog .timer-color-row > input[type="color"] {
    width: 68px;
    min-width: 68px;
    min-height: 38px;
    padding: 3px;
}

.app-dialog .timer-color-row > input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    justify-self: center;
}

clock-timer time-range[type="trip"] {
    background: var(--clock-timer-trip-color, #0053e2);
}

clock-timer time-range[type="earlystart"] {
    background: var(--clock-timer-early-start-color, #4dbdf5);
}

clock-timer[render-early-start-as-trip] time-range[type="earlystart"] {
    background: var(--clock-timer-trip-color, #0053e2);
}

clock-timer time-range[type="break"] {
    background: var(--clock-timer-break-color, #001e60);
}

clock-timer time-range[type="lunch"] {
    background: var(--clock-timer-lunch-color, #ffc220);
}

clock-timer time-range[type="buffer"] {
    background: var(--clock-timer-break-buffer-color, #6b7f99);
}

clock-timer[hide-break-buffer] time-range[type="buffer"] {
    background: transparent !important;
}

clock-timer time-range[type="down"] {
    background: var(--clock-timer-down-color, #5f6772);
}

clock-timer time-range[type="approval-surplus"] {
    background: var(--clock-timer-approval-surplus-color, #9c6b30);
}

clock-timer time-range[type="approval-deficit"] {
    background: var(--clock-timer-approval-deficit-color, #7a1f3d);
}

clock-timer time-range[type="tolerance"] {
    background: var(--clock-timer-tolerance-color, #2e7d32);
}

clock-timer time-range[type="overtime"] {
    background: var(--clock-timer-overtime-color, #ff5c5c);
}

clock-timer[hide-overtime] time-range[type="overtime"] {
    background: var(--clock-timer-trip-color, #0053e2);
}

clock-timer time-range[type="latency"] {
    background: var(--clock-timer-latency-color, #e1251b);
}

clock-timer[hide-latency] time-range[type="latency"] {
    display: none !important;
}

@media (max-width: 560px) {
    .timer-color-grid {
        grid-template-columns: 1fr;
    }
}


/* authoritative-timer-button-palette-v3 */
.break-button {
    color: var(--timer-break-text-color, #ffffff);
    background: var(--timer-break-color, #001e60);
}

.down-button {
    color: var(--timer-down-text-color, #ffffff);
    background: var(--timer-down-color, #5f6772);
}

.break-type-button {
    color: var(--timer-break-text-color, #ffffff);
    background: var(--timer-break-color, #001e60);
}

.break-type-button.lunch {
    color: var(--timer-lunch-text-color, #000000);
    background: var(--timer-lunch-color, #ffc220);
}

/* graphical-settings-sticky-actions-v1 */
#graphicalSettingsForm {
    gap: 0;
}

.graphical-dialog .dialog-header {
    position: sticky;
    top: 0;
    z-index: 5;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding-inline: 12px;
}

.dialog-header-help {
    appearance: none;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1.5px solid rgb(169 221 247 / 88%);
    border-radius: 50%;
    color: var(--wm-white);
    background: var(--wm-blue);
    box-shadow: var(--ui-inner-highlight), 0 4px 9px rgb(0 0 0 / 18%);
    font: inherit;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.dialog-header-help[aria-pressed="true"] {
    color: var(--wm-white);
    background: var(--wm-blue);
    box-shadow: 0 0 0 2px var(--wm-blue-light), var(--ui-inner-highlight), 0 4px 9px rgb(0 0 0 / 18%);
}

.graphical-dialog .graphical-settings-actions {
    position: sticky;
    top: 64px;
    z-index: 4;
    margin: 0 !important;
    padding: 12px 16px;
    background: var(--ui-navy-gradient);
    border-bottom: 1px solid rgb(169 221 247 / 42%);
    box-shadow: 0 7px 16px rgb(0 0 0 / 24%), inset 0 1px 0 rgb(255 255 255 / 8%);
}

.graphical-dialog .graphical-settings-grid {
    margin-top: 16px;
    margin-bottom: 16px;
    grid-template-columns: minmax(0, 1fr);
}

.graphical-dialog .clock-preview {
    position: sticky;
    top: 137px;
    z-index: 6;
    min-height: 270px;
    margin: 0 !important;
    padding: 10px 16px 14px;
    grid-template-rows: auto 1fr;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 9px 18px rgb(0 0 0 / 24%);
}

.graphical-dialog .clock-preview clock-timer {
    width: min(50vw, 230px);
    height: min(50vw, 230px);
    min-width: 190px;
    min-height: 190px;
}


/* graphical-settings-help-v1 */
.settings-help-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: center;
}

.graphical-dialog.show-setting-help .settings-help-row {
    grid-template-columns: minmax(120px, 0.8fr) 32px minmax(0, 1.2fr);
}

.app-dialog .settings-help-row > .settings-help-label,
.app-dialog .timer-color-row > .settings-help-label {
    display: block;
    min-width: 0;
    cursor: help;
    touch-action: manipulation;
}

.graphical-dialog.show-setting-help .timer-color-row.with-toggle.has-setting-help {
    grid-template-columns: 32px minmax(0, 1fr) 28px 68px;
    gap: 8px;
}

.graphical-dialog.show-setting-help .timer-color-row.has-setting-help:not(.with-toggle) {
    grid-template-columns: 32px minmax(0, 1fr) 68px;
    gap: 8px;
}

.graphical-dialog.show-setting-help label.has-inline-setting-help:not(.has-inline-color-help) {
    grid-template-columns: minmax(120px, 0.8fr) 32px minmax(0, 1.2fr);
}

.graphical-dialog.show-setting-help label.has-inline-color-help {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
}

.graphical-dialog.show-setting-help label.has-inline-color-help > input[type="color"] {
    grid-column: 1 / -1;
}

.settings-help-button {
    appearance: none;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    justify-self: center;
    display: grid;
    place-items: center;
    border: 1.5px solid rgb(169 221 247 / 88%);
    border-radius: 50%;
    color: var(--wm-white);
    background: var(--wm-blue);
    box-shadow: var(--ui-inner-highlight), 0 4px 9px rgb(0 0 0 / 18%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    transition:
        opacity 750ms linear,
        visibility 0s linear 750ms;
}

.settings-help-button.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 750ms linear,
        visibility 0s linear 0s;
}

.settings-help-button:focus-visible {
    outline: 2px solid var(--wm-white);
    outline-offset: 2px;
}

.settings-help-popover {
    transition: none;
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(680px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: 0;
    padding: 24px;
    overflow: auto;
    border: 1.5px solid rgb(169 221 247 / 82%);
    border-radius: 16px;
    color: var(--wm-white);
    background: var(--wm-blue-dark);
    box-shadow: 0 22px 64px rgb(0 0 0 / 58%), inset 0 1px 0 rgb(255 255 255 / 12%);
    opacity: 1;
}

.settings-help-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 12px;
    align-items: center;
    margin: 0 0 18px;
    padding: 4px 0 10px;
    background: var(--wm-blue-dark);
    border-bottom: 1px solid rgb(169 221 247 / 34%);
}

.settings-help-header h3 {
    margin: 0;
    font-size: clamp(24px, 5vw, 30px);
}

.settings-help-close {
    appearance: none;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1.5px solid rgb(169 221 247 / 72%);
    border-radius: 10px;
    color: var(--wm-white);
    background: var(--wm-blue);
    font-size: 28px;
    line-height: 1;
}

.settings-help-body {
    display: grid;
    gap: 16px;
    font-size: 16px;
    line-height: 1.45;
}

.settings-help-body p {
    margin: 0;
}

.settings-help-divider {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: rgb(169 221 247 / 42%);
}

.settings-help-state-behavior {
    color: var(--wm-blue-light);
}

.app-dialog .settings-help-state-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
}

.app-dialog .settings-help-state-toggle {
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    accent-color: var(--wm-blue);
}

.settings-help-state-label {
    align-self: center;
}

.settings-help-body code {
    padding: 2px 6px;
    border-radius: 5px;
    color: #a9ddf7;
    background: rgb(0 83 226 / 24%);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.95em;
}

.settings-help-token-grid,
.settings-help-state-grid,
.settings-help-example-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 12px;
    align-items: start;
}

.settings-help-examples {
    padding-top: 4px;
    border-top: 1px solid rgb(169 221 247 / 22%);
}

.settings-help-example-grid > span {
    color: #a9ddf7;
    font-weight: 900;
}

.settings-help-latency-lead {
    line-height: 1.65;
}

.settings-help-late {
    display: inline-block;
    margin-inline: 0.12em;
    color: var(--settings-help-latency-color, var(--timer-latency-color, #e1251b));
    font-size: clamp(1.55em, 6vw, 2.2em);
    font-weight: 950;
    line-height: 0.85;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 3px rgb(0 0 0 / 38%);
}

@media (max-width: 480px) {
    .settings-help-row {
        grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr);
        gap: 8px;
    }

    .graphical-dialog.show-setting-help .settings-help-row {
        grid-template-columns: minmax(90px, 0.8fr) 30px minmax(0, 1.2fr);
    }

    .graphical-dialog.show-setting-help .timer-color-row.with-toggle.has-setting-help {
        grid-template-columns: 30px minmax(0, 1fr) 28px 68px;
        gap: 7px;
    }

    .graphical-dialog.show-setting-help .timer-color-row.has-setting-help:not(.with-toggle) {
        grid-template-columns: 30px minmax(0, 1fr) 68px;
        gap: 7px;
    }

    .settings-help-popover {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        padding: 20px;
    }

    .settings-help-body {
        font-size: 15px;
    }

    .settings-help-token-grid,
    .settings-help-state-grid {
        column-gap: 10px;
    }
}

/* menu-sync-triplog-v1 */
.main-menu .trip-list-menu-row {
    border-radius: 10px;
    background: transparent;
    transition: background 180ms linear;
}

.main-menu .trip-list-menu-row:hover,
.main-menu .trip-list-menu-row:focus-within {
    background: linear-gradient(
        90deg,
        rgb(255 255 255 / 6%),
        rgb(169 221 247 / 18%),
        rgb(255 255 255 / 6%)
    );
}

.main-menu .trip-list-menu-row > button:hover,
.main-menu .trip-list-menu-row > button:focus-visible {
    background: transparent;
}

.trip-log-range-menu {
    margin: 2px 16px 8px 64px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: rgb(255 255 255 / 78%);
    font-size: 12px;
    font-weight: 600;
}

.trip-log-range-menu select {
    min-width: 0;
    margin: 0;
    padding: 5px 24px 5px 8px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 7px;
    color: var(--wm-white);
    background: rgb(32 41 51 / 94%);
    font: inherit;
    font-size: 12px;
}

.main-menu [data-dialog="graphicalSettingsDialog"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.2 4.1C5.8 4.8 3 8.1 3 12c0 4.9 4 8.9 8.9 8.9h1.2c1.5 0 2.7-1.2 2.7-2.7 0-1.4-1.1-2.5-2.5-2.5h-1.1c-1.1 0-2-.9-2-2s.9-2 2-2h2.4c.4 0 .9 0 1.3-.1' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='6.9' cy='11.4' r='1.1' fill='black'/%3E%3Ccircle cx='9.3' cy='7.6' r='1.1' fill='black'/%3E%3Cpath d='M18.1 2.2l.5 1.5 1.5.5 1.3-.7 1.1 1.1-.7 1.3.5 1.5 1.5.5v1.6l-1.5.5-.5 1.5.7 1.3-1.1 1.1-1.3-.7-1.5.5-.5 1.5h-1.6l-.5-1.5-1.5-.5-1.3.7-1.1-1.1.7-1.3-.5-1.5-1.5-.5V7.9l1.5-.5.5-1.5-.7-1.3 1.1-1.1 1.3.7 1.5-.5.5-1.5h1.6Z' fill='black'/%3E%3Ccircle cx='17.3' cy='8.7' r='2.1' fill='white'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.2 4.1C5.8 4.8 3 8.1 3 12c0 4.9 4 8.9 8.9 8.9h1.2c1.5 0 2.7-1.2 2.7-2.7 0-1.4-1.1-2.5-2.5-2.5h-1.1c-1.1 0-2-.9-2-2s.9-2 2-2h2.4c.4 0 .9 0 1.3-.1' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='6.9' cy='11.4' r='1.1' fill='black'/%3E%3Ccircle cx='9.3' cy='7.6' r='1.1' fill='black'/%3E%3Cpath d='M18.1 2.2l.5 1.5 1.5.5 1.3-.7 1.1 1.1-.7 1.3.5 1.5 1.5.5v1.6l-1.5.5-.5 1.5.7 1.3-1.1 1.1-1.3-.7-1.5.5-.5 1.5h-1.6l-.5-1.5-1.5-.5-1.3.7-1.1-1.1.7-1.3-.5-1.5-1.5-.5V7.9l1.5-.5.5-1.5-.7-1.3 1.1-1.1 1.3.7 1.5-.5.5-1.5h1.6Z' fill='black'/%3E%3Ccircle cx='17.3' cy='8.7' r='2.1' fill='white'/%3E%3C/svg%3E");
}

#toggleSyncMenuButton::before,
.goal-sync-button::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2M5 5l14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2M5 5l14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

#toggleSyncMenuButton[aria-pressed="true"]::before,
.goal-sync-button[aria-pressed="true"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

#toggleSyncMenuButton[aria-pressed="true"],
.goal-sync-button[aria-pressed="true"] {
    color: #a9ddf7;
}

.goal-sync-button {
    appearance: none;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0 0 0 -4px;
    padding: 5px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: rgb(255 255 255 / 72%);
    background: transparent;
}

.goal-sync-button[hidden] {
    display: none;
}

.goal-sync-button::before {
    content: "";
    width: 28px;
    height: 28px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.trip-log-button,
.trip-log-body {
    box-sizing: border-box;
    border: 3px solid rgb(255 255 255 / 38%);
    color: var(--wm-white);
    background: var(--ui-gray-gradient, var(--wm-gray));
    box-shadow: var(--ui-inner-highlight), 0 7px 16px rgb(0 0 0 / 24%);
}

.trip-log-button.trip-log-floating {
    transition:
        border-color var(--trip-list-merge-duration, 750ms) linear,
        border-radius var(--trip-list-merge-duration, 750ms) ease-in-out,
        color var(--trip-list-merge-duration, 750ms) linear,
        background var(--trip-list-merge-duration, 750ms) linear,
        box-shadow var(--trip-list-merge-duration, 750ms) linear;
}

.trip-log-body {
    position: fixed;
    z-index: 2999;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: var(--trip-log-shell-radius);
    transform: none;
    opacity: 0.58;
    transition:
        border-color var(--trip-list-merge-duration, 750ms) linear,
        border-radius var(--trip-list-merge-duration, 750ms) ease-in-out,
        opacity var(--trip-list-merge-duration, 750ms) linear;
    will-change: left, top, width, height, opacity;
}

.trip-log-body[hidden] {
    display: none;
}

.trip-log-button.trip-log-merged {
    background: var(--ui-charcoal-gradient, #2f3943);
}

.trip-log-button.trip-log-merged {
    border-bottom-color: transparent;
    border-radius:
        var(--trip-log-shell-radius)
        var(--trip-log-shell-radius)
        0
        0;
}

.trip-log-body.trip-log-merged {
    border-top-color: transparent;
    border-radius:
        0
        0
        var(--trip-log-shell-radius)
        var(--trip-log-shell-radius);
    opacity: 1;
}

.trip-log-close-button {
    appearance: none;
    position: fixed;
    z-index: 3002;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--wm-white);
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--trip-list-merge-duration, 750ms) linear;
}

.trip-log-close-button[hidden] {
    display: none;
}

.trip-log-close-button.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.trip-log-close-button::before {
    content: "";
    width: 30px;
    height: 30px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ui-regression-fixes-v1 */
.scope-control {
    position: relative;
    display: block;
}

.scope-toggle {
    width: 100%;
    height: 100%;
    padding-inline: 48px;
    text-align: center;
}

.scope-connection-button,
.goal-sync-button {
    width: 40px;
    height: 40px;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
}

.scope-connection-button {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    background: transparent;
}

.scope-connection-button::before,
.goal-sync-button::before {
    width: 28px;
    height: 28px;
    filter:
        drop-shadow(0.65px 0 0 currentColor)
        drop-shadow(-0.65px 0 0 currentColor)
        drop-shadow(0 0.65px 0 currentColor)
        drop-shadow(0 -0.65px 0 currentColor);
}

.percent-summary {
    position: relative;
    z-index: 1;
}

.percent-summary::before {
    content: "";
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.percent-summary > :is(strong, span, .percent-value-button) {
    min-width: 0;
    white-space: nowrap;
    text-align: center;
    font-size: var(--summary-percent-font-size, 1em);
    transition: font-size 240ms ease;
}

.percent-summary > #currentPercentValue {
    grid-column: 2;
    text-align: right;
}

.percent-summary > span {
    grid-column: 3;
}

.percent-summary > #goalPercentValue {
    grid-column: 4;
    text-align: left;
}

.percent-summary > .goal-sync-button {
    position: relative;
    inset: auto;
    grid-column: 6;
    justify-self: start;
    width: 40px;
    height: 40px;
    margin: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 240ms ease, transform 240ms ease, visibility 240ms;
}

.percent-summary {
    transition: grid-template-columns 240ms ease, padding-inline 240ms ease;
}

/* Keep the fixed-size icon available for its exit animation; the grid track
   itself collapses, so hidden Sync consumes no percentage space. */
.percent-summary > .goal-sync-button[hidden] {
    display: grid;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(12px);
}

@media (prefers-reduced-motion: reduce) {
    .percent-summary,
    .percent-summary > :is(strong, span, .percent-value-button, .goal-sync-button) {
        transition: none;
    }
}

#toggleSyncMenuButton::before {
    content: none;
}

#toggleSyncMenuButton[aria-pressed="true"] {
    color: var(--wm-white);
}

.sync-goals-menu-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    color: var(--wm-white);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.sync-goals-menu-icon::before {
    content: "";
    width: 30px;
    height: 30px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.sync-goals-menu-icon[data-sync-state="disabled"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2M4.5 4.5l15 15' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2M4.5 4.5l15 15' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sync-goals-menu-icon[data-sync-state="enabled"] {
    color: #a9ddf7;
}

.sync-goals-menu-icon[data-sync-state="enabled"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.trip-settings-dialog .dialog-actions button {
    min-height: 40px;
}


/* sync-disabled-strike-v2 */
#toggleSyncMenuButton[aria-pressed="false"] {
    text-decoration-line: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: currentColor;
}

.sync-goals-menu-icon {
    position: relative;
}

.sync-goals-menu-icon[data-sync-state="disabled"]::before,
.goal-sync-button[aria-pressed="false"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sync-goals-menu-icon[data-sync-state="disabled"]::after,
.goal-sync-button[aria-pressed="false"]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 3px;
    border-radius: 999px;
    background: var(--wm-red);
    box-shadow: 0 0 1px rgb(0 0 0 / 55%);
    transform: translate(-50%, -50%) rotate(45deg);
    transform-origin: center;
    pointer-events: none;
}

/* sync-offline-icon-state-v1 */
.hamburger-button {
    background: var(--wm-blue-dark);
}

.app,
.app button,
.app output,
.app select {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 700;
}

.sync-offline-overlay {
    position: absolute;
    display: block;
    color: var(--wm-white);
    opacity: 0;
    pointer-events: none;
}

.sync-goals-menu-icon > .sync-offline-overlay {
    inset: 0;
}

.goal-sync-button > .sync-offline-overlay {
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
}

.sync-offline-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sync-offline-overlay::after {
    content: "";
    position: absolute;
    left: -2px;
    bottom: -2px;
    width: 13px;
    height: 13px;
    background: var(--wm-red);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3 3 13' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3 3 13' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 1px rgb(0 0 0 / 55%));
}

.sync-goals-menu-icon[data-sync-network-state],
.goal-sync-button[data-sync-network-state] {
    color: var(--wm-white);
}

.sync-goals-menu-icon[data-sync-network-state="offline-prep"]::after,
.sync-goals-menu-icon[data-sync-network-state="offline-fading"]::after,
.goal-sync-button[data-sync-network-state="offline-prep"]::after,
.goal-sync-button[data-sync-network-state="offline-fading"]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 3px;
    border-radius: 999px;
    background: var(--wm-red);
    box-shadow: 0 0 1px rgb(0 0 0 / 55%);
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg);
    transform-origin: center;
    pointer-events: none;
}

.sync-goals-menu-icon[data-sync-network-state="offline-fading"]::after,
.goal-sync-button[data-sync-network-state="offline-fading"]::after {
    opacity: 0;
    transition: opacity 750ms linear;
}

.sync-goals-menu-icon[data-sync-network-state="offline"]::after,
.goal-sync-button[data-sync-network-state="offline"]::after {
    opacity: 0;
}

.sync-goals-menu-icon[data-sync-network-state="offline-fading"] > .sync-offline-overlay,
.goal-sync-button[data-sync-network-state="offline-fading"] > .sync-offline-overlay {
    opacity: 1;
    transition: opacity 750ms linear;
}

.sync-goals-menu-icon[data-sync-network-state="offline"] > .sync-offline-overlay,
.goal-sync-button[data-sync-network-state="offline"] > .sync-offline-overlay {
    opacity: 1;
}



/* sync-offline-arrow-spin-v1 */
/* Keep normal trip controls close to the 54px trip-value labels. */
.app[data-interval-state="break"] .active-trip-controls {
    grid-template-rows: 1fr 1fr;
}

/* Strike the Sync Goals label itself, not the entire menu row, so the
   connection annotation stays readable and unstruck. */
#toggleSyncMenuButton[aria-pressed="false"] {
    text-decoration: none;
}

#toggleSyncMenuButton[aria-pressed="false"] > span:last-child,
.app[data-network-status="offline"] #toggleSyncMenuButton > span:last-child {
    text-decoration-line: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: currentColor;
}

.app[data-network-status="offline"] #toggleSyncMenuButton::after {
    content: "(offline)";
    margin-left: -6px;
    color: rgb(255 255 255 / 78%);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

/* The Sync status overlay keeps the circular arrows as the primary symbol.
   Small status badges share the lower-right corner: cloud for offline, red X
   for an online active trip that cannot currently Sync. */
.sync-offline-overlay::before,
.sync-offline-overlay::after {
    content: none;
}

.sync-offline-arrow,
.sync-offline-cloud,
.sync-offline-x {
    position: absolute;
    display: block;
    pointer-events: none;
}

.sync-offline-arrow {
    inset: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.2 8.8A7.5 7.5 0 0 1 18 6.7L20.5 9M20.5 9V4.8M18.8 15.2A7.5 7.5 0 0 1 6 17.3L3.5 15M3.5 15v4.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sync-offline-cloud {
    right: -2px;
    bottom: -2px;
    width: 13px;
    height: 13px;
    background: currentColor;
    opacity: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.1 12.5h7.4a2.7 2.7 0 0 0 .5-5.35A4.25 4.25 0 0 0 3.9 6a3.25 3.25 0 0 0 .2 6.5Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.1 12.5h7.4a2.7 2.7 0 0 0 .5-5.35A4.25 4.25 0 0 0 3.9 6a3.25 3.25 0 0 0 .2 6.5Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 1px rgb(0 0 0 / 55%));
    transition: opacity 250ms linear;
}

.sync-offline-x {
    right: -2px;
    bottom: -2px;
    width: 13px;
    height: 13px;
    background: var(--wm-red);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3 3 13' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3 3 13' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 1px rgb(0 0 0 / 55%));
}


/* offline-sync-layer-regression-v2 */
/* Keep the original glyph only until the offline/X replacement takes over. */
.sync-goals-menu-icon[data-sync-network-state="offline-fading"]::before,
.sync-goals-menu-icon[data-sync-network-state="offline"]::before,
.goal-sync-button[data-sync-network-state="offline-fading"]::before,
.goal-sync-button[data-sync-network-state="offline"]::before {
    opacity: 0;
}

/* The red not-synced slash is persistent in every offline transition/state. */
.sync-goals-menu-icon[data-sync-network-state="offline-prep"]::after,
.sync-goals-menu-icon[data-sync-network-state="offline-fading"]::after,
.sync-goals-menu-icon[data-sync-network-state="offline"]::after,
.goal-sync-button[data-sync-network-state="offline-prep"]::after,
.goal-sync-button[data-sync-network-state="offline-fading"]::after,
.goal-sync-button[data-sync-network-state="offline"]::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 3px;
    border-radius: 999px;
    background: var(--wm-red);
    box-shadow: 0 0 1px rgb(0 0 0 / 55%);
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg);
    transform-origin: center;
    pointer-events: none;
    transition: none;
}


/* sync-three-state-and-trip-settings-v1 */
/* The replacement arrow layer is the single arrow glyph for all three states. */
.sync-goals-menu-icon[data-sync-layered="true"]::before,
.goal-sync-button[data-sync-layered="true"]::before {
    opacity: 0;
}

.sync-goals-menu-icon > .sync-offline-overlay,
.goal-sync-button > .sync-offline-overlay,
.sync-goals-menu-icon[data-sync-network-state] > .sync-offline-overlay,
.goal-sync-button[data-sync-network-state] > .sync-offline-overlay {
    opacity: 1;
    transition: none;
}

/* The red X is not a network-offline badge. Runtime eligibility controls it. */
.sync-offline-x {
    opacity: 0;
    transition: opacity 750ms linear;
}

/* The offline badge is the tiny cloud, while the circular Sync arrows remain
   visible as the primary glyph. */
.sync-goals-menu-icon[data-sync-network-state="offline-fading"] .sync-offline-cloud,
.sync-goals-menu-icon[data-sync-network-state="offline"] .sync-offline-cloud,
.goal-sync-button[data-sync-network-state="offline-fading"] .sync-offline-cloud,
.goal-sync-button[data-sync-network-state="offline"] .sync-offline-cloud {
    opacity: 1;
}

/* Slash is only the not-synced red overlay. It remains visible while that
   state is spinning, then can crossfade to X after spinning stops. */
.sync-goals-menu-icon[data-sync-state="enabled"][data-sync-network-state="offline-prep"]::after,
.goal-sync-button[aria-pressed="true"][data-sync-network-state="offline-prep"]::after {
    opacity: 0;
}

.sync-goals-menu-icon[data-sync-network-state="offline-fading"]::after,
.goal-sync-button[data-sync-network-state="offline-fading"]::after {
    opacity: 0;
    transition: opacity 750ms linear;
}

.sync-goals-menu-icon[data-sync-network-state="offline"]::after,
.goal-sync-button[data-sync-network-state="offline"]::after {
    opacity: 0;
    transition: none;
}

/* Do not crossfade status overlays while arrows are actively spinning. */
.sync-icon-spinning .sync-offline-x,
.sync-icon-spinning::after {
    transition: none !important;
}

/* sync-runtime-state-v1 */
/* Sync Off keeps the sync glyph but uses a neutral gray top-left -> bottom-right
   slash. The red X marks an online active trip unable to Sync; its message
   distinguishes unavailable totals from an impossible target. */
.sync-goals-menu-icon[data-sync-runtime-state="off"]::after,
.goal-sync-button[data-sync-runtime-state="off"]::after {
    background: rgb(255 255 255 / 58%);
    opacity: 1;
    transition: none;
}

.sync-goals-menu-icon[data-sync-runtime-state="data-unavailable"] .sync-offline-x,
.goal-sync-button[data-sync-runtime-state="data-unavailable"] .sync-offline-x,
.sync-goals-menu-icon[data-sync-runtime-state="time-blocked"] .sync-offline-x,
.goal-sync-button[data-sync-runtime-state="time-blocked"] .sync-offline-x {
    opacity: 1;
    transition: opacity 250ms linear;
}

.sync-goals-menu-icon[data-sync-runtime-state="data-unavailable"]::after,
.goal-sync-button[data-sync-runtime-state="data-unavailable"]::after,
.sync-goals-menu-icon[data-sync-runtime-state="time-blocked"]::after,
.goal-sync-button[data-sync-runtime-state="time-blocked"]::after {
    opacity: 0;
}

/* Offline keeps the circular Sync arrows and adds a small cloud badge in the
   lower-right. The red X uses that corner for blocked or unavailable totals. */
.sync-goals-menu-icon[data-sync-runtime-state="offline"],
.goal-sync-button[data-sync-runtime-state="offline"] {
    color: rgb(255 255 255 / 78%);
}

.sync-goals-menu-icon[data-sync-runtime-state="offline"]::after,
.goal-sync-button[data-sync-runtime-state="offline"]::after {
    opacity: 0 !important;
}

.sync-goals-menu-icon[data-sync-runtime-state="offline"] .sync-offline-x,
.goal-sync-button[data-sync-runtime-state="offline"] .sync-offline-x {
    opacity: 0 !important;
}

.sync-goals-menu-icon[data-sync-runtime-state="offline"] .sync-offline-cloud,
.goal-sync-button[data-sync-runtime-state="offline"] .sync-offline-cloud {
    opacity: 1;
}

/* Trip Settings footer controls should size like the pencil controls rather
   than stretching with the fullscreen form grid. */
.trip-settings-dialog form {
    align-content: start;
    grid-auto-rows: max-content;
}

.trip-settings-dialog .dialog-actions {
    align-self: start;
}

.trip-settings-dialog .dialog-actions button {
    height: 54px;
    min-height: 54px;
    max-height: 54px;
}

@media (max-width: 620px) {
    .trip-settings-dialog .dialog-actions button {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
}

/* Ready <-> running state swaps are not layout animations. */
.app.trip-state-snap {
    transition: none !important;
}


/* bundled-settings-interval-wave-id-fixes-v1 */
.trip-settings-dialog {
    width: min(760px, 94vw);
    max-width: 760px;
    height: max-content;
    max-height: 92dvh;
    margin: auto;
}

.trip-settings-dialog form {
    min-height: 0;
    height: auto;
}
.trip-defer-option {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 1rem;
    padding: .5rem 0;
    font-weight: 700;
}

.main-menu .hamburger-menu-popover .menu-help-button {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    padding: 0;
    align-self: center;
    justify-self: center;
    display: grid;
    place-items: center;
    gap: 0;
    border: 1.5px solid rgb(169 221 247 / 88%);
    border-radius: 50%;
    background: var(--wm-blue);
    color: var(--wm-white);
    box-shadow: var(--ui-inner-highlight), 0 4px 9px rgb(0 0 0 / 18%);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.main-menu .hamburger-menu-popover .menu-help-button::before {
    content: none;
    display: none;
}

.settings-help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(12px, 3vw, 15px);
    font-variant-numeric: tabular-nums;
}

.settings-help-table caption {
    margin-bottom: 10px;
    text-align: left;
    font-weight: 700;
}

.settings-help-table th,
.settings-help-table td {
    padding: 8px 4px;
    border-bottom: 1px solid rgb(169 221 247 / 30%);
    text-align: center;
}

.settings-help-table th:first-child {
    text-align: left;
}

.main-menu .menu-account-row {
    grid-template-columns: minmax(0, 1fr);
}

.settings-help-time-difference {
    color: var(--wm-yellow);
}

.settings-help-goal-value {
    color: var(--wm-blue-light);
}

.settings-help-table tbody tr {
    height: 64px;
}

.settings-help-table tbody tr > * {
    vertical-align: middle;
}

.settings-help-table .settings-help-total-row {
    background: rgb(169 221 247 / 12%);
    color: #a9ddf7;
    font-weight: 700;
}

.settings-help-table .settings-help-total-row > * {
    border-top: 2px solid rgb(169 221 247 / 65%);
    border-bottom: 0;
    padding-block: 12px;
}

.settings-help-table .settings-help-total-percent {
    background: var(--wm-blue-light);
    color: var(--wm-blue-dark);
    font-weight: 900;
}

.settings-help-total-percent strong {
    display: block;
    font-size: 1.5em;
}

.settings-help-total-percent span {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
}

.settings-help-table .settings-help-active-percent {
    background: var(--wm-yellow);
    color: var(--wm-blue-dark);
}

.settings-help-table-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-help-increasing-icon {
    fill: currentColor;
    stroke: none;
}

.settings-help-table-icon.settings-help-sync-icon {
    width: 36px;
    height: 36px;
    transform-origin: center;
}

.settings-help-popover:popover-open .settings-help-sync-icon {
    animation: settings-help-sync-rotation 3s linear infinite;
}

@keyframes settings-help-sync-rotation {
    to { transform: rotate(360deg); }
}

.goal-sync-button.sync-calculable .sync-offline-arrow {
    animation: settings-help-sync-rotation 3s linear infinite;
    transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
    .settings-help-popover:popover-open .settings-help-sync-icon {
        animation: none;
    }
    .goal-sync-button.sync-calculable .sync-offline-arrow {animation:none;}
}

/* Trip controls share one status-icon column without shifting button labels. */
.new-trip-button { position: relative; }
.deferred-trip-icon { display:none;position:absolute;top:50%;right:12px;width:28px;height:28px;transform:translateY(-50%);pointer-events:none; }
.new-trip-button.has-deferred-trip .deferred-trip-icon { display:block; }
.sync-pause-badge { position:absolute;right:1px;bottom:1px;width:14px;height:14px;border-radius:50%;background:#858b93;opacity:0;transform:scale(.85);transition:opacity 250ms,transform 250ms;pointer-events:none;z-index:5; }
.sync-pause-badge::after {content:"";position:absolute;inset:4px;background:linear-gradient(to right,white 0 30%,transparent 30% 70%,white 70%);}
.sync-paused .sync-pause-badge {opacity:1;transform:scale(1);}
.trip-menu-group {position:relative;}
.trip-menu-group > #tripLogSubmenu {grid-column:1 / -1;}

.trip-menu-group:has(> #tripLogSubmenu:not([hidden]))::before {content:"";position:absolute;left:56px;top:10px;bottom:0;width:1px;background:rgb(255 255 255 / 75%);pointer-events:none;}
.trip-menu-group .trip-log-range-menu,.trip-menu-group .trip-log-date-menu {margin-left:64px;padding-left:0;grid-template-columns:100px minmax(0,1fr);gap:10px;}
/* Decorative icons do not consume a label/control grid cell. */
.trip-menu-group .trip-log-range-menu {position:relative;}
.trip-menu-group .trip-log-range-menu[data-menu-icon]::before {
    position:absolute;
    inset-inline-start:-40px;
    top:50%;
    transform:translateY(-50%);
}

.trip-settings-dialog .trip-defer-option,.trip-settings-dialog .trip-productive-option {display:flex;gap:10px;align-items:center;margin:0;padding:4px 0;}
.trip-settings-dialog .trip-defer-option input,.trip-settings-dialog .trip-productive-option input {width:20px;height:20px;}

/* The title uses the same center as the readout's text, not its auxiliary controls. */
.number-pad-context {position:relative;display:block;padding-block:12px;text-align:center;}
.number-pad-context::before {content:"";}
.number-pad-context {padding-left:0;padding-right:calc(100% - 2 * var(--number-pad-title-center, 33.333%));}
.number-pad-readout {position:relative;grid-template-rows:minmax(0,1fr) 44px;}
.number-pad-readout:not(.absolute-mode) .number-pad-display {grid-row:1;}
.number-pad-readout.absolute-mode {grid-template-rows:minmax(0,1fr) 52px;}
.number-pad-header.settings-hidden .number-pad-readout {grid-template-columns:minmax(0,1fr) clamp(54px,16vw,72px);}
.number-pad-backspace {position:absolute;left:10px;bottom:7px;width:34px;height:34px;border:0;border-radius:6px;background:transparent;color:var(--wm-blue-dark);font-size:26px;line-height:1;z-index:2;}
.number-pad-backspace:disabled {opacity:.3;cursor:default;}
.number-pad-date-row {position:relative;width:100%;padding:4px 48px;display:flex;justify-content:center;gap:0;background:transparent;}
.number-pad-date-row input {width:145px;flex:0 0 145px;text-align:center;}
.number-pad-date-row input::-webkit-datetime-edit {text-align:center;display:block;}
.number-pad-calendar-icon {position:absolute;left:calc(50% - 92px);width:18px;height:18px;}

.number-pad-context.absolute-mode {
    padding-inline: 16px;
    text-align: left;
}
.number-pad-readout.absolute-mode .number-pad-display {
    padding-inline: 16px;
    justify-items: start;
    text-align: left;
}
.number-pad-readout.absolute-mode .number-pad-date-row {
    justify-content: flex-start;
    padding-inline: 16px 48px;
}
.number-pad-readout.absolute-mode .number-pad-date-row input {
    order: 1;
    flex: 0 1 145px;
    text-align: left;
}
.number-pad-readout.absolute-mode input::-webkit-datetime-edit {
    text-align: left;
}
.number-pad-readout.absolute-mode .number-pad-calendar-icon {
    position: static;
    order: 0;
    flex: 0 0 18px;
    margin-right: 6px;
}
.number-pad-readout.absolute-mode .number-pad-backspace {
    position: relative;
    left: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    margin-right: 8px;
}

.trip-log-body.trip-log-merged {overflow:auto;}
.trip-log-controls {display:grid;gap:10px;padding:14px;}
.trip-log-controls label {display:grid;grid-template-columns:minmax(110px,.8fr) minmax(0,1.4fr);gap:12px;align-items:center;}
.trip-log-controls select,.trip-log-controls input,.trip-log-editor select {min-width:0;border:1px solid #c0c9d2;border-radius:7px;padding:8px;color:white;background:#39434e;}
.trip-log-date-controls {display:grid;grid-template-columns:minmax(110px,.8fr) minmax(0,1.4fr);align-items:center;gap:10px 12px;}
.trip-log-date-controls input:disabled {opacity:.55;}
.trip-log-overview {margin:0 12px 14px;padding:18px;border:1px solid #a0acb8;border-radius:12px;background:rgb(0 0 0 / 12%);text-align:center;}
.trip-log-emphasis {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:0;margin-bottom:14px;font-size:clamp(28px,7vw,48px);}
.trip-log-emphasis>strong {display:grid;place-items:center;text-align:center;}
.trip-log-emphasis>strong+strong {border-left:1px solid #83909d;padding-left:0;}
.trip-log-emphasis .trip-log-actual {position:relative;}
.trip-log-emphasis .trip-log-actual>.calculation-uncertain-icon {
    position:absolute;
    top:50%;
    right:12px;
    margin:0;
    transform:translateY(-50%);
}

.graphical-dialog.show-setting-help .settings-help-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 250ms linear,
        visibility 0s linear 0s;
}
.graphical-dialog:not(.show-setting-help) .settings-help-button {
    display: none;
}
.new-user-dialog {position:fixed;inset:0;width:min(94vw,620px);height:min(92dvh,760px);margin:auto;padding:0;overflow:hidden;box-sizing:border-box;}
.new-user-dialog::backdrop {-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:rgb(0 0 0 / 38%);}
.new-user-dialog .dialog-header {position:relative;display:flex;justify-content:center;padding:12px 64px;border-bottom:1px solid rgb(255 255 255 / 35%);}
.new-user-dialog .dialog-header h2 {margin:0;text-align:center;}
.new-user-dialog .dialog-close {position:absolute;top:50%;right:14px;transform:translateY(-50%);}
.new-user-dialog iframe {display:block;width:100%;height:calc(100% - 58px);border:0;background:var(--wm-blue-dark);box-sizing:border-box;overflow:hidden;}

#adminMenuButton::before {
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 20 5v6c0 5-3.4 9-8 11-4.6-2-8-6-8-11V5l8-3Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 12h8M12 8v8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 20 5v6c0 5-3.4 9-8 11-4.6-2-8-6-8-11V5l8-3Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 12h8M12 8v8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.admin-menu-group[hidden],.admin-submenu[hidden] {display:none;}
.main-menu #adminMenuButton::after {content:"›";margin-left:auto;font-size:28px;line-height:1;transition:transform 180ms ease-in-out;}
.main-menu #adminMenuButton[aria-expanded="true"]::after {transform:rotate(90deg);}
.main-menu .admin-submenu {margin:0 16px 4px 56px;border-left:1px solid rgb(255 255 255 / 75%);}
.main-menu .admin-submenu button {padding:12px 14px;font-size:16px;color:var(--wm-blue-light);}
.main-menu .admin-submenu a {display:block;padding:12px 14px;font-size:16px;font-weight:700;color:var(--wm-blue-light);text-decoration:none;border-radius:8px;}
.main-menu .admin-submenu a:hover,.main-menu .admin-submenu a:focus-visible {background:rgb(255 255 255 / 10%);}
.main-menu .admin-submenu a[hidden] {display:none;}

.developer-menu-group[hidden],.developer-submenu[hidden],
.speech-tools-group[hidden],.speech-submenu[hidden],
.easter-egg-tools-group[hidden],.easter-egg-submenu[hidden]{display:none;}

#developerMenuButton::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8 9-3 3 3 3M16 9l3 3-3 3M13.5 7l-3 10' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8 9-3 3 3 3M16 9l3 3-3 3M13.5 7l-3 10' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.main-menu #developerMenuButton::after{content:"›";margin-left:auto;font-size:28px;line-height:1;transition:transform 180ms ease-in-out;}
.main-menu #developerMenuButton[aria-expanded="true"]::after{transform:rotate(90deg);}
.main-menu .developer-submenu{margin:0 16px 4px 56px;border-left:1px solid rgb(255 255 255 / 75%);}
.main-menu .developer-submenu>button,
.main-menu .developer-submenu>#speechToolsGroup>#speechMenuButton,
.main-menu .developer-submenu>#easterEggToolsGroup>#easterEggMenuButton{padding:12px 14px;font-size:16px;color:var(--wm-blue-light);}

.main-menu .developer-submenu .speech-submenu,
.main-menu .developer-submenu .easter-egg-submenu{margin-left:28px;}
.developer-menu-separator{margin-top:10px!important;}

#accessTokensButton::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='12' r='4' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 12h9M17 12v3M20 12v2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='12' r='4' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 12h9M17 12v3M20 12v2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
#developerDocsButton::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A3.5 3.5 0 0 1 7.5 2H11v17H7.5A3.5 3.5 0 0 0 4 22V5.5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M20 5.5A3.5 3.5 0 0 0 16.5 2H13v17h3.5A3.5 3.5 0 0 1 20 22V5.5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M7 7h2M15 7h2M7 11h2M15 11h2' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5A3.5 3.5 0 0 1 7.5 2H11v17H7.5A3.5 3.5 0 0 0 4 22V5.5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M20 5.5A3.5 3.5 0 0 0 16.5 2H13v17h3.5A3.5 3.5 0 0 1 20 22V5.5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M7 7h2M15 7h2M7 11h2M15 11h2' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
#sqlConsoleButton::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 9h18M9 4v16M15 4v16M3 14h18' fill='none' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 9h18M9 4v16M15 4v16M3 14h18' fill='none' stroke='black' stroke-width='1.7'/%3E%3C/svg%3E");
}
.main-menu #speechMenuButton::before{display:none;}
.main-menu #speechMenuButton{gap:14px;}
.main-menu #speechMenuButton::after{content:"›";margin-left:auto;font-size:24px;line-height:1;transition:transform 220ms ease-in-out;}
.main-menu #speechMenuButton[aria-expanded="true"]::after{transform:rotate(90deg);}
.main-menu .speech-submenu{margin:0 0 4px 28px;border-left:1px solid rgb(169 221 247 / 70%);}
.main-menu .speech-submenu button{padding:10px 12px;font-size:15px;color:var(--wm-blue-light);}
.main-menu .speech-submenu button::before{width:24px;height:24px;flex-basis:24px;}
.main-menu #easterEggMenuButton::after{content:"›";margin-left:auto;font-size:24px;line-height:1;transition:transform 220ms ease-in-out;}
.main-menu #easterEggMenuButton[aria-expanded="true"]::after{transform:rotate(90deg);}
.main-menu .easter-egg-submenu{margin:0 0 4px 28px;border-left:1px solid rgb(169 221 247 / 70%);}
.main-menu .easter-egg-submenu button{padding:10px 12px;font-size:15px;color:var(--wm-blue-light);}
.main-menu .easter-egg-submenu button::before{display:none;}
.main-menu .easter-egg-song-picker{
    display:grid;
    gap:6px;
    padding:8px 12px 10px;
    color:var(--wm-blue-light);
    font-size:14px;
}
.main-menu .easter-egg-song-picker select{
    width:100%;
    min-width:0;
    min-height:38px;
    padding:7px 9px;
    color:inherit;
    font:inherit;
    border:1px solid rgb(255 255 255 / 28%);
    border-radius:7px;
    background:var(--wm-blue-dark);
}
.main-menu .easter-egg-submenu button[disabled]{opacity:.42;}
#speechTrainingButton::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M6.5 11.5a5.5 5.5 0 0 0 11 0M12 17v4M8.5 21h7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M18.5 5v5M16 7.5h5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3Z' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M6.5 11.5a5.5 5.5 0 0 0 11 0M12 17v4M8.5 21h7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M18.5 5v5M16 7.5h5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
#speechEditorButton::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h10l4 4v14H5V3Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M14 3v5h5M8 12h8M8 16h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h10l4 4v14H5V3Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M14 3v5h5M8 12h8M8 16h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.speech-build-icon{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;color:currentColor;}
.speech-build-icon svg{width:30px;height:30px;overflow:visible;}
.speech-build-mic{fill:none;stroke:currentColor;stroke-width:2.15;stroke-linecap:round;stroke-linejoin:round;clip-path:inset(0);}
#speechMenuButton.speech-build-active .speech-build-mic{animation:speech-mic-build 570ms ease-out both;}
@keyframes speech-mic-build{
  from{clip-path:inset(100% 0 0 0);}
  to{clip-path:inset(0);}
}
.speech-build-scaffold path{fill:none;stroke:#ffc220;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;transition:stroke-dashoffset 180ms ease-in;}
.speech-build-crane{opacity:0;transition:opacity 140ms ease-in-out;}
.speech-build-crane path{fill:none;stroke:#003b73;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;}
#speechMenuButton.speech-build-active .speech-build-crane{opacity:1;transition-delay:300ms;}
#speechMenuButton.speech-build-active .rail-left,
#speechMenuButton.speech-build-active .rail-right{stroke-dashoffset:0;transition-delay:0ms;}
#speechMenuButton.speech-build-active .floor-1{stroke-dashoffset:0;transition-delay:90ms;}
#speechMenuButton.speech-build-active .brace-1a,
#speechMenuButton.speech-build-active .brace-1b{stroke-dashoffset:0;transition-delay:150ms;}
#speechMenuButton.speech-build-active .floor-2{stroke-dashoffset:0;transition-delay:210ms;}
#speechMenuButton.speech-build-active .brace-2a,
#speechMenuButton.speech-build-active .brace-2b{stroke-dashoffset:0;transition-delay:270ms;}
#speechMenuButton.speech-build-active .floor-3{stroke-dashoffset:0;transition-delay:330ms;}
#speechMenuButton.speech-build-active .floor-top{stroke-dashoffset:0;transition-delay:390ms;}
#speechMenuButton:not(.speech-build-active) .floor-top{transition-delay:0ms;}
#speechMenuButton:not(.speech-build-active) .floor-3{transition-delay:45ms;}
#speechMenuButton:not(.speech-build-active) .brace-2a,
#speechMenuButton:not(.speech-build-active) .brace-2b{transition-delay:90ms;}
#speechMenuButton:not(.speech-build-active) .floor-2{transition-delay:135ms;}
#speechMenuButton:not(.speech-build-active) .brace-1a,
#speechMenuButton:not(.speech-build-active) .brace-1b{transition-delay:180ms;}
#speechMenuButton:not(.speech-build-active) .floor-1{transition-delay:225ms;}
#speechMenuButton:not(.speech-build-active) .rail-left,
#speechMenuButton:not(.speech-build-active) .rail-right{transition-delay:270ms;}
@media (prefers-reduced-motion: reduce){
  .speech-build-scaffold path,.speech-build-crane,.main-menu #speechMenuButton::after{transition:none!important;}
  #speechMenuButton.speech-build-active .speech-build-scaffold path{stroke-dashoffset:0;}
  #speechMenuButton.speech-build-active .speech-build-mic{animation:none;}
}

/* Compact in-app speech trainer -------------------------------------- */
.speech-training-choice-dialog {
    width: min(420px, calc(100vw - 28px));
    padding: 14px;
}

.speech-training-choice-dialog .dialog-header {
    margin-bottom: 10px;
}

.speech-training-choice-dialog h2 {
    font-size: 22px;
}

.speech-training-choice-actions {
    display: grid;
    gap: 8px;
}

.speech-training-choice-actions > button {
    min-height: 58px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    justify-items: start;
    border: 1px solid rgb(255 255 255 / 54%);
    border-radius: 10px;
    color: var(--wm-white);
    background: rgb(0 30 96 / 58%);
    text-align: left;
}

.speech-training-choice-actions > button:hover,
.speech-training-choice-actions > button:focus-visible {
    background: rgb(255 255 255 / 12%);
}

.speech-training-choice-actions strong {
    font-size: 16px;
}

.speech-training-choice-actions span {
    color: rgb(255 255 255 / 70%);
    font-size: 12px;
    font-weight: 600;
}

.speech-training-pending-dialog {
    width: min(440px, calc(100vw - 28px));
    padding: 14px;
}

.speech-training-pending-message {
    margin: 8px 4px 4px;
    line-height: 1.35;
}

.speech-training-pending-error {
    margin: 6px 4px 0;
    color: #ffaaa6;
    font-weight: 700;
}

.speech-training-pending-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.speech-training-pending-actions button {
    min-height: 44px;
}

.speech-training-pending-actions .primary-action {
    color: var(--wm-blue-dark);
    background: var(--wm-yellow);
}

@media (max-width: 460px) {
    .speech-training-pending-actions {
        grid-template-columns: 1fr;
    }
}

.voice-entry-surface {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 2147483647;
    width: min(560px, calc(100vw - 24px));
    min-width: 0;
    margin: 0;
    padding: 7px 9px 8px;
    border: 2px solid rgb(255 255 255 / 44%);
    border-radius: 12px;
    color: var(--wm-white);
    background: linear-gradient(180deg, rgb(47 57 67 / 97%), rgb(34 43 51 / 97%));
    box-shadow: 0 9px 22px rgb(0 0 0 / 34%), inset 0 1px 0 rgb(255 255 255 / 12%);
    backdrop-filter: blur(8px);
    transform:
        translate(
            -50%,
            calc(
                -50% +
                var(
                    --voice-entry-summary-shift-y,
                    0px
                )
            )
        );
    transition:
        transform 280ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
    will-change: transform;
}

.voice-entry-surface[hidden] {
    display: none;
}

.voice-entry-surface[open] {
    display: block;
}

.voice-entry-surface::backdrop {
    display: none;
}

.voice-entry-header {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.voice-entry-header > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.voice-entry-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.voice-entry-touch,
.voice-entry-close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    color: white;
    background: rgb(20 30 42 / 82%);
    font: 700 18px/1 system-ui, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}

.voice-entry-copy {
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "prompt value"
        "example value";
    align-items: center;
    gap: 1px 12px;
    padding: 1px 2px 0;
}

.voice-entry-copy > strong {
    grid-area: prompt;
    font-size: 20px;
    line-height: 1.1;
}

.voice-entry-example {
    grid-area: example;
}

#voiceEntryExample {
    grid-area: example;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    opacity: .72;
}

.voice-entry-instructions {
    margin: 7px 1px 0;
    padding: 6px 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 14px;
    border: 1px solid rgb(169 221 247 / 28%);
    border-radius: 8px;
    color: rgb(255 255 255 / 78%);
    background: rgb(0 0 0 / 14%);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
}

.voice-entry-instructions strong {
    color: var(--wm-yellow, #ffc220);
    font-weight: 900;
}

.voice-entry-instructions.is-ready {
    border-color: rgb(255 194 32 / 52%);
    color: rgb(255 255 255 / 92%);
}

.voice-entry-instructions.is-attention {
    animation:
        voice-entry-instructions-attention
        620ms
        ease-in-out
        2;
}

@keyframes voice-entry-instructions-attention {
    50% {
        border-color: rgb(255 194 32 / 92%);
        background: rgb(255 194 32 / 24%);
        box-shadow:
            0 0 0 3px rgb(255 194 32 / 12%),
            0 0 16px rgb(255 194 32 / 22%);
        transform: scale(1.015);
    }
}

.voice-entry-value {
    grid-area: value;
    min-width: 86px;
    text-align: right;
    font: 700 26px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #a9ddf7;
}

@media (max-width: 520px) {
    .voice-entry-surface {
        width: calc(100vw - 16px);
    }

    .voice-entry-copy {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "prompt"
            "example"
            "value";
    }

    .voice-entry-value {
        min-width: 0;
        text-align: left;
        margin-top: 3px;
    }
}

.speech-training-widget {
    position: fixed;
    inset:
        50%
        auto
        auto
        50%;
    margin: 0;
    z-index: 2147483646;
    width: min(560px, calc(100vw - 24px));
    min-width: 0;
    height: 64px;
    padding: 4px;
    display: grid;
    grid-template-columns:
        32px
        minmax(0, 1fr)
        auto
        76px;
    gap: 6px;
    align-items: stretch;
    border: 2px solid rgb(255 255 255 / 46%);
    border-radius: 12px;
    color: var(--wm-white);
    background:
        linear-gradient(
            180deg,
            rgb(47 57 67 / 96%),
            rgb(34 43 51 / 96%)
        );
    box-shadow:
        0 9px 22px rgb(0 0 0 / 34%),
        inset 0 1px 0 rgb(255 255 255 / 12%);
    backdrop-filter: blur(8px);
    transform: translateX(-50%);
    touch-action: none;
}

.speech-training-widget[hidden] {
    display: none;
}

.speech-training-widget[popover]:popover-open {
    display: grid;
    opacity: 1;
}

.speech-training-widget[popover]::backdrop {
    display: none;
}

.speech-training-drag-handle {
    width: 32px;
    min-width: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: rgb(255 255 255 / 72%);
    background: rgb(255 255 255 / 7%);
    cursor: grab;
    font-size: 19px;
    line-height: 1;
    touch-action: none;
}

.speech-training-drag-handle:active {
    cursor: grabbing;
}

.speech-training-copy {
    min-width: 0;
    height: 56px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    overflow: hidden;
}

.speech-training-copy strong,
.speech-training-copy span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.speech-training-copy strong {
    align-self: end;
    padding-bottom: 2px;
    font-size: 15px;
}

.speech-training-copy span {
    align-self: start;
    padding-top: 2px;
    color: rgb(255 255 255 / 68%);
    font-size: 12px;
    font-weight: 600;
}

.speech-training-state {
    min-width: 54px;
    height: 56px;
    display: grid;
    grid-template-rows: 1fr 1fr;
    place-items: center;
    padding-inline: 5px;
    border-left: 1px solid rgb(255 255 255 / 18%);
    border-right: 1px solid rgb(255 255 255 / 18%);
}

.speech-training-state strong {
    align-self: end;
    padding-bottom: 2px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.speech-training-state span {
    align-self: start;
    padding-top: 2px;
    color: var(--wm-blue-light);
    font-size: 13px;
}

.speech-training-widget[data-prompt="speak"]
.speech-training-state strong {
    color: #7fe6a2;
}

.speech-training-widget[data-prompt="pause"]
.speech-training-state strong {
    color: var(--wm-yellow);
}

.speech-training-widget[data-prompt="muted"]
.speech-training-state strong {
    color: #ff8d87;
}

.speech-training-start-stop {
    width: 76px;
    min-width: 76px;
    height: 56px;
    padding: 0 8px;
    border: 1px solid rgb(255 255 255 / 64%);
    border-radius: 9px;
    color: var(--wm-blue-dark);
    background: var(--wm-yellow);
}

.speech-training-start-stop[data-active="true"] {
    color: var(--wm-white);
    background: var(--wm-red);
}

.speech-training-start-stop:disabled {
    cursor: not-allowed;
    opacity: .44;
    filter: saturate(.25);
}

@media (max-width: 520px) {
    .speech-training-widget {
        grid-template-columns:
            28px
            minmax(0, 1fr)
            50px
            66px;
        gap: 4px;
        height: 60px;
    }

    .speech-training-drag-handle {
        width: 28px;
        min-width: 28px;
    }

    .speech-training-copy,
    .speech-training-state,
    .speech-training-start-stop {
        height: 52px;
    }

    .speech-training-start-stop {
        width: 66px;
        min-width: 66px;
    }
}


/* Speech training result history ------------------------------------- */
.speech-training-widget {
    height: auto;
    min-height: 64px;
    grid-template-rows: 56px auto;
}

.speech-training-drag-handle,
.speech-training-copy,
.speech-training-state,
.speech-training-start-stop {
    grid-row: 1;
}

.speech-training-heard-line {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    overflow: hidden;
}

.speech-training-heard-line > #speechTrainingHeard {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.speech-training-result-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.speech-training-result-icon[hidden] {
    display: none;
}

.speech-training-result-icon[data-result="accepted"] {
    color: #7fe6a2;
}

.speech-training-result-icon[data-result="model-miss"],
.speech-training-result-icon[data-result="divergence"] {
    color: var(--wm-red, #e1251b);
}

.speech-training-result-icon[data-result="discarded"] {
    color: #f59e0b;
}

.speech-training-result-icon[data-result="discarded"] {
    font-size: 0;
}

.speech-training-result-icon[data-result="discarded"]::before,
.speech-training-result-remove::before {
    content: "";
    width: 15px;
    height: 15px;
    display: block;
    background: currentColor;
    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4h8l1 2h4v2h-2l-1 12H6L5 8H3V6h4l1-2Zm1.3 4 .7 9h2V8H9.3ZM14 8v9h2l.7-9H14Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;
    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4h8l1 2h4v2h-2l-1 12H6L5 8H3V6h4l1-2Zm1.3 4 .7 9h2V8H9.3ZM14 8v9h2l.7-9H14Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;
}

.speech-training-result >
.speech-training-result-icon[data-result="discarded"]::before {
    width: 18px;
    height: 18px;
}

.speech-training-results {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    margin: 2px 0 0;
    border-top: 1px solid rgb(255 255 255 / 18%);
    touch-action: auto;
}

.speech-training-results > summary {
    min-height: 30px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: rgb(255 255 255 / 78%);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    user-select: none;
}

.speech-training-results > summary::marker {
    color: var(--wm-blue-light);
}

#speechTrainingResultsCount {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    color: var(--wm-blue-dark);
    background: var(--wm-blue-light);
    text-align: center;
    font-size: 10px;
}

.speech-training-results-list {
    max-height: min(310px, 46dvh);
    overflow: auto;
    padding: 0 5px 5px;
    display: grid;
    gap: 4px;
    overscroll-behavior: contain;
}

.speech-training-result {
    min-width: 0;
    padding: 7px 7px 6px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto 28px;
    grid-template-areas:
        "icon copy state remove"
        ". review review review";
    align-items: center;
    gap: 5px 7px;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 8px;
    background: rgb(0 0 0 / 14%);
}

.speech-training-result > .speech-training-result-icon {
    grid-area: icon;
    width: 22px;
    height: 22px;
    font-size: 19px;
}

.speech-training-result-copy {
    grid-area: copy;
    min-width: 0;
    display: grid;
    gap: 1px;
}

.speech-training-result-copy strong,
.speech-training-result-copy span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.speech-training-result-copy strong {
    font-size: 12px;
}

.speech-training-result-copy span {
    color: rgb(255 255 255 / 58%);
    font-size: 10px;
    font-weight: 600;
}

.speech-training-result-state {
    grid-area: state;
    color: rgb(255 255 255 / 58%);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.speech-training-result[data-result="accepted"]
.speech-training-result-state {
    color: #7fe6a2;
}

.speech-training-result[data-result="model-miss"]
.speech-training-result-state,
.speech-training-result[data-result="divergence"]
.speech-training-result-state {
    color: #ff7b73;
}

.speech-training-result[data-result="discarded"]
.speech-training-result-state {
    color: #f7b84b;
}

.speech-training-result-remove {
    grid-area: remove;
    width: 28px;
    height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: #f59e0b;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
}

.speech-training-result-remove:hover,
.speech-training-result-remove:focus-visible {
    background: rgb(245 158 11 / 16%);
}

.speech-training-result-review {
    grid-area: review;
    min-width: 0;
    padding-top: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    border-top: 1px solid rgb(255 255 255 / 10%);
    color: rgb(255 255 255 / 64%);
    font-size: 10px;
}

.speech-training-result-review button {
    min-height: 26px;
    padding: 3px 7px;
    border: 1px solid rgb(255 255 255 / 32%);
    border-radius: 6px;
    color: var(--wm-white);
    background: rgb(255 255 255 / 7%);
    font-size: 10px;
    font-weight: 700;
}

.speech-training-result-review button[data-decision="approve"] {
    border-color: rgb(127 230 162 / 65%);
}

.speech-training-result-review button[data-decision="purge"] {
    color: #f7b84b;
    border-color: rgb(245 158 11 / 55%);
}

@media (max-width: 520px) {
    .speech-training-widget {
        height: auto;
        min-height: 60px;
        grid-template-rows: 52px auto;
    }

    .speech-training-result {
        grid-template-columns: 20px minmax(0, 1fr) 26px;
        grid-template-areas:
            "icon copy remove"
            ". state state"
            ". review review";
    }

    .speech-training-result-state {
        white-space: normal;
    }
}

#newUserButton::before {
    width:24px;height:24px;flex-basis:24px;
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='8' r='4' fill='black'/%3E%3Cpath d='M2 21c0-4 3.1-7 7-7 2 0 3.8.8 5.1 2.1M18 11v8M14 15h8' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='8' r='4' fill='black'/%3E%3Cpath d='M2 21c0-4 3.1-7 7-7 2 0 3.8.8 5.1 2.1M18 11v8M14 15h8' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.trip-log-times {font-size:14px;font-weight:400;opacity:.85;margin-top:6px;}
.trip-log-column-header {
    position:sticky;
    top:var(--trip-log-settings-height,0px);
    z-index:8;
    display:grid;
    grid-template-columns:var(--trip-log-columns,minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(65px,1fr) 24px);
    gap:6px;
    margin:0 12px;
    padding:9px 8px;
    border-block:1px solid rgb(255 255 255 / 32%);
    color:var(--wm-white);
    background:var(--ui-charcoal-gradient);
    box-shadow:0 4px 9px rgb(0 0 0 / 22%);
    font-size:13px;
    font-weight:700;
}
.trip-log-column-header span:not(:first-child) {text-align:center;}
.trip-log-column-header span:first-child {padding-left:8px;}
.trip-log-actual {color:#a9ddf7;white-space:nowrap;}
.trip-log-group {border-top:1px solid rgb(255 255 255 / 20%);}
.trip-log-group>summary {padding:12px;cursor:pointer;background:rgb(0 0 0 / 12%);}
.trip-log-group-heading {display:flex;justify-content:space-between;gap:8px;}
.trip-log-group>.trip-log-group {margin-left:0;}
.trip-log-group>.trip-log-group>summary {padding-left:26px;}
.trip-log-group>.trip-log-group>.trip-log-group>summary {padding-left:40px;}
.trip-log-trip {margin:8px 12px;border:1px solid rgb(255 255 255 / 20%);border-radius:5px;background:rgb(0 0 0 / 18%);}
.trip-log-trip>summary {position:relative;display:grid;grid-template-columns:var(--trip-log-columns,minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(65px,1fr) 24px);gap:6px;padding:12px 8px;align-items:center;font-size:15px;cursor:pointer;}
.trip-log-trip>summary>* {min-width:0;}
.trip-log-trip>summary>:nth-child(2),
.trip-log-trip>summary>:nth-child(3),
.trip-log-trip>summary>:nth-child(4) {text-align:center;}
.trip-log-trip>summary::before {content:"›";position:absolute;left:2px;top:50%;transform:translateY(-50%);}
.trip-log-trip[open]>summary::before {content:"⌄";}
.trip-log-trip>summary>strong:first-child {padding-left:8px;}
.trip-log-group.has-active-trip>summary,
.trip-log-trip.is-active-trip>summary {
    --trip-log-active-sweep-color: var(--timer-trip-color, #0053e2);
    background-image: linear-gradient(
        105deg,
        transparent 0%,
        transparent 32%,
        color-mix(in srgb, var(--trip-log-active-sweep-color) 10%, transparent) 42%,
        color-mix(in srgb, var(--trip-log-active-sweep-color) 42%, transparent) 50%,
        color-mix(in srgb, var(--trip-log-active-sweep-color) 10%, transparent) 58%,
        transparent 68%,
        transparent 100%
    );
    background-size: 300% 100%;
    animation: trip-log-active-sweep 4.2s linear infinite;
    animation-delay: var(--trip-log-active-sweep-delay, 0ms);
}
.trip-log-group.has-active-trip[data-active-state="break"]>summary,
.trip-log-trip.is-active-trip[data-active-state="break"]>summary {--trip-log-active-sweep-color:var(--timer-break-color,#001e60);}
.trip-log-group.has-active-trip[data-active-state="lunch"]>summary,
.trip-log-trip.is-active-trip[data-active-state="lunch"]>summary {--trip-log-active-sweep-color:var(--timer-lunch-color,#ffc220);}
.trip-log-group.has-active-trip[data-active-state="down"]>summary,
.trip-log-trip.is-active-trip[data-active-state="down"]>summary {--trip-log-active-sweep-color:var(--timer-down-color,#5f6772);}
.trip-log-group.has-active-trip[data-active-state="latency"]>summary,
.trip-log-trip.is-active-trip[data-active-state="latency"]>summary {--trip-log-active-sweep-color:var(--timer-latency-color,#e1251b);}
.trip-log-group.has-active-trip[data-active-state="buffer"]>summary,
.trip-log-trip.is-active-trip[data-active-state="buffer"]>summary {--trip-log-active-sweep-color:var(--timer-break-buffer-color,#6b7f99);}
.trip-log-group.has-active-trip[data-active-state="trip"]>summary,
.trip-log-trip.is-active-trip[data-active-state="trip"]>summary {--trip-log-active-sweep-color:var(--timer-trip-color,#0053e2);}
.trip-log-group.has-active-trip[data-active-state="early-start"]>summary,
.trip-log-trip.is-active-trip[data-active-state="early-start"]>summary {--trip-log-active-sweep-color:var(--timer-early-start-color,#4dbdf5);}
.trip-log-group.has-active-trip[data-active-state="tolerance"]>summary,
.trip-log-trip.is-active-trip[data-active-state="tolerance"]>summary {--trip-log-active-sweep-color:var(--timer-tolerance-color,#2e7d32);}
@keyframes trip-log-active-sweep {
    from { background-position: 100% 0; }
    to { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .trip-log-group.has-active-trip>summary,
    .trip-log-trip.is-active-trip>summary,
    .trip-log-entry.is-active-entry {
        animation: none;
        background-position: 50% 0;
    }
}
.trip-log-menu {position:relative;visibility:hidden;}
.trip-log-trip[open]>summary .trip-log-menu {visibility:visible;}
.trip-log-menu button {border:0;border-radius:5px;background:transparent;color:white;padding:4px 8px;font-size:20px;}
.trip-log-menu-actions {position:absolute;right:0;top:100%;z-index:10;min-width:190px;padding:6px;background:#242f3b;border:1px solid #899aaa;border-radius:7px;box-shadow:0 6px 18px #0008;}
.trip-log-menu-actions button {display:block;width:100%;font-size:15px;text-align:left;padding:12px;}
.trip-log-menu-actions[hidden] {display:none;}
.trip-log-entries {border-top:1px solid #ffffff30;padding:12px;background:rgb(255 255 255 / 4%);}
.trip-log-entry-heading {display:flex;justify-content:space-between;align-items:center;}
.trip-log-entries p {font-size:13px;font-weight:400;}
.trip-log-entry {display:grid;grid-template-columns:65px minmax(0,1fr);gap:8px;width:100%;padding:8px 0;text-align:left;font-size:15px;font-weight:400;color:white;-webkit-touch-callout:none;user-select:none;}
.trip-log-timeline {--trip-log-timeline-accent:var(--wm-blue-light,#a9ddf7);margin:0 0 0 7px;padding-left:16px;border-left:2px solid transparent;}
.trip-log-timeline>.trip-log-entry {position:relative;box-sizing:border-box;min-width:0;}
.trip-log-timeline>.trip-log-entry::before {content:'';position:absolute;left:-24px;top:12px;box-sizing:content-box;width:10px;height:10px;border:2px solid var(--trip-log-timeline-accent);border-radius:50%;background:var(--wm-gray,#5f6772);pointer-events:none;}
.trip-log-timeline>.trip-log-entry::before {z-index:1;}
.trip-log-timeline>.trip-log-entry:not(:last-child)::after {content:'';position:absolute;left:-18px;top:19px;width:2px;height:100%;background:var(--trip-log-timeline-accent);pointer-events:none;}
.trip-log-timeline>.trip-log-entry>span:last-child {min-width:0;overflow-wrap:anywhere;}
button.trip-log-entry {padding:10px;margin-top:5px;border:1px solid #92a0ae;border-radius:5px;background:transparent;}
button.trip-log-entry:hover,button.trip-log-entry:focus-visible {border-color:#a9ddf7;background:#a9ddf720;}
.trip-log-entry-time,.trip-log-entry-name {
    min-width:0;
    padding:8px;
    border:1px solid transparent;
    border-radius:5px;
    color:inherit;
    background:transparent;
    font:inherit;
    font-weight:inherit;
    text-align:left;
}
.trip-log-entry-time:hover,.trip-log-entry-time:focus-visible,
.trip-log-entry-name:hover,.trip-log-entry-name:focus-visible {border-color:var(--wm-blue-light);background:rgb(169 221 247 / 10%);}
.trip-log-entry>select {min-width:0;padding:8px;border:1px solid var(--wm-blue-light);border-radius:5px;color:var(--wm-white);background:#39434e;font:inherit;}
.trip-log-entry.has-entry-cancel {grid-template-columns:65px minmax(0,1fr) auto;}
.trip-log-entry-cancel {align-self:stretch;border:1px solid var(--wm-blue-light);border-radius:5px;padding:6px 10px;color:var(--wm-blue-light);background:transparent;font:inherit;}
.trip-log-entry.has-approved-time {grid-template-columns:65px minmax(0,1fr) minmax(110px,auto);}
.trip-log-entry.has-entry-remove {grid-template-columns:65px minmax(0,1fr) auto;}
.trip-log-entry.has-approved-time.has-entry-remove {grid-template-columns:65px minmax(0,1fr) minmax(110px,auto) auto;}
.trip-log-entry.has-approved-time.has-down-detail-edit {grid-template-columns:65px minmax(0,1fr) minmax(110px,auto) 42px;}
.trip-log-entry-approved {justify-self:end;border:1px solid var(--wm-blue-light);border-radius:5px;padding:7px;color:var(--wm-blue-light);background:transparent;font:inherit;white-space:nowrap;text-align:right;}
.trip-log-entry-approved-value {justify-self:end;text-align:right;white-space:nowrap;color:var(--wm-blue-light);}
.trip-log-down-detail-edit,.trip-log-down-detail-button {border:1px solid var(--wm-blue-light);border-radius:7px;background:#243241;color:var(--wm-blue-light);font:inherit;}
.trip-log-down-detail-edit {min-height:38px;}
.trip-log-down-details {display:flex;gap:8px;overflow-x:auto;padding:10px 0 2px;}
.trip-log-down-detail-button {position:relative;flex:0 0 48px;width:48px;height:42px;color:transparent;}
.trip-log-down-detail-button::before {content:"";position:absolute;inset:8px;background:var(--wm-blue-light);mask:center/contain no-repeat;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 8h4l2-2h4l2 2h4v11H4zM12 11a3 3 0 1 0 0 6 3 3 0 0 0 0-6M17 3l4 4M19 3l2 2' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");}
.trip-log-down-detail-button[data-content="image"]::before,.trip-log-down-detail-button[data-content="both"]::before {mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='15' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m5 17 5-5 3 3 2-2 4 4M8 9h.01' stroke='black' stroke-width='2'/%3E%3C/svg%3E");}
.trip-log-down-detail-button[data-content="notes"]::before {mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h14v18H5zM8 8h8M8 12h8M8 16h6' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");}
.trip-log-down-detail-button[data-content="both"]::after {content:"";position:absolute;right:3px;bottom:3px;width:17px;height:17px;border-radius:3px;background:var(--wm-blue-light);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4h12v16H6zM9 9h6M9 13h6' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;}
.trip-log-entry.is-down-highlighted {outline:3px solid var(--timer-down-color,#5f6772);box-shadow:0 0 16px var(--timer-down-color,#5f6772);transition:outline-color 180ms,box-shadow 180ms;}
.down-details-dialog {width:min(840px,92vw);max-width:840px;max-height:90dvh;padding:0;overflow:hidden;border:3px solid var(--wm-blue-light);border-radius:20px;background:radial-gradient(circle at 50% 18%,#073588 0%,#001e60 58%,#001747 100%);color:white;box-shadow:0 20px 50px rgb(0 0 0 / 45%);}
.down-details-dialog form {display:grid;gap:0;max-height:90dvh;grid-template-rows:auto minmax(0,1fr) auto;}
.down-details-dialog .dialog-header {min-height:82px;padding:0 18px 0 68px;grid-template-columns:minmax(0,1fr) 58px;border-bottom:3px solid var(--wm-blue);background:var(--ui-charcoal-gradient,#2f3943);}
.down-details-dialog .dialog-header h2 {font-size:clamp(28px,5vw,42px);}
.down-details-dialog .dialog-close {width:58px;height:58px;justify-self:end;}
.down-details-dialog .dialog-close::before {width:40px;height:40px;}
.down-details-body {display:grid;grid-template-columns:1fr;gap:16px;min-height:0;padding:28px 28px 18px;overflow:auto;}
.down-details-photo {position:relative;height:clamp(250px,38dvh,390px);display:grid;place-items:center;overflow:hidden;border:3px dashed var(--wm-blue-light);border-radius:15px;background:radial-gradient(circle at center,#073581 0%,#001e60 72%);}
.down-details-photo img {width:100%;height:100%;object-fit:contain;}
.down-details-photo p {color:rgb(255 255 255 / 72%);}
.down-details-photo-clear {position:absolute;z-index:3;top:10px;right:10px;width:46px;height:46px;display:grid;place-items:center;padding:0;border:2px solid var(--wm-white);border-radius:8px;background:var(--wm-maroon);color:var(--wm-white);box-shadow:0 2px 8px rgb(0 0 0 / 42%);}
.down-details-photo-clear svg {width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.down-details-photo-clear:focus-visible {outline:3px solid var(--wm-blue-light);outline-offset:2px;}
.down-details-camera {width:100%;height:100%;display:grid;grid-template-columns:1fr;grid-auto-flow:row;place-content:center;justify-items:center;gap:24px;border:0;color:white;background:transparent;cursor:pointer;}
.down-details-camera svg {width:110px;height:90px;fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;}
.down-details-camera strong {padding:12px 38px;border:3px solid var(--wm-blue-light);border-radius:12px;background:var(--wm-blue);font-size:clamp(20px,4vw,30px);box-shadow:inset 0 1px 5px rgb(255 255 255 / 14%);}
.down-details-camera input {position:absolute;width:1px;height:1px;opacity:0;}
.down-camera-stage {position:relative;width:100%;height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) 58px;background:#000;}
.down-camera-stage video {width:100%;height:100%;min-height:0;object-fit:contain;}
.down-camera-shutter {position:relative;z-index:2;width:100%;height:58px;margin:0;padding:8px 20px;border:0;border-top:3px solid var(--wm-blue-light);border-radius:0;color:var(--wm-white);background:var(--wm-blue);font:inherit;font-size:20px;font-weight:700;}
.down-details-body>label {display:grid;grid-template-columns:1fr;gap:10px;font-size:clamp(18px,3vw,25px);}
.down-details-body textarea {width:100%;min-height:170px;box-sizing:border-box;resize:vertical;padding:16px;border:3px solid var(--wm-blue-light);border-radius:13px;background:rgb(0 20 65 / 72%);color:white;font:inherit;font-size:clamp(17px,2.7vw,24px);}
.down-details-body textarea:read-only {resize:none;}
.down-details-delete {justify-self:end;padding:8px 14px;border:1px solid #ff6b72;border-radius:7px;background:transparent;color:#ff8d92;font:inherit;}
.down-details-helper {margin:0;color:rgb(255 255 255 / 78%);font-size:clamp(13px,2vw,18px);font-weight:600;}
.down-details-dialog .dialog-actions {gap:14px;padding:0 28px 28px;}
.down-details-dialog .dialog-actions button {min-height:64px;border:3px solid var(--wm-blue-light);border-radius:13px;color:white;background:#001e60;font-size:clamp(22px,4vw,32px);font-weight:700;}
.down-details-dialog .dialog-actions .primary-action {color:white;background:var(--wm-blue);}
.trip-log-entry-remove {align-self:stretch;min-width:42px;border:1px solid #ff6b72;border-radius:5px;color:#ff6b72;background:transparent;font:inherit;font-size:25px;line-height:1;}
.trip-log-new-entry-pair {display:grid;gap:4px;padding:8px;border:2px solid var(--wm-blue-light,#a9ddf7);border-radius:9px;background:color-mix(in srgb,var(--wm-blue-light,#a9ddf7) 12%,transparent);margin:8px 0;}
.trip-log-entry.is-new-entry {border-left:3px solid var(--wm-blue-light,#a9ddf7);background:color-mix(in srgb,var(--wm-blue-light,#a9ddf7) 12%,transparent);padding-left:8px;}
.trip-log-entry-time[aria-invalid="true"] {color:#ffd5da!important;background:#6f1727!important;border:2px solid #ff8d9b!important;border-radius:5px;}
.trip-log-entry.is-official-start {border-left:3px solid var(--wm-blue-light);padding-left:8px;background:color-mix(in srgb,var(--wm-blue-light) 10%,transparent);}
.official-start-prompt {max-width:min(94vw,480px);}
.trip-log-entry.is-active-entry {
    --trip-log-active-sweep-color: var(--timer-trip-color, #0053e2);
    background-image:linear-gradient(105deg,transparent 0%,transparent 32%,color-mix(in srgb,var(--trip-log-active-sweep-color) 10%,transparent) 42%,color-mix(in srgb,var(--trip-log-active-sweep-color) 42%,transparent) 50%,color-mix(in srgb,var(--trip-log-active-sweep-color) 10%,transparent) 58%,transparent 68%,transparent 100%);
    background-size:300% 100%;
    animation:trip-log-active-sweep 4.2s linear infinite;
    animation-delay:var(--trip-log-active-sweep-delay,0ms);
}
.trip-log-entry.is-active-entry[data-active-state="break"] {--trip-log-active-sweep-color:var(--timer-break-color,#001e60);}
.trip-log-entry.is-active-entry[data-active-state="lunch"] {--trip-log-active-sweep-color:var(--timer-lunch-color,#ffc220);}
.trip-log-entry.is-active-entry[data-active-state="buffer"] {--trip-log-active-sweep-color:var(--timer-break-buffer-color,#6b7f99);}
.trip-log-entry.is-active-entry[data-active-state="down"] {--trip-log-active-sweep-color:var(--timer-down-color,#5f6772);}
.trip-log-entry.is-active-entry[data-active-state="tolerance"] {--trip-log-active-sweep-color:var(--timer-tolerance-color,#2e7d32);}
.trip-log-entry.is-active-entry[data-active-state="latency"] {--trip-log-active-sweep-color:var(--timer-latency-color,#e1251b);}
.trip-log-entry.is-active-entry[data-active-state="early-start"] {--trip-log-active-sweep-color:var(--timer-early-start-color,#4dbdf5);}
.trip-log-add,.trip-log-entry-heading button {border:1px solid #a9ddf7;border-radius:6px;color:#a9ddf7;padding:8px 14px;background:transparent;}
.trip-log-add {width:100%;margin-top:12px;}
.trip-log-editor {position:fixed;width:min(94vw,560px);max-height:94dvh;overflow:auto;padding:18px;border-radius:12px;z-index:var(--shared-modal-order,4000);}
.trip-log-editor form {min-width:0;}
.trip-log-edit-field {display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:12px;border:1px solid #a9ddf7;border-radius:8px;color:var(--wm-blue-dark);background:var(--wm-yellow);}
.trip-log-edit-field strong {font-size:18px;}
.trip-log-editor .dialog-actions button {padding:12px;}
.trip-log-editor label {display:flex;align-items:center;gap:10px;}
.trip-log-editor input[type="checkbox"] {width:20px;height:20px;}
.trip-log-error,.danger {color:#ff8d8d!important;}
.calculation-uncertain-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    vertical-align: middle;
    fill: none;
    stroke: var(--wm-blue-light);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.trip-log-editor .danger {background:transparent;border:1px solid #ff8d8d;border-radius:7px;padding:10px;}
.dedicated-trip-editor {--editor-bg:#303b45;--editor-card:#46515c;--editor-border:rgb(255 255 255 / 38%);--editor-accent:var(--wm-blue-light,#a9ddf7);display:flex;flex-direction:column;gap:12px;width:min(94vw,560px);height:min(780px,92dvh);max-height:92dvh;box-sizing:border-box;overflow:hidden;background:var(--ui-gray-gradient,var(--editor-bg));color:var(--wm-white,#f5f7fa);border:3px solid var(--editor-border);padding:18px;box-shadow:var(--ui-inner-highlight),var(--ui-shadow);}
.dedicated-trip-editor:not([open]) {display:none;}
.dedicated-trip-editor .dialog-header {flex:none;display:flex;align-items:center;justify-content:space-between;padding:12px 18px;margin:-18px -18px 0;background:var(--ui-charcoal-gradient,var(--editor-bg));border:0;border-bottom:1px solid var(--editor-border);}
.dedicated-trip-editor .dialog-header h2 {margin:0;font-size:27px;}
.dedicated-trip-editor .dialog-close {width:40px;height:40px;background:var(--editor-card);color:inherit;border:1px solid var(--editor-border);border-radius:9px;font-size:0;}
.trip-editor-subtitle {margin:0;font-size:14px;color:var(--editor-accent);}
.trip-editor-summary {display:grid;grid-template-columns:1fr 1fr;gap:8px;background:var(--editor-card);border:1px solid var(--editor-border);border-radius:12px;padding:12px;flex:none;}
.trip-editor-summary>div {display:flex;align-items:flex-start;flex-direction:column;gap:5px;min-width:0;}
.trip-editor-summary>div+div {border-left:1px solid var(--editor-border);padding-left:10px;}
.trip-editor-summary strong,.trip-editor-percent {font-size:clamp(20px,5.8vw,29px);font-weight:700;white-space:nowrap;}
.trip-editor-summary small {font-size:12px;}
.trip-editor-percent {padding:0;background:none;border:0;color:inherit;text-decoration:underline;text-underline-offset:5px;}
.trip-editor-body {overflow:auto;min-height:0;flex:1;padding:0 12px 8px 2px;scrollbar-gutter:stable;overscroll-behavior:contain;}
.trip-editor-toolbar {display:flex;justify-content:flex-end;align-items:center;gap:10px;margin:4px 0 12px;font-size:13px;}
.trip-editor-toolbar>span {white-space:nowrap;}
.trip-editor-toolbar .trip-log-add {width:auto;flex:none;}
.trip-editor-timeline {display:flex;flex-direction:column;gap:12px;border-left:2px solid transparent;margin:0 0 0 7px;padding:0 0 0 16px;}
.trip-editor-card {position:relative;display:flex;flex-direction:column;gap:10px;border:1px solid var(--editor-border);border-radius:11px;padding:12px;background:var(--editor-card);}
.trip-editor-card:before {box-sizing:content-box;content:'';position:absolute;left:-24px;top:18px;width:10px;height:10px;border-radius:50%;background:var(--editor-bg);border:2px solid var(--editor-accent);}
.trip-editor-card:before {z-index:1;}
.trip-editor-card:not(:last-child)::after {content:'';position:absolute;left:-18px;top:25px;width:2px;height:calc(100% + 14px);background:var(--editor-border);pointer-events:none;}
.trip-editor-card.is-new-entry {border:2px solid var(--editor-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--editor-accent) 15%,transparent);}
.trip-editor-boundary {flex-direction:row;justify-content:space-between;align-items:center;background:transparent;border-color:transparent;padding:8px 0;gap:5px;font-size:14px;}
.trip-editor-card-header {display:flex;align-items:center;gap:8px;}
.trip-editor-card-header select {min-width:0;flex:1;font-size:17px;font-weight:bold;}
.dedicated-trip-editor select {background:var(--editor-card);border:1px solid var(--editor-border);color:inherit;border-radius:6px;padding:6px;}
.trip-editor-times {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.trip-editor-times label {display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;}
.trip-editor-times small {font-size:12px;opacity:.8;}
.dedicated-trip-editor .trip-log-entry-time {font:inherit;font-size:15px;font-weight:700;padding:3px 0;border:0;background:transparent;color:inherit;text-decoration:underline;text-underline-offset:4px;white-space:nowrap;}
.trip-editor-camera {flex:none;width:38px;height:36px;padding:5px;border:1px solid var(--editor-accent);border-radius:7px;background:var(--editor-bg);color:var(--editor-accent);}
.trip-editor-camera svg {display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.trip-editor-camera:disabled {opacity:.45;}
.trip-editor-approval {align-self:flex-start;background:var(--editor-bg);border:1px solid var(--editor-border);border-radius:6px;color:var(--editor-accent);padding:6px 9px;font-size:13px;}
.trip-editor-down-accounting {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--editor-border);border-radius:7px;overflow:hidden;min-width:0;}
.trip-editor-down-accounting[data-approval-state="pending"] {grid-template-columns:repeat(2,minmax(0,1fr));}
.trip-editor-accounting-cell {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-width:0;padding:5px 4px;}
.trip-editor-accounting-cell+.trip-editor-accounting-cell {border-left:1px solid var(--editor-border);}
.trip-editor-down-accounting .trip-editor-approval {align-self:stretch;border:0;border-left:1px solid var(--editor-border);border-radius:0;background:var(--editor-bg);font:inherit;cursor:pointer;}
.trip-editor-accounting-cell>small {font-size:clamp(8px,2.2vw,10px);}
.trip-editor-accounting-cell>strong {font-size:clamp(9px,2.5vw,12px);font-variant-numeric:tabular-nums;white-space:nowrap;}
.trip-editor-accounting-cell .trip-editor-accounting-fraction {font-size:.72em;}
.trip-editor-time-fraction {font-size:.65em;font-variant-numeric:tabular-nums;}
.trip-editor-accounting-cell.is-deficit>strong {color:#ffb1ba;}
.trip-editor-down-summary {margin-top:16px;padding:10px;border:1px solid var(--editor-border);border-radius:8px;background:var(--editor-card);}
.trip-editor-down-summary h3 {font-size:14px;margin:0 0 9px;}
.trip-editor-down-summary .trip-editor-down-accounting {grid-template-columns:repeat(var(--down-columns),minmax(0,1fr));}
.trip-editor-note {font-size:12px;line-height:1.5;opacity:.85;margin:0;}
.trip-editor-invalid {color:#ffb1ba;}
.dedicated-trip-editor .trip-log-edit-field {display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;margin-bottom:10px;background:var(--editor-card);color:inherit;border-color:var(--editor-border);gap:10px;}
.dedicated-trip-editor .trip-log-edit-field strong {font-size:16px;text-align:right;}
.trip-editor-controls {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;flex:none;}
.dedicated-trip-editor .trip-editor-controls .trip-editor-standard {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;margin:0;padding:10px;min-width:0;}
.trip-editor-standard>span {font-size:12px;}
.trip-editor-standard>strong {font-size:clamp(17px,4.7vw,23px);white-space:nowrap;}
.trip-editor-production {display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--editor-border);border-radius:8px;padding:10px;margin:0;background:var(--editor-card);font-size:clamp(14px,4vw,18px);}
.trip-editor-production input {width:22px;height:22px;flex:none;accent-color:var(--editor-accent);}
.trip-editor-controls+.trip-editor-body {margin-top:10px;}
.trip-editor-body>.danger {margin-top:14px;}
.trip-editor-scheduled {border-style:dashed;}
.trip-editor-footer {flex:none;border-top:1px solid var(--editor-border);padding-top:10px;}
.trip-editor-footer>small {display:block;font-size:11px;margin-bottom:10px;text-align:center;opacity:.85;}
.trip-editor-footer .dialog-actions {margin:0;display:grid;grid-template-columns:1fr 1.5fr;gap:10px;}
.trip-editor-footer button {color:inherit;background:var(--ui-charcoal-gradient,var(--editor-card));border:1px solid var(--editor-border);border-radius:9px;font-size:16px;font-weight:bold;padding:12px;box-shadow:var(--ui-inner-highlight);}
.trip-editor-footer .primary-action {background:var(--editor-accent);color:#112431;}
.dedicated-trip-editor .danger {font-size:12px;padding:6px 8px;color:#ffb1ba;}
.dedicated-trip-editor .trip-log-error {margin:0;font-size:13px;flex:none;}
.dedicated-trip-editor .trip-log-error:empty {display:none;}
.trip-editor-choice {background:#192e3f;color:#f5f7fa;border:1px solid #7895a5;border-radius:12px;max-width:90vw;padding:20px;}
shared-modal-host > .dedicated-trip-editor {top:8px;bottom:auto;margin:0 auto;height:min(780px,calc(var(--shared-modal-safe-height,100dvh) - 16px));max-height:calc(var(--shared-modal-safe-height,100dvh) - 16px);}
shared-modal-host > .down-details-dialog {top:8px;bottom:auto;margin:0 auto;max-height:calc(var(--shared-modal-safe-height,100dvh) - 16px);}
shared-modal-host > .down-details-dialog form {max-height:calc(var(--shared-modal-safe-height,100dvh) - 22px);grid-template-rows:auto minmax(0,1fr) auto;}
shared-modal-host > .down-details-dialog .down-details-body {min-height:0;overflow:auto;}
@media (max-width:380px) {.trip-log-body {--trip-log-columns:45px minmax(42px,1fr) minmax(42px,1fr) minmax(50px,1fr) 22px;}.trip-log-trip>summary,.trip-log-column-header {font-size:12px;gap:2px;}.trip-log-controls label {font-size:13px;}.trip-log-date-controls {font-size:12px;gap:10px 12px;}.trip-log-date-controls input {padding:5px;font-size:12px;}}

.trip-settings-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:center;}
.trip-settings-options label {min-width:0;justify-content:center;}
.trip-settings-options #tripStartInDownOption {grid-column:1 / -1;}
shared-modal-host > .trip-settings-dialog {
    bottom:calc(100dvh - var(--shared-modal-safe-height,100dvh));
    max-height:calc(var(--shared-modal-safe-height,100dvh) - 16px);
}
shared-modal-host > .trip-settings-dialog .dialog-actions {
    position:sticky;bottom:0;z-index:2;background:var(--wm-blue-dark);padding-top:8px;
}
.trip-now-actions {width:100%;max-width:100%;min-width:0;}
.trip-settings-dialog form > .trip-now-actions {width:auto;max-width:none;justify-self:stretch;}
.trip-now-action {box-sizing:border-box;max-width:100%;min-width:0;overflow:hidden;}
.trip-now-actions:not(.is-selecting) .trip-now-cancel {border-inline-width:0;}
.trip-log-body {padding-bottom:0;}

.trip-log-settings-button::before {display:none;}
.trip-log-settings-button {font-weight:400;}
.trip-log-settings-button svg {display:block;flex:none;}
.trip-log-settings-button[aria-expanded="true"] {background:rgb(255 255 255 / 12%);}
.trip-log-settings {position:sticky;top:0;z-index:9;display:grid;grid-template-rows:0fr;opacity:0;transform:translateY(-8px);overflow:hidden;background:var(--ui-gray-gradient,var(--wm-gray));transition:grid-template-rows 200ms ease-in,opacity 200ms ease-in,transform 200ms ease-in;}
.trip-log-settings.is-open {grid-template-rows:1fr;opacity:1;transform:translateY(0);transition-duration:250ms;transition-timing-function:ease-out;}
.trip-log-settings-content {min-height:0;overflow:hidden;}
.trip-log-settings-divider {margin:0 14px 14px;border:0;border-top:1px solid rgb(255 255 255 / 35%);}
.trip-log-controls .trip-log-include-current input {justify-self:start;width:22px;height:22px;margin:0;padding:0;accent-color:var(--wm-blue);}
@media (prefers-reduced-motion:reduce) {.trip-log-settings,.trip-log-settings.is-open {transition-duration:0ms;}}

.trip-log-body.trip-log-empty:not([hidden]) {display:flex;flex-direction:column;}
.trip-log-empty .trip-log-settings {flex:0 0 auto;width:100%;}
.trip-log-empty-message {flex:1;display:grid;place-items:center;min-height:80px;margin:0;padding:24px;text-align:center;font-size:clamp(22px,4vw,28px);font-weight:500;}



.clock-font-setting {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: center;
}

.clock-font-label {
    font-weight: 700;
}

.clock-font-picker {
    position: relative;
    min-width: 0;
}

.clock-font-trigger {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--wm-white);
    border-radius: 8px;
    color: var(--wm-white);
    background: rgb(0 30 96 / 78%);
    text-align: left;
}

.clock-font-chevron {
    font-size: 22px;
    line-height: 1;
}

.clock-font-menu {
    position: absolute;
    z-index: 30;
    inset: calc(100% + 6px) 0 auto;
    padding: 6px;
    display: grid;
    gap: 4px;
    border: 1px solid rgb(255 255 255 / 72%);
    border-radius: 10px;
    background: rgb(0 30 96 / 98%);
    box-shadow: 0 12px 28px rgb(0 0 0 / 32%);
}

.clock-font-menu[hidden],
.clock-font-editor[hidden] {
    display: none !important;
}

.clock-font-add {
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    color: var(--wm-blue-light);
    background: rgb(255 255 255 / 7%);
    text-align: left;
}

.clock-font-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px 38px;
    gap: 6px;
    align-items: center;
}

.clock-font-editor input {
    min-height: 38px;
    padding-block: 7px;
}

.clock-font-confirm,
.clock-font-cancel,
.clock-font-remove {
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--wm-white);
    background: transparent;
    font-size: 22px;
    line-height: 1;
}

.clock-font-confirm {
    color: #b7f7c2;
}

.clock-font-cancel,
.clock-font-remove {
    color: #ffb8b4;
}

.clock-font-options {
    display: grid;
    gap: 2px;
}

.clock-font-option {
    min-height: 40px;
    padding: 4px 2px 4px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 38px;
    gap: 8px;
    align-items: center;
    border-radius: 7px;
}

.clock-font-option[data-active-font="true"] {
    background: rgb(169 221 247 / 12%);
}

.clock-font-option-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clock-font-option-state {
    color: rgb(255 255 255 / 62%);
    font-size: 12px;
    font-weight: 600;
}

.clock-hand-controls {
    display: grid;
    gap: 6px;
}

.clock-hand-row {
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px 68px;
    gap: 10px;
    align-items: center;
}

.clock-hand-row > span {
    min-width: 0;
}

.app-dialog .clock-hand-row > input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    justify-self: center;
    display: grid;
    place-content: center;
    border: 2px solid var(--wm-blue-light);
    border-radius: 6px;
    color: var(--wm-blue-dark);
    background: transparent;
    cursor: pointer;
}

.app-dialog .clock-hand-row > input[type="checkbox"]::before {
    content: "";
    width: 11px;
    height: 6px;
    border-left: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(-45deg) scale(0);
    transform-origin: center;
}

.app-dialog .clock-hand-row > input[type="checkbox"]:checked {
    border-color: var(--wm-blue-light);
    background: var(--wm-blue-light);
}

.app-dialog .clock-hand-row > input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) scale(1);
}

.app-dialog .clock-hand-row > input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--wm-blue-light);
    outline-offset: 2px;
}

.app-dialog .clock-hand-row > input[type="color"] {
    width: 68px;
    min-width: 68px;
    min-height: 38px;
    padding: 3px;
    justify-self: end;
}


/* graphical-settings-scroll-overlay-v3
 * Issue #10: fixed-height modal, animated compact details, and a bottom
 * click-through preview that only becomes translucent over rendered settings.
 */
.graphical-dialog {
    box-sizing: border-box;
    min-height: 90dvh;
    height: 90dvh;
    max-height: 90dvh;
    overflow: hidden;
}

#graphicalSettingsForm {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    block-size: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0;
}

.graphical-dialog .dialog-header,
.graphical-dialog .graphical-settings-actions {
    position: relative;
    top: auto;
    flex: none;
}

.graphical-dialog .dialog-header {
    z-index: 4;
}

.graphical-dialog .graphical-settings-actions {
    z-index: 4;
}

.graphical-dialog .graphical-settings-grid {
    --graphical-settings-inline-gap: 16px;
    position: relative;
    min-height: 0;
    margin: 0 !important;
    padding: 0;
    overflow: hidden;
    display: block;
    isolation: isolate;
}

.graphical-dialog .graphical-settings-grid > .settings-groups {
    position: absolute;
    inset: 0;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    padding: 12px var(--graphical-settings-inline-gap) 16px;
    display: grid;
    align-content: start;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.graphical-dialog .settings-category {
    transform-origin: top;
}

.graphical-dialog .settings-category > summary {
    min-height: 38px;
    padding: 7px 36px 7px 12px;
    font-size: 17px;
    line-height: 1.15;
}

.graphical-dialog .settings-category > summary::after {
    right: 12px;
    font-size: 23px;
}

.graphical-dialog .settings-category.is-closing > summary::after {
    transform: translateY(-50%) rotate(0deg);
}

.graphical-dialog .settings-category-content {
    padding: 8px 10px 10px;
    gap: 8px;
    transform-origin: top;
}

.graphical-dialog .graphical-settings-grid > .settings-groups::after {
    content: "";
    display: block;
    inline-size: 100%;
    aspect-ratio: 1 / 1;
    pointer-events: none;
}

.graphical-dialog .clock-preview {
    position: absolute;
    inset:
        auto
        var(--graphical-settings-inline-gap)
        16px;
    z-index: 2;
    inline-size: auto;
    block-size: auto;
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 0;
    display: grid;
    place-items: stretch;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none !important;
    user-select: none;
}

.graphical-dialog .clock-preview clock-timer {
    inline-size: 100%;
    block-size: 100%;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    --clock-timer-face-background-color: transparent;
    --clock-timer-active-ring-background-color: transparent;
    --clock-timer-border-color: rgb(169 221 247 / 72%);
    pointer-events: none !important;
    opacity: 1;
    transition: opacity 150ms ease-out;
    will-change: opacity;
}

.graphical-dialog .clock-preview.has-settings-overlap clock-timer {
    opacity: 0.68;
}

@media (max-width: 720px) {
    .graphical-dialog {
        min-height: 92dvh;
        height: 92dvh;
        max-height: 92dvh;
    }

    .graphical-dialog .graphical-settings-grid {
        --graphical-settings-inline-gap: 12px;
    }

    .graphical-dialog .graphical-settings-grid > .settings-groups {
        padding: 10px var(--graphical-settings-inline-gap) 12px;
        gap: 5px;
    }

    .graphical-dialog .settings-category > summary {
        min-height: 36px;
        padding-block: 6px;
        font-size: 16px;
    }

    .graphical-dialog .settings-category-content {
        padding: 7px 9px 9px;
        gap: 7px;
    }

    .graphical-dialog .clock-preview {
        inset:
            auto
            var(--graphical-settings-inline-gap)
            12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .graphical-dialog .clock-preview clock-timer {
        transition-duration: 0ms;
    }
}


speech-menu,
speech-command {
    display: none !important;
}


/* audio-settings-v1 */
.audio-settings-dialog {
    width: min(860px, calc(100vw - 32px));
    max-height: min(88dvh, 820px);
    margin: auto;
    overflow: auto;
}

.audio-settings-dialog form {
    display: grid;
    gap: 18px;
}

.audio-settings-scroll-panel {
    display: grid;
    gap: 18px;
    min-height: 0;
}

.audio-announcements-launcher {
    display: none;
}

.audio-announcements-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: min(88dvh, 820px);
    margin: auto;
    overflow: hidden;
}

.audio-announcements-dialog form {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.audio-announcements-window-back {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--wm-blue-light);
    background: transparent;
    font-size: 34px;
    line-height: 1;
}

.audio-announcements-dialog .dialog-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
}

.audio-announcements-dialog .dialog-header h2 {
    margin: 0;
    text-align: center;
}

.audio-announcements-header-spacer {
    width: 44px;
    height: 1px;
}

.audio-settings-levels {
    display: grid;
    gap: 12px;
    margin-inline: 16px;
}

.audio-settings-levels > label {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(180px, 1.6fr) 64px;
    align-items: center;
    gap: 12px;
}

.audio-settings-levels output {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.audio-instrument-setting select {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    color: inherit;
    font: inherit;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 7px;
    background: var(--wm-blue-dark);
}

.audio-setting-spacer {
    display: block;
}

.audio-master-velocity {
    padding-block: 10px;
    border-block: 1px solid rgb(255 255 255 / 20%);
}

.audio-settings-announcements {
    margin-inline: 16px;
}

.audio-settings-announcements h3 {
    margin: 0 0 10px;
}

.audio-settings-table-wrap {
    overflow-x: auto;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 8px;
}

.audio-settings-table {
    width: 100%;
    min-width: 590px;
    border-collapse: collapse;
}

.audio-settings-table th,
.audio-settings-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.audio-settings-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--wm-blue-dark);
}

.audio-settings-table th:first-child {
    text-align: left;
}

.audio-settings-table th:not(:first-child),
.audio-settings-table td {
    text-align: center;
}

.audio-settings-table label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.audio-settings-table input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
}

.audio-settings-table input[type="checkbox"]:disabled {
    opacity: 0.42;
}

.audio-announcement-page {
    display: none;
}

.audio-announcements-dialog .audio-announcement-page {
    display: block;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.audio-announcement-desktop-detail {
    min-width: 0;
    padding: 4px 6px;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.audio-announcement-desktop-detail:hover,
.audio-announcement-desktop-detail:focus-visible {
    text-decoration: underline;
}

.audio-announcement-event-list {
    display: grid;
    gap: 6px;
}

.audio-announcement-event-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.audio-announcement-event-row-master {
    grid-template-columns: minmax(0, 1fr);
}

.audio-announcement-event-enabled {
    width: 28px;
    height: 28px;
    margin: 0 0 0 4px;
}

.audio-announcement-event-choice {
    width: 100%;
    min-height: 52px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 10px;
    color: inherit;
    background: rgb(0 30 96 / 62%);
    text-align: left;
}

.audio-announcement-event-row:first-child
.audio-announcement-event-choice {
    border-color: rgb(169 221 247 / 72%);
    background: rgb(0 63 128 / 58%);
}

.audio-announcement-event-arrow {
    font-size: 28px;
    line-height: 1;
    opacity: .72;
}

.audio-announcement-detail-heading {
    min-height: 48px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.audio-announcement-detail-heading strong {
    grid-column: 2;
    text-align: center;
    font-size: 18px;
}

.audio-announcement-back {
    grid-column: 1;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--wm-blue-light);
    background: transparent;
    font-size: 34px;
    line-height: 1;
}

.audio-announcement-mobile-columns,
.audio-announcement-mobile-attribute-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.audio-announcement-mobile-columns {
    border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.audio-announcement-mobile-columns label,
.audio-announcement-mobile-attribute-row > label {
    min-width: 0;
    padding: 10px 4px;
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.audio-announcement-mobile-columns label + label,
.audio-announcement-mobile-attribute-row > label + label {
    border-left: 1px solid rgb(255 255 255 / 12%);
}

.audio-announcement-mobile-columns input,
.audio-announcement-mobile-attribute-row input {
    width: 28px;
    height: 28px;
    margin: 0;
}

.audio-announcement-mobile-attribute-row {
    position: relative;
}

.audio-announcement-mobile-overrides {
    display: grid;
    gap: 10px;
    padding: 12px 10px 18px;
    border-top: 1px solid rgb(255 255 255 / 16%);
}

.audio-announcement-mobile-overrides > label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
}

.audio-announcement-mobile-overrides > label > span {
    grid-column: 1 / -1;
}

.audio-announcement-mobile-overrides input[type="range"] {
    width: 100%;
    min-width: 0;
}

.audio-announcement-preview-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 4px;
}

.audio-announcement-preview-actions button {
    min-height: 42px;
}

.settings-submenu {
    display: grid;
    gap: 2px;
    padding-left: 14px;
}

@media (max-width: 620px) {
    .audio-settings-announcements-desktop {
        display: none;
    }

    .audio-announcements-launcher {
        width: calc(100% - 20px);
        min-height: 52px;
        margin: 0 10px 4px;
        padding: 10px 14px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border: 1px solid rgb(169 221 247 / 42%);
        border-radius: 10px;
        color: inherit;
        background: rgb(0 63 128 / 54%);
        text-align: left;
        font: inherit;
        font-weight: 700;
    }

    .audio-announcements-launcher > :last-child {
        font-size: 28px;
        line-height: 1;
        opacity: .72;
    }

    .audio-settings-dialog .audio-announcement-page {
        display: none;
    }

    .audio-announcements-dialog .audio-announcement-page {
        display: block;
    }

    .audio-announcement-list-view {
        padding-bottom: 4px;
    }

    .audio-announcement-detail-view {
        border: 1px solid rgb(255 255 255 / 24%);
        border-radius: 10px;
        background: rgb(0 30 96 / 46%);
    }

    .audio-settings-dialog,
    .audio-announcements-dialog {
        position: fixed;
        top: var(--audio-settings-safe-top, 0px);
        right: 0;
        bottom: auto;
        left: 0;
        box-sizing: border-box;
        width: 100vw;
        max-width: none;
        height: var(--audio-settings-safe-height, 100dvh);
        max-height: var(--audio-settings-safe-height, 100dvh);
        margin: 0;
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
        border-radius: 0;
        overflow: hidden;
    }

    .audio-announcements-dialog {
        box-sizing: border-box;
        width: 100vw;
        max-width: none;
        height: var(--audio-settings-safe-height, 100dvh);
        max-height: var(--audio-settings-safe-height, 100dvh);
        margin: 0;
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
        border-radius: 0;
        overflow: hidden;
    }

    .audio-announcements-dialog .audio-announcement-page {
        display: block;
        min-height: 0;
        height: 100%;
        overflow: hidden;
    }

    .audio-announcements-dialog .audio-announcement-page > [data-pane-view] {
        height: 100%;
        min-height: 0;
    }

    .audio-settings-dialog form {
        height: 100%;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 10px;
        overflow: hidden;
    }

    .audio-settings-scroll-panel {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-gutter: stable;
        padding-bottom: 6px;
    }

    .audio-settings-dialog .dialog-header {
        position: sticky;
        top: 0;
        z-index: 3;
    }

    .audio-settings-levels {
        margin-inline: 10px;
        gap: 9px;
    }

    .audio-settings-levels > label {
        grid-template-columns: minmax(0, 1fr) 58px;
        gap: 7px 10px;
    }

    .audio-settings-levels > label > span {
        grid-column: 1 / -1;
    }

    .audio-settings-levels input[type="range"] {
        width: 100%;
        min-width: 0;
    }

    .audio-instrument-setting select {
        grid-column: 1 / -1;
    }

    .audio-instrument-setting .audio-setting-spacer {
        display: none;
    }

    .audio-settings-announcements {
        min-height: 0;
        margin-inline: 10px;
        display: grid;
        grid-template-rows: auto auto;
    }

    .audio-settings-table-wrap {
        min-height: 0;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .audio-settings-table {
        min-width: 0;
        width: 100%;
        display: block;
    }

    .audio-settings-table thead,
    .audio-settings-table tbody {
        display: block;
    }

    .audio-settings-table thead tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
    }

    .audio-settings-table thead th:first-child {
        display: none;
    }

    .audio-settings-table tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
        border-bottom: 1px solid rgb(255 255 255 / 14%);
    }

    .audio-settings-table tbody th {
        grid-column: 1 / -1;
        padding-bottom: 4px;
        border-bottom: 0;
    }

    .audio-settings-table th,
    .audio-settings-table td {
        min-width: 0;
        padding: 8px 5px;
    }

    .audio-settings-table tbody th:first-child {
        overflow-wrap: anywhere;
    }

    .audio-settings-table tbody td {
        display: grid;
        grid-template-rows: auto 1fr;
        place-items: center;
        gap: 4px;
        border-bottom: 0;
    }

    .audio-settings-table tbody td::before {
        content: attr(data-audio-layer-label);
        font-size: 11px;
        line-height: 1;
        opacity: .72;
    }

    .audio-settings-table thead th {
        position: static;
        font-size: 12px;
    }

    .audio-settings-table thead label {
        display: grid;
        justify-items: center;
        gap: 3px;
        font-size: 11px;
    }

    .audio-settings-table input[type="checkbox"] {
        width: 26px;
        height: 26px;
    }

    .audio-settings-dialog .dialog-actions {
        position: sticky;
        bottom: 0;
        z-index: 3;
        margin: 0;
        padding-top: 8px;
        background: var(--wm-blue-dark);
    }
}


/* settings-menu-icons-v1 */
#settingsMenuButton::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.8' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.2'/%3E%3Cpath d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.8' fill='black'/%3E%3C/svg%3E");
}

#audioSettingsButton::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9h4l5-4v14l-5-4H4Z' fill='black'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8M18.5 5.5a9 9 0 0 1 0 13' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9h4l5-4v14l-5-4H4Z' fill='black'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8M18.5 5.5a9 9 0 0 1 0 13' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}


/* explicit settings menu icons */
#settingsMenuButton::before,
#audioSettingsButton::before {
    display: none;
}

.main-menu .menu-inline-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-grid;
    place-items: center;
    color: currentColor;
}

.main-menu .menu-inline-icon svg {
    display: block;
    width: 30px;
    height: 30px;
}




.number-pad-shell {
    position: relative;
}

.number-pad-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 4;
    color: var(--wm-white);
    background: #172331;
    border: 2px solid #d8e3ef;
    border-radius: 8px;
}


.number-pad-clear-reset {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--wm-blue-dark);
    border: 1px solid rgb(255 255 255 / 20%);
}

.number-pad-split-action {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--wm-white);
    background: transparent;
    touch-action: manipulation;
}

.number-pad-clear {
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.number-pad-reset {
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.number-pad-split-action::before {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.number-pad-clear::before {
    top: 18%;
    left: 18%;
}

.number-pad-reset::before {
    right: 18%;
    bottom: 18%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 7.1A7.5 7.5 0 1 1 4.8 15' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M6.5 3.5v4.2H2.3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 7.1A7.5 7.5 0 1 1 4.8 15' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M6.5 3.5v4.2H2.3' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3C/svg%3E");
}

.number-pad-clear-reset::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to bottom right,
            transparent calc(50% - .5px),
            rgb(255 255 255 / 24%) calc(50% - .5px),
            rgb(255 255 255 / 24%) calc(50% + .5px),
            transparent calc(50% + .5px)
        );
}


/* adaptive-speech-timing-v1 */
.speech-timing-dialog {
    width: min(620px, calc(100vw - 28px));
    max-height: min(88dvh, 760px);
    margin: auto;
    overflow: auto;
}

.speech-timing-dialog form {
    display: grid;
    gap: 14px;
}

.speech-timing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 16px;
}

.speech-timing-primary {
    min-width: 0;
    padding: 14px;
    display: grid;
    gap: 5px;
    border: 1px solid rgb(169 221 247 / 42%);
    border-radius: 10px;
    background: rgb(0 83 226 / 18%);
    text-align: center;
}

.speech-timing-primary span,
.speech-timing-stream > span,
.speech-timing-recent > span {
    font-size: 13px;
    font-weight: 700;
    opacity: .82;
}

.speech-timing-primary strong {
    font-size: 30px;
    font-variant-numeric: tabular-nums;
}

.speech-timing-grid dl {
    grid-column: 1 / -1;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 9px;
    background: rgb(255 255 255 / 10%);
}

.speech-timing-grid dl > div {
    min-width: 0;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    background: var(--wm-blue-dark);
}

.speech-timing-grid dt {
    min-width: 0;
    opacity: .76;
}

.speech-timing-grid dd {
    margin: 0;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.speech-timing-stream,
.speech-timing-recent {
    grid-column: 1 / -1;
    padding: 10px 12px;
    display: grid;
    gap: 6px;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 9px;
}

#speechTimingStream {
    overflow-wrap: anywhere;
    font-weight: 750;
}

#speechTimingRecent {
    margin: 0;
    padding-left: 22px;
    max-height: 150px;
    overflow: auto;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
    .speech-timing-grid {
        grid-template-columns: 1fr;
    }

    .speech-timing-primary {
        grid-column: 1;
    }

    .speech-timing-grid dl {
        grid-template-columns: 1fr;
    }
}


.user-lookup-dialog {
    width: min(94vw, 900px);
    max-height: 92dvh;
}

.user-lookup-dialog form {
    max-height: 92dvh;
    overflow: auto;
}

.user-lookup-search,
.user-lookup-selected,
.user-lookup-results-section {
    display: grid;
    gap: 10px;
}

.user-lookup-search h3,
.user-lookup-selected h3,
.user-lookup-results-section h3 {
    margin: 0;
}

.user-lookup-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.user-lookup-fields label {
    display: grid;
    gap: 5px;
}

.user-lookup-fields label:last-child {
    grid-column: 1 / -1;
}

.user-lookup-fields input {
    min-width: 0;
    width: 100%;
}

.user-lookup-search-actions,
.user-lookup-selected-actions,
.user-lookup-result-actions,
.user-lookup-results-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-lookup-search-actions,
.user-lookup-selected-actions {
    justify-content: flex-end;
}

.user-lookup-results-header {
    justify-content: space-between;
}

.user-lookup-status {
    min-height: 1.2em;
    margin: 0;
}

.identity-object-card {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgb(169 221 247 / 62%);
    border-radius: 9px;
    background: color-mix(in srgb, var(--wm-blue-dark) 84%, var(--wm-blue) 16%);
}

.identity-object-card strong,
.identity-object-card span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.identity-object-card span {
    font-size: .84em;
    opacity: .82;
}

.user-lookup-results {
    display: grid;
    gap: 8px;
    max-height: min(42dvh, 440px);
    overflow: auto;
}

.user-lookup-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgb(169 221 247 / 54%);
    border-radius: 9px;
}

.user-lookup-result[aria-selected="true"] {
    border-color: var(--wm-yellow);
    box-shadow: 0 0 0 1px var(--wm-yellow);
}

.user-lookup-result-actions {
    justify-content: flex-end;
}

.user-lookup-result-actions button {
    min-height: 38px;
}

#userLookupLoadMore {
    justify-self: center;
}

.live-stream-dialog {
    width: min(92vw, 760px);
}

.live-stream-layout {
    display: grid;
    gap: 14px;
    padding: 12px;
}

.live-stream-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid currentColor;
    border-radius: 10px;
}

.live-stream-section h3,
.live-stream-section p {
    margin: 0;
}

.live-stream-identity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.live-stream-view-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.live-stream-status {
    min-height: 1.2em;
}

.live-stream-volume-controls {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 10px;
    border-radius: 8px;
}

.live-stream-trainer-message {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border-radius: 8px;
}

.live-stream-trainer-message-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-stream-trainer-message-row input {
    min-width: 0;
    flex: 1 1 auto;
}

.live-stream-volume-controls > label:not(.live-stream-mute) {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr);
    align-items: center;
    gap: 10px;
}

.live-stream-volume-controls output {
    display: inline-block;
    min-width: 4ch;
    text-align: right;
}

.live-stream-mute {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-stream-readout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.live-stream-readout > div {
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid currentColor;
    border-radius: 8px;
    min-width: 0;
}

.live-stream-readout span {
    font-size: .78em;
    opacity: .75;
}

.live-stream-readout strong {
    overflow-wrap: anywhere;
}

.live-stream-transcript {
    grid-column: 1 / -1;
}

@media (max-width: 560px) {
    .user-lookup-fields,
    .user-lookup-result,
    .live-stream-identity-row {
        grid-template-columns: 1fr;
    }

    .user-lookup-fields label:last-child {
        grid-column: auto;
    }

    .user-lookup-result-actions,
    .user-lookup-search-actions,
    .user-lookup-selected-actions {
        justify-content: stretch;
    }

    .user-lookup-result-actions button,
    .user-lookup-search-actions button,
    .user-lookup-selected-actions button,
    .live-stream-identity-row > button {
        flex: 1 1 auto;
    }

    .live-stream-volume-controls > label:not(.live-stream-mute) {
        grid-template-columns: 1fr;
    }

    .live-stream-trainer-message-row {
        align-items: stretch;
        flex-direction: column;
    }

    .live-stream-readout {
        grid-template-columns: 1fr;
    }

    .live-stream-transcript {
        grid-column: auto;
    }
}

/* Phone layouts share available height between controls and the clock. */
@media (orientation: portrait) and (max-width: 520px) and (max-height: 720px) {
    .app {
        --speech-bar-height: 44px;
        --speech-options-header-height: 34px;
        --speech-command-row-height: 0px;
        --trip-log-row-height: 48px;
        --home-clock-preferred-size: 56vw;
        grid-template-rows: var(--app-header-height,52px) var(--timer-summary-row-height) 54px 0 minmax(0, 1fr)
            calc(var(--trip-log-row-height) + var(--speech-command-row-height))
            var(--speech-mic-row-height);
    }
    .app[data-speech-active="true"] {
        --speech-command-row-height: 34px;
        --speech-mic-row-height: 44px;
    }
    .app[data-trip-state="running"] {
        grid-template-rows: var(--app-header-height,52px) var(--timer-summary-row-height) 94px 0 minmax(0, 1fr)
            calc(var(--trip-log-row-height) + var(--speech-command-row-height))
            var(--speech-mic-row-height);
    }
    .app[data-interval-state="down"] {
        grid-template-rows: var(--app-header-height,52px) var(--timer-summary-row-height) 156px 0 minmax(0, 1fr)
            calc(var(--trip-log-row-height) + var(--speech-command-row-height))
            var(--speech-mic-row-height);
    }
    .app-header .hamburger-button { font-size: 18px; }
    .scope-toggle { font-size: 19px; }
    .scope-connection-button { width: 42px; font-size: 20px; }
    .trip-summary { grid-template-rows: 55px 45px; }
    .summary-label { font-size: 12px; }
    .summary-cell strong { font-size: 25px; }
    .percent-summary { font-size: 33px; --summary-text-gap: 8px; }
    .trip-action-button { font-size: 25px; border-width: 2px; border-radius: 10px; }
    .new-trip-button, .idle-break-button { font-size: 27px; border-width: 2px; border-radius: 15px; }
    .down-trip-controls { gap: 2px; padding: 2px; grid-template-rows: 60px 46px 42px; }
    .down-elapsed-panel { padding: 3px; border-width: 2px; }
    .down-elapsed-panel > span { font-size: 14px; }
    .down-elapsed-value { font-size: 32px; }
    .down-trip-controls .trip-action-button { font-size: 23px; border-width: 2px; }
    .down-details-button svg { width: 28px; height: 28px; }
    .trip-log-button:not(.trip-log-floating) { height: 48px; font-size: 26px; border-width: 2px; }
    speech-mic-bar { height: 44px; }
}

/* Browsers cannot force rotation for an ordinary tab. Keep phone use in portrait. */
.portrait-orientation-notice { display: none; }
@media (orientation: landscape) and (pointer: coarse) and (max-height: 600px) and (max-width: 1100px) {
    .app { visibility: hidden; }
    .portrait-orientation-notice {
        position: fixed;
        inset: 0;
        z-index: 2147483647;
        display: grid;
        place-items: center;
        padding: 24px;
        color: #fff;
        background: #001e60;
        font: 700 24px/1.3 Helvetica, Arial, sans-serif;
        text-align: center;
    }
}

.login-dialog .dialog-header { grid-template-columns: 1fr; }

/* Trip Log owns one native top-layer surface; its fixed children retain geometry. */
.trip-log-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    pointer-events: none;
}
.trip-log-dialog > * { pointer-events: auto; }
.trip-log-dialog::backdrop { background: transparent; }
#tripLogPlaceholder { grid-row: 6; width: 100%; pointer-events: none; }

.persistence-status {
    position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
    z-index: 10000; padding: .6rem 1rem; border-radius: .5rem;
    background: #252525; color: #fff; font-size: .9rem;
}
.persistence-status[hidden] {display: none;}
html[data-persistence-state="reverted"] .persistence-status {background: #752323;}

.main-menu .app-version{padding:12px 14px;color:var(--wm-blue-light);font-size:14px;}
.main-menu .app-version output{margin-left:8px;font-family:monospace;letter-spacing:.08em;}

/* Completed summaries remain interactive until an explicit response. */
dialog.trip-transition-overlay {
    width: 100vw; height: 100dvh; max-width: none; max-height: none;
    margin: 0; border: 0; background: transparent;
}
dialog.trip-transition-overlay:not([open]) { display: none; }
.trip-transition-overlay-panel { pointer-events: auto; }
dialog.trip-transition-overlay::backdrop { background: rgb(0 0 0 / 35%); }

.login-digit-sequence { display:flex; gap:12px; justify-content:center; margin:16px 0; }
.login-dialog .login-digit-sequence input { width:64px; height:76px; padding:8px; text-align:center; font-size:34px; font-weight:600; font-variant-numeric:tabular-nums; border-radius:10px; }
.login-recognition-status { font-size:14px; opacity:.8; }

.login-dialog #voiceLoginPrompt { text-align:center; }
.login-dialog #loginIdRow, .login-dialog #loginPinRow { display:flex; flex-direction:column; align-items:center; gap:0; padding:0; }
.login-dialog .login-digit-sequence { justify-content:center; }
.login-dialog #loginIdLabel, .login-dialog #loginPinLabel { display:block; text-align:center; }
.login-dialog .login-recognition-status { text-align:center; }

.login-dialog .login-legacy-switch { justify-self:center; padding:4px 6px; border:0; background:transparent; color:var(--wm-blue-light); font:inherit; font-size:12px; font-weight:400; text-decoration:underline; cursor:pointer; }
.login-dialog #loginLegacyFields { display:grid; gap:16px; }
.login-dialog #loginLegacyFields label { display:grid; gap:8px; }

/* Center login surfaces in the visible viewport above the mic and its option panes. */
.login-dialog {
    position:fixed;
    inset:var(--login-safe-top,0px) 0 auto;
    margin:auto;
    top:calc(var(--login-safe-top,0px) + var(--login-safe-height,100dvh) / 2);
    transform:translateY(-50%);
    box-sizing:border-box;
    width:min(440px,calc(100vw - 24px));
    max-height:max(0px,calc(var(--login-safe-height,100dvh) - 16px));
    overflow:auto;
    overscroll-behavior:contain;
}
/* Order Filler login aligns with the app's full-width Log and Mic controls. */
#loginDialog,
#legacyLoginDialog {
    width: calc(100vw - 2 * var(--app-document-padding, 8px));
    max-width: none;
    transition-property: opacity, top, max-height, width;
    transition-duration: var(--app-dialog-transition-duration, 250ms),
        var(--trip-log-layout-duration, 1000ms),
        var(--trip-log-layout-duration, 1000ms),
        var(--trip-log-layout-duration, 1000ms);
    transition-timing-function: linear, ease-in-out, ease-in-out, ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
    #loginDialog, #legacyLoginDialog { transition-duration: 0ms; }
}
.login-dialog .login-digit-sequence {gap:clamp(4px,2vw,12px);max-width:100%;}
.login-dialog .login-digit-sequence input {min-width:0;width:clamp(42px,14vw,64px);}
.login-dialog .login-legacy-switch {margin-bottom:16px;}

/* Account surfaces share the safe viewport above the microphone. */
#liveStreamDialog, #userLookupDialog {
    position:fixed; inset:var(--login-safe-top,0px) 0 auto; margin:auto;
    top:calc(var(--login-safe-top,0px) + var(--login-safe-height,100dvh) / 2);
    transform:translateY(-50%); box-sizing:border-box;
    width:min(720px,calc(100vw - 24px));
    max-height:max(0px,calc(var(--login-safe-height,100dvh) - 16px));
    overflow:auto; overscroll-behavior:contain;
}
#profileEditorFields {border:0; padding:0; min-width:0;}
#profileEditorFields input {min-width:0; max-width:100%;}
.profile-edit-icon svg {width:28px;height:28px;overflow:visible;}

.main-menu #bluetoothAudioTestLink {box-sizing:border-box;text-decoration:none;}
.main-menu #bluetoothAudioTestLink:hover,
.main-menu #bluetoothAudioTestLink:focus-visible {background:rgb(255 255 255 / 10%);}

.startup-audio-dialog { text-align: center; max-width: min(420px, calc(100vw - 32px)); }
.startup-audio-dialog form { padding-top: 16px; }

.live-stream-view-controls { display: grid; gap: 8px; min-width: 0; }
.app-dialog .live-stream-view-controls label { display: grid; grid-template-columns: 1fr; gap: 4px; min-width: 0; }
.live-stream-view-controls select, .live-stream-view-controls input { width: 100%; min-width: 0; box-sizing: border-box; }
.live-stream-view-controls p { margin: 0; overflow-wrap: anywhere; }
.live-stream-custom-range { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.live-stream-custom-range[hidden] { display: none; }
@media (max-width: 400px) { .live-stream-custom-range { grid-template-columns: 1fr; } }

.live-stream-mirror { display: grid; justify-items: center; gap: 6px; }
.live-stream-mirror h3 { margin: 0; text-align: center; overflow-wrap: anywhere; }
.live-stream-mirror > clock-timer { width: min(240px, 60vw); height: min(240px, 60vw); flex: none; }
.live-stream-view-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
.live-stream-view-controls > p, .live-stream-custom-range { grid-column: 1 / -1; }
@media (max-width: 400px) { .live-stream-view-controls { grid-template-columns: 1fr; } }

.live-stream-user-switcher { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: end; gap: 6px; width: 100%; }
.app-dialog .live-stream-user-switcher label { display: grid; grid-template-columns: 1fr; gap: 4px; min-width: 0; }
.live-stream-user-switcher select { width: 100%; min-width: 0; }
@media (max-width:400px) { .live-stream-user-switcher { grid-template-columns: repeat(2,minmax(0,1fr)); } .live-stream-user-switcher label { grid-column: 1 / -1; grid-row: 1; } }

.live-stream-interval { display: grid; justify-items: center; padding: 8px 16px; border: 1px solid currentColor; border-radius: 8px; }
.live-stream-interval strong { font-size: 1.5em; font-variant-numeric: tabular-nums; }
.live-stream-interval[hidden] { display: none; }

.live-stream-user-heading { font-size: 1.1em; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.live-stream-dialog .dialog-header { display: grid; grid-template-columns: minmax(0,1fr) 40px; gap: 3px 8px; width: 100%; min-width: 0; box-sizing: border-box; }
.live-stream-dialog .dialog-header h2 { grid-column: 1; grid-row: 1; margin: 0; }
.live-stream-dialog .live-stream-user-heading { grid-column: 1; grid-row: 2; }
.live-stream-dialog .dialog-close { grid-column: 2; grid-row: 1 / 3; }
@media (max-width: 560px) {
    .live-stream-readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .live-stream-transcript { grid-column: 1 / -1; }
    .live-stream-layout { padding: 8px; gap: 10px; }
    .live-stream-section { padding: 8px; }
}


/* Trainer uses the same expandable category and indented submenu as Admin. */
.trainer-menu-group[hidden], .trainer-submenu[hidden] { display: none; }
.main-menu #trainerMenuButton::after { content: "\203a"; margin-left: auto; font-size: 28px; line-height: 1; transition: transform 180ms ease-in-out; }
.main-menu #trainerMenuButton[aria-expanded="true"]::after { transform: rotate(90deg); }
.main-menu .trainer-submenu { margin: 0 16px 4px 56px; border-left: 1px solid rgb(255 255 255 / 75%); }
.main-menu .trainer-submenu > button { padding: 12px 14px; font-size: 16px; color: var(--wm-blue-light); }
.main-menu .hamburger-menu-popover [data-menu-icon]::before { margin-inline-end: 0; flex: 0 0 30px; width: 30px; height: 30px; }
.main-menu .hamburger-menu-popover a:hover, .main-menu .hamburger-menu-popover a:focus-visible,
.main-menu .hamburger-menu-popover summary:hover, .main-menu .hamburger-menu-popover summary:focus-visible { background: rgb(255 255 255 / 10%); }
.main-menu .hamburger-menu-popover summary { list-style: none; }
.main-menu .hamburger-menu-popover summary::-webkit-details-marker { display: none; }
.main-menu .hamburger-menu-popover summary::after { content: "\203a"; margin-left: auto; font-size: 28px; line-height: 1; }
.main-menu .hamburger-menu-popover details[open] > summary::after { transform: rotate(90deg); }
.main-menu .hamburger-menu-popover a[data-menu-icon] { display: flex; }

/* Standard Mirror glyph: lower-left; existing status badges remain lower-right. */
.sync-mirror-badge {position:absolute;left:-2px;bottom:-2px;z-index:3;width:13px;height:13px;border-radius:3px;background:#001e60;color:#a9ddf7;pointer-events:none;}
.sync-mirror-badge[hidden] {display:none;}
.main-menu .hamburger-menu-popover .sync-mirror-badge[data-menu-icon]::before {position:absolute;inset:0;width:13px;height:13px;margin:0;filter:drop-shadow(0 0 1px #000);}
.profile-permissions { grid-column: 1 / -1; border: 1px solid currentColor; border-radius: 8px; padding: 8px 12px; }
.profile-permissions summary { cursor: pointer; font-weight: bold; }
.profile-permission-options { display: grid; gap: 8px; padding-top: 12px; }
.profile-permission-options label { display: flex; align-items: center; gap: 8px; }
.profile-permission-options input[type="checkbox"] { width: auto; min-width: 18px; margin: 0; }
.profile-permission-options label:has(input:disabled) { opacity: .5; }

/* Fullscreen editors reserve the persistent microphone region. */
shared-modal-host > .number-pad-dialog {height:var(--shared-modal-safe-height, 100dvh);}

/* Trip summary: three measurements, last/active rows share one column grid. */
.trip-summary-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;font-size:clamp(15px,4.5vw,26px);line-height:1.35}
.trip-summary-table th,.trip-summary-table td{padding:12px 2px;border-bottom:1px solid rgb(255 255 255 / 18%);text-align:right;white-space:nowrap}
.trip-summary-table th:first-child{text-align:left;white-space:normal}
.trip-summary-table thead th{color:var(--wm-blue-light);font-size:.9em}
.trip-summary-table [data-trip-summary-row="active"]{background:rgb(37 116 183 / 20%)}
#tripTransitionSummaryActions:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);width:100%}
#tripTransitionSummaryOk{width:100%;min-height:56px;font-size:clamp(20px,5vw,28px)}
.trip-transition-overlay-panel:has(.trip-summary-table){padding:clamp(12px,3vw,24px)}
#tripTransitionSummaryCancel[hidden]{display:none}

/* Downtime remains subordinate to the existing performance columns. */
.trip-log-downtime {display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 14px;margin-top:7px;font-size:13px;font-weight:400;line-height:1.5;text-align:left;}
.trip-log-downtime-title {color:inherit;font-size:inherit;opacity:.82;}
.trip-log-downtime span strong {font-weight:500;font-variant-numeric:tabular-nums;}
.trip-log-downtime-approved {color:#a9ddf7;}
.trip-log-trip>summary>.trip-log-downtime {grid-column:1 / -1;padding-left:8px;margin-top:0;}
.trip-log-downtime-overview {justify-content:center;border-top:1px solid rgb(255 255 255 / 25%);padding-top:10px;margin-top:12px;gap:8px 22px;}
.trip-log-downtime-overview>span {display:grid;gap:2px;}
.trip-log-downtime-overview>span strong {font-size:20px;font-weight:700;}

.trip-log-downtime {background:transparent;border-radius:6px;padding:6px 9px;}
.trip-log-downtime-title {display:inline-flex;align-items:center;gap:6px;}
.trip-log-downtime>span {display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
.trip-log-downtime-icon {width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.trip-log-down-section {margin:0 12px 14px;border:1px solid #91a3b2;border-radius:10px;overflow:hidden;background:#27333e;color:#fff;flex-shrink:0;}
.trip-log-down-breakdown>summary {display:flex;align-items:center;gap:10px;padding:12px;cursor:pointer;list-style:none;}
.trip-log-down-breakdown>summary::-webkit-details-marker {display:none;}
.trip-log-down-breakdown>summary::before {content:'▸';font-size:16px;}
.trip-log-down-breakdown[open]>summary::before {content:'▾';}
.trip-log-down-breakdown>summary>strong {font-size:17px;white-space:nowrap;}
.trip-log-down-effective {display:grid;justify-items:start;gap:3px;margin-left:auto;text-align:left;font-size:11px;}
.trip-log-down-effective strong {font-size:20px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.trip-log-down-content {border-top:1px solid #718392;background:rgb(255 255 255 / 4%);}
.trip-log-down-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:16px 4px;}
.trip-log-down-grid>div {display:grid;gap:7px;text-align:left;padding:0 8px;border-right:1px solid #647786;font-size:11px;}
.trip-log-down-grid>div:last-child {border-right:0;}
.trip-log-down-grid strong {font-size:clamp(17px,4.5vw,25px);font-variant-numeric:tabular-nums;white-space:nowrap;}
.trip-log-down-pending {color:#ffdc83;}.trip-log-down-approved {color:#b5e4d3;}.trip-log-down-unapproved {color:#e9b5bb;}
.trip-log-down-logged {display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border-top:1px solid #718392;font-size:12px;color:#d0d9e1;}
.trip-log-down-filter {display:flex;align-items:center;gap:9px;border-top:1px solid #718392;padding:11px 12px;font-size:13px;cursor:pointer;}
.trip-log-down-filter input {margin:0;width:20px;height:20px;accent-color:var(--wm-blue);}
.trip-log-trip>summary>.trip-log-downtime {padding:6px 9px;}
/* One guide per group, aligned with its disclosure arrow. Ancestors stay visible. */
.trip-log-group {border-top:0;}
.trip-log-group>summary {position:relative;list-style:none;padding-left:28px;}
.trip-log-group>summary::-webkit-details-marker {display:none;}
.trip-log-group>summary::before {content:'▸';position:absolute;left:8px;top:12px;width:14px;text-align:center;}
.trip-log-group[open]>summary::before {content:'▾';}
.trip-log-group-children {margin-left:14px;padding-left:2px;border-left:2px solid #a9ddf7;}

.trip-log-group-heading {flex-wrap:wrap;}
.trip-log-trip>summary::before {top:22px;}

.trip-log-group>summary::before {height:16px;line-height:16px;}
.trip-log-group[open]>summary::after {content:'';position:absolute;left:14px;top:28px;bottom:0;border-left:2px solid #a9ddf7;pointer-events:none;}

.trip-log-group-children {display:flow-root;}

/* Idle actions share one stacked region. Active controls occupy both tracks. */
.trip-action-controls { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; }
.trip-action-controls > .new-trip-button { grid-row: 1; }
.idle-break-button { grid-row: 2; min-height: 0; }
.trip-action-controls > .active-trip-controls { grid-row: 1 / -1; }
.app[data-trip-state="ready"] { grid-template-rows: var(--app-header-height,52px) var(--timer-summary-row-height) 126px 0px minmax(0, 1fr) calc(var(--trip-log-row-height) + var(--speech-command-row-height)) var(--speech-mic-row-height); }
.break-end-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); gap: 0; min-width: 0; min-height: 0; overflow: hidden; transition: grid-template-columns 400ms ease-out, gap 400ms ease-out; }
.break-end-row > button { min-width: 0; overflow: hidden; }
.break-end-row .break-down-button { visibility: hidden; opacity: 0; pointer-events: none; white-space: nowrap; }
.break-end-row[data-down-available="true"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.break-end-row[data-down-available="true"] .break-down-button { visibility: visible; opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .break-end-row { transition: none; } }
/* Match the preview: one centered line before the split, two compact lines after. */
.break-end-row[data-timed-pause="true"] .end-trip-button { display: flex; align-items: center; justify-content: center; gap: .3em; padding: 4px 10px; font-size: clamp(24px, 7vw, 32px); line-height: 1.08; }
.break-action-label, .break-action-clock { white-space: nowrap; }
.break-end-row:not([data-down-available="true"]) .break-action-clock::before { content: ": "; }
.break-end-row[data-down-available="true"] .end-trip-button { flex-direction: column; gap: 1px; font-size: clamp(18px, 5.6vw, 26px); padding: 3px 5px; }
.break-end-row .break-down-button { font-size: clamp(18px, 5.6vw, 26px); padding: 3px 5px; }

/* Standalone breaks are log entries, never performance rows. Keep the selected
   sweep color; light/dark edges make its motion visible for any break palette. */
.trip-log-trip.is-break-only {border:2px solid #b7d7ed;background:#dce7f2;color:#001e60;}
.trip-log-trip.is-break-only .trip-log-entry,
.trip-log-trip.is-break-only .trip-log-menu>button,
.trip-log-trip.is-break-only .trip-log-entry-heading button,
.trip-log-trip.is-break-only .trip-log-add {color:#001e60;}
.trip-log-trip.is-break-only>summary {grid-template-columns:minmax(0,1fr) auto minmax(65px,1fr) 24px;}
.trip-log-break-only-badge {padding:3px 7px;border:1px solid #001e60;border-radius:5px;background:#fff;color:#001e60;font-size:12px;font-weight:700;white-space:nowrap;}
.trip-log-break-only-duration {font-variant-numeric:tabular-nums;white-space:nowrap;}
.trip-log-trip.is-break-only.is-active-trip>summary,
.trip-log-trip.is-break-only .trip-log-entry.is-active-entry {background-image:linear-gradient(105deg,transparent 0%,transparent 32%,color-mix(in srgb,var(--trip-log-active-sweep-color) 15%,transparent) 42%,rgb(255 255 255 / 80%) 47%,var(--trip-log-active-sweep-color) 49%,var(--trip-log-active-sweep-color) 52%,rgb(0 0 0 / 65%) 54%,transparent 68%,transparent 100%);}
.trip-log-trip.is-break-only .trip-log-menu-actions {color:#fff;}

/* Sync keeps the existing arrow and badge artwork; Override is a separate switch. */

/* Brackets and tint identify the automatically selected target. */
#scopeToggle[data-percent-mode="auto"] { color: #a9ddf7; }

/* Shared lower-goal marker for Order Filler and Drop-In. */
.goal-sync-button {position:relative;}
.sync-override-badge {position:absolute;right:0;bottom:0;width:14px;height:14px;z-index:6;pointer-events:none;filter:drop-shadow(0 0 1px #001e60) drop-shadow(0 0 1px #001e60);}
.sync-override-badge::before {content:"";position:absolute;inset:3px 1px 1px;background:var(--wm-blue-light,#a9ddf7);clip-path:polygon(0 0,100% 0,50% 100%);}
.sync-override-badge[hidden] {display:none;}
/* Preserve network status when a cached lower Sync goal is also being used. */
.goal-sync-button.sync-override-in-use .sync-offline-cloud {bottom:auto;top:-2px;}

/* Percentage presentation is shared by Order Filler and Drop-In. */
.percentage-display-setting {margin:4px 8px 12px;padding:12px 14px;border-block:1px solid #456b9b;}
.percentage-display-setting + .percentage-display-setting {border-top:0;margin-top:0;}
.percentage-display-label {display:block;margin-bottom:12px;font-size:16px;font-weight:600;}
.percentage-display-options {display:grid;grid-template-columns:1fr 1fr;gap:7px;}
.percentage-display-options > button {display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;margin:0!important;padding:12px 8px!important;min-height:76px;width:100%;border:1px solid #87a7ce!important;border-radius:10px;background:#001e60;font-size:16px;}
.percentage-display-options > button::before {display:none!important;}
.percentage-display-options > button[role=radio][aria-checked=true] {background:#28558f;border:2px solid #d4ebff!important;}
.percentage-display-options small {font-size:12px;color:#c1def5;font-weight:400;}
.percentage-bar-miniature {display:flex;justify-content:space-between;align-items:center;width:78px;height:5px;background:#ffc220;margin:6px 0;}
.percentage-bar-miniature i {display:block;width:10px;height:10px;border-radius:50%;border:2px solid white;background:#001e60;}
.percentage-bar-miniature i:last-child {background:white;}
.app[data-percentage-display=bar] {--timer-summary-row-height:190px;}
.app[data-percentage-display=bar] .trip-summary {grid-template-rows:78px 112px;}
.trip-summary {transition:grid-template-rows 300ms ease;}
.goal-bar-svg {position:absolute;pointer-events:none;opacity:0;visibility:hidden;width:100%;height:112px;overflow:hidden;transition:opacity 250ms ease,visibility 0s 250ms;}
.percent-summary.is-goal-bar > .goal-bar-svg {position:relative;grid-column:1;grid-row:1;display:block;min-width:0;pointer-events:auto;opacity:1;visibility:visible;transition-delay:0s;}
.percent-summary.is-goal-bar > :is(#currentPercentValue,span,#goalPercentValue) {position:absolute;visibility:hidden;opacity:0;pointer-events:none;}
.percent-summary.is-goal-bar::before {display:none;}
.percent-summary.is-goal-bar > .goal-sync-button {grid-column:2;grid-row:1;}
.goal-bar-track {fill:#001e60;stroke:#fff;stroke-width:2.5;}
.goal-bar-node {cursor:pointer;opacity:1;}
.goal-bar-node .goal-bar-marker {fill:#001e60;stroke:var(--goal-node-color,#fff);stroke-width:2;}
.goal-bar-node.is-failed circle {fill:#a92e40;}
.goal-bar-svg:focus-visible .goal-bar-marker {filter:drop-shadow(0 0 2px #fff);}
.goal-bar-glyph {fill:#fff;font-size:11px;font-weight:700;}
.goal-bar-node.is-current .goal-bar-glyph {fill:#001e60;}
.goal-bar-time,.goal-bar-percent {fill:#fff;font-family:Arial,sans-serif;font-weight:700;font-variant-numeric:tabular-nums;transition:opacity 180ms ease;}
.goal-bar-label,.goal-bar-caption,.goal-bar-zero {fill:#c6def5;font:10px Arial,sans-serif;}
.goal-bar-label {font-size:11px;}
.goal-bar-node.is-failed .goal-bar-label {fill:#ffb5bd;}
@media (orientation:portrait) and (max-width:520px) and (max-height:720px) {
 .app {--timer-summary-row-height:100px;}
 .app[data-percentage-display=bar] {--timer-summary-row-height:167px;}
 .app[data-percentage-display=bar] .trip-summary {grid-template-rows:55px 112px;}
}
@media (prefers-reduced-motion:reduce) {.trip-summary,.goal-bar-svg{transition:none;}}

@media (orientation:portrait) and (max-width:520px) and (max-height:720px) {
 .app[data-trip-state=ready] {grid-template-rows:var(--app-header-height,52px) var(--timer-summary-row-height) 110px 0px minmax(0,1fr) calc(var(--trip-log-row-height) + var(--speech-command-row-height)) var(--speech-mic-row-height);}
}

.goal-limit-dialog{width:min(calc(100vw - 16px),440px);border-radius:14px;}
.goal-limit-dialog p{padding:16px;line-height:1.5;}
.goal-limit-ok{width:calc(100% - 32px);min-height:52px;margin:0 16px 16px;border:2px solid #ffdf7d;border-radius:10px;background:#ffc220;color:#001e60;font-size:22px;font-weight:700;}

.goal-bar-compression-right {cursor:pointer;}
.goal-bar-compression-right:focus-visible > path {stroke:#fff;stroke-width:2;}
.auto-goal-options > [hidden] {display:none!important;}

.goal-bar-node[aria-disabled=true],.goal-bar-compression-right[aria-disabled=true] {cursor:default;}

/* The goal bar is one keyboard and pointer target; Sync remains separate. */
.percent-summary.is-goal-bar > .goal-bar-svg {cursor:pointer;}
.goal-bar-svg,.goal-bar-svg:focus,.goal-bar-svg:active {outline:none;box-shadow:none;}

.goal-details {display:grid;gap:6px;font-size:15px;line-height:1.3;font-weight:600;text-align:center;}
.auto-goal-option > .goal-details {grid-column:1 / -1;}
.goal-details [data-goal-detail=inferred] {color:#a9e9ff;}
.number-pad-context > .goal-details {margin-top:8px;font-size:14px;}

.goal-details [hidden] {display:none!important;}

.auto-goal-option {place-content:center;gap:0;}
.auto-goal-option > [hidden] {display:none!important;}
.auto-goal-option .goal-details {width:100%;justify-items:center;align-content:center;gap:6px;text-align:center;}
.auto-goal-option .goal-details [data-goal-detail=actual] {font-size:clamp(18px,5.2vw,22px);font-weight:800;white-space:nowrap;}
.auto-goal-option .goal-details [data-goal-detail=inferred] {font-size:clamp(12px,3.2vw,14px);font-weight:500;white-space:nowrap;}

/* Full and Compact use the same action elements and event handlers. */
.compact-action-rail, .compact-interval-timer { display:none; }
.app[data-action-display="compact"] {
    --compact-action-size:52px;
    --compact-action-step:62px;
    --compact-timer-space:0px;
    --trip-log-row-height:0px;
    grid-template-columns:66px minmax(0,1fr) 66px;
    grid-template-rows:var(--app-header-height,52px) var(--timer-summary-row-height) 0 0 minmax(0,1fr) var(--speech-command-row-height) var(--speech-mic-row-height);
}
.app[data-action-display="compact"] > :is(.app-header,.trip-summary,.summary-spacer,speech-mic-bar,.speech-commands-menu) {grid-column:1 / -1;}
.app[data-action-display="compact"] > .app-header {grid-row:1;}
.app[data-action-display="compact"] > .trip-summary {grid-row:2;}
.app[data-action-display="compact"] > .trip-action-controls,
.app[data-action-display="compact"] > #tripLogPlaceholder {display:none!important;}
.app[data-action-display="compact"] > .clock-region {grid-row:5;grid-column:2;padding-top:var(--compact-timer-space);}
.app[data-action-display="compact"][data-compact-timed="true"] {--compact-timer-space:76px;}
.app[data-action-display="compact"] > .compact-action-rail {
    display:block;grid-row:5;position:relative;min-height:0;align-self:stretch;
}
.compact-action-left {grid-column:1;}.compact-action-right {grid-column:3;}
.app[data-action-display="compact"] .compact-action-rail > button {
    display:grid!important;place-items:center;position:absolute;left:50%;top:calc(50% + var(--compact-timer-space)/2);
    width:var(--compact-action-size);height:var(--compact-action-size);min-width:0;min-height:0;
    margin:0;padding:0;border:2px solid var(--wm-white);border-radius:12px;
    font-size:0!important;line-height:1;grid-row:auto;
    transform:translate(-50%,calc(-50% + var(--compact-offset,0)*var(--compact-action-step))) scale(1);
    transition:transform 400ms ease,opacity 250ms ease,visibility 250ms;
    opacity:0;visibility:hidden;pointer-events:none;z-index:1;
}
.app[data-action-display="compact"] .compact-action-rail > button[data-compact-visible="true"] {opacity:1;visibility:visible;pointer-events:auto;}
.app[data-action-display="compact"] .compact-action-rail > button::before {content:attr(data-compact-glyph);font-size:29px;line-height:1;}
.app[data-action-display="compact"] .compact-action-rail > #endTripButton:not(:has(.break-action-label))::before {
    content:"";width:26px;height:24px;clip-path:polygon(0 0,100% 0,100% 75%,8% 75%,8% 100%,0 100%);
    background:conic-gradient(currentColor 25%,transparent 0 50%,currentColor 0 75%,transparent 0) 0 0 / 12px 12px;
}
.app[data-action-display="compact"] .compact-action-rail > button > :is(.break-action-label,.break-action-clock,.deferred-trip-icon) {display:none;}
.app[data-action-display="compact"] .compact-action-rail > button[data-compact-visible="false"] {opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,-50%) scale(.7);}
.app[data-action-display="compact"] .compact-action-rail > :is(#downButton,#breakDownButton) {background:var(--wm-gray);color:var(--wm-blue-dark);}
.app[data-action-display="compact"] #downDetailsButton svg {width:30px;height:30px;}
.app[data-action-display="compact"] #downDetailsButton::before {display:none;}
.app[data-action-display="compact"] > .compact-interval-timer:not([hidden]) {
    display:grid;grid-row:5;grid-column:2;align-self:start;justify-items:center;gap:4px;padding:8px 0;z-index:1;
}
.compact-interval-timer > span {font-size:16px;}
.compact-interval-timer > output {font-size:clamp(28px,8vw,42px);line-height:1;font-weight:800;}
.app[data-action-display="compact"][data-interval-state="down"] > :is(.compact-action-rail,.compact-interval-timer) {z-index:3001;}
.app[data-action-display="full"][data-interval-state="down"] {
    grid-template-rows:var(--app-header-height,52px) var(--timer-summary-row-height) minmax(0,1fr) 0 0 calc(var(--trip-log-row-height) + var(--speech-command-row-height)) var(--speech-mic-row-height);
}
.app[data-action-display="full"][data-interval-state="down"] .clock-region {visibility:hidden;}
.app[data-action-display="full"][data-interval-state="down"] .clock-region > clock-timer {transform:none!important;}
@media(max-height:650px) {
    .app[data-action-display="compact"] {--compact-action-size:42px;--compact-action-step:50px;grid-template-columns:52px minmax(0,1fr) 52px;}
    .app[data-action-display="compact"][data-compact-timed="true"] {--compact-timer-space:64px;}
    .compact-interval-timer > output {font-size:28px;}
}
@media(prefers-reduced-motion:reduce) {
    .app[data-action-display="compact"], .app[data-action-display="compact"] .compact-action-rail > button {transition:none;}
}

/* Size keypad contents from the editor's usable region, including mic reservation. */
.number-pad-shell {container-type:size;min-height:0;}
.number-pad-header {min-height:clamp(80px,20cqh,132px);}
.number-pad-key {min-height:0;font-size:clamp(28px,11cqh,64px);}
.number-pad-clear-reset {min-height:0;height:100%;aspect-ratio:auto;}
.number-pad-context:has(> .goal-details:not([hidden])) {padding:10px 54px;}
.number-pad-context > .goal-details {margin:0;justify-items:center;align-content:center;gap:6px;}
.number-pad-context [data-goal-detail=actual] {font-size:22px;font-weight:800;white-space:nowrap;}
.number-pad-context [data-goal-detail=inferred] {font-size:14px;font-weight:500;white-space:nowrap;}

.number-pad-shell {grid-template-rows:auto auto 44px minmax(0,1fr);}
/* Suppression preserves recognition intent; leaving the touch editor restores the bar. */
speech-mic-bar[data-surface-suppressed="true"],speech-mic-bar[data-surface-suppressed="true"][popover]:popover-open {
    transform:translateY(calc(100% + 60px))!important;opacity:0!important;pointer-events:none!important;
}
shared-modal-host > .number-pad-dialog {transition:height var(--trip-log-layout-duration,1000ms) ease-in-out,opacity 250ms linear,transform 280ms ease;}
.app[data-action-display="compact"] #downBreakButton {color:var(--wm-white);background:var(--wm-blue-dark);}

@starting-style {
    shared-modal-host > .number-pad-dialog[open] {height:var(--shared-modal-entry-height,100dvh);}
}


/* Responsive bar and interval placement share a single summary height budget. */
.app {--goal-bar-height:112px;--timer-summary-header-height:78px;--timer-summary-classic-height:64px;}
.app[data-percentage-display=bar] {--timer-summary-row-height:calc(var(--timer-summary-header-height) + var(--goal-bar-height));}
.app[data-percentage-display=bar] .trip-summary {grid-template-rows:var(--timer-summary-header-height) var(--goal-bar-height);}
.goal-bar-svg {height:var(--goal-bar-height,112px);}
.percent-summary.is-goal-bar > .goal-sync-button {align-self:center;translate:0 var(--goal-bar-sync-offset,0px);}
.app[data-percentage-display=bar] .clock-region > clock-timer {--home-clock-preferred-size:80vw;}
.app[data-action-display=compact][data-percentage-display=bar] .clock-region > clock-timer {--home-clock-preferred-size:1000px;}
.app[data-action-display=compact] > .clock-region {padding-top:0;}
.app[data-action-display=compact] .compact-action-rail > button {top:50%;overflow:hidden;line-height:0;}
.app[data-action-display=compact] .compact-action-rail > button::before {display:none!important;}
.app[data-action-display=compact] .compact-action-rail > button > svg {display:none;}
.compact-action-icon {position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;}
.compact-action-icon > svg {display:block;width:62%;height:62%;max-width:32px;max-height:32px;overflow:visible;}
.app[data-action-display=compact] .trip-summary > .compact-interval-timer:not([hidden]) {display:grid;grid-row:2;grid-column:1 / -1;place-content:center;justify-items:center;gap:4px;min-height:0;padding:4px 0;}
.app[data-action-display=compact][data-compact-timed=true] {--timer-summary-row-height:calc(var(--timer-summary-header-height) + var(--timer-summary-classic-height) + var(--compact-timer-space));}
.app[data-action-display=compact][data-compact-timed=true] .trip-summary {grid-template-rows:var(--timer-summary-header-height) var(--compact-timer-space) var(--timer-summary-classic-height);}
.app[data-action-display=compact][data-compact-timed=true] .percent-summary {grid-row:3;}
.app[data-action-display=compact][data-compact-timed=true][data-percentage-display=bar] {--timer-summary-row-height:calc(var(--timer-summary-header-height) + var(--goal-bar-height) + var(--compact-timer-space));}
.app[data-action-display=compact][data-compact-timed=true][data-percentage-display=bar] .trip-summary {grid-template-rows:var(--timer-summary-header-height) var(--compact-timer-space) var(--goal-bar-height);}
@media(orientation:portrait) and (max-width:520px) and (max-height:720px) {
 .app {--timer-summary-header-height:55px;--timer-summary-classic-height:45px;}
}
@media(prefers-reduced-motion:reduce) {.goal-bar-svg {transition:none;}}

.compact-action-icon {display:none;}
.app[data-action-display=compact] .compact-action-rail .compact-action-icon {display:grid;}
.percent-summary.is-goal-bar {height:100%;min-height:0;grid-template-rows:minmax(0,1fr);}
.percent-summary.is-goal-bar > .goal-bar-svg {height:100%;align-self:stretch;}

.app[data-time-readout-paused=true] :is(#renderedTimeLabel,#renderedTimeValue) {color:#a7a8aa;}

/* Center the bar/clock group vertically, with a controlled gap between them. */
.app[data-percentage-display=bar] {--goal-bar-slot-height:calc(var(--goal-bar-height) + var(--goal-bar-leading-space,0px));--timer-summary-row-height:calc(var(--timer-summary-header-height) + var(--goal-bar-slot-height));}
.app[data-percentage-display=bar] .trip-summary {grid-template-rows:var(--timer-summary-header-height) var(--goal-bar-slot-height);}
.app[data-percentage-display=bar] .percent-summary.is-goal-bar > .goal-bar-svg {height:var(--goal-bar-height);align-self:end;}
.percent-summary.is-goal-bar > .goal-sync-button {align-self:end;}
.app[data-percentage-display=bar] .clock-region {place-items:start center;padding-top:16px;}
.app[data-percentage-display=bar] .clock-region > clock-timer {width:min(var(--clock-stage-diameter,80vw),100cqw,100cqh);height:min(var(--clock-stage-diameter,80vw),100cqw,100cqh);}
.app[data-action-display=compact][data-percentage-display=bar] .compact-action-rail > button {top:calc(16px + var(--clock-stage-diameter,56vw)/2);}
.app[data-action-display=compact][data-compact-timed=true][data-percentage-display=bar] {--timer-summary-row-height:calc(var(--timer-summary-header-height) + var(--goal-bar-slot-height) + var(--compact-timer-space));}
.app[data-action-display=compact][data-compact-timed=true][data-percentage-display=bar] .trip-summary {grid-template-rows:var(--timer-summary-header-height) var(--compact-timer-space) var(--goal-bar-slot-height);}
.app.layout-switch-snap,.app.layout-switch-snap * {transition:none!important;}
:root[data-layout-transition] {view-transition-name:none;}
:root[data-layout-transition]::view-transition-group(*) {animation-duration:360ms;animation-timing-function:ease-in-out;}

.goal-bar-outline {fill:none;stroke:#fff;stroke-width:2.5;vector-effect:non-scaling-stroke;pointer-events:none;}

/* Full Down controls keep their original size; spare height belongs to the gaps. */
.app[data-action-display="full"][data-interval-state="down"] .trip-action-controls {
    height:min(230px,100%);
    align-self:center;
}
@media(max-height:650px) {
    .app[data-action-display="full"][data-interval-state="down"] .trip-action-controls {height:min(156px,100%);}
}

/* Keep the default header footprint; short viewports may contract it. */
.app {--app-header-height:52px;}
@media(max-height:720px){.app {--app-header-height:42px;}}
.goal-bar-avatar .bubble {stroke:#ffc220;}
.goal-bar-avatar .bubble text {fill:#ffc220;}
.compact-interval-timer,#endTripButton {position:relative;}
.break-buffer-side {position:absolute;transform:translateY(-50%);display:grid;place-items:center;pointer-events:none;line-height:1.1;font-size:18px;font-variant-numeric:tabular-nums;border:0;}
.break-buffer-track {grid-area:1/1;display:block;width:100%;height:100%;background:rgb(0 30 96 / 22%);border:0;border-radius:3px;overflow:hidden;}
.break-buffer-track > i {display:block;width:100%;height:100%;background:currentColor;opacity:.35;transition:transform 1s linear;}
.break-buffer-side.left i {transform-origin:right;}
.break-buffer-side.right i {transform-origin:left;}
.break-buffer-side {transform:translateY(-50%) scaleX(var(--buffer-wing-open,1));}
.break-buffer-side.left {transform-origin:right center;}
.break-buffer-side.right {transform-origin:left center;}
.app:not([data-action-display="compact"]) #endTripButton:has(> .break-action-label) {display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0;font-size:var(--break-action-font-size,clamp(24px,8vw,48px));}
.app:not([data-action-display="compact"]) #endTripButton:has(> .break-action-label) :is(.break-action-label,.break-action-clock) {font-size:inherit;line-height:1.1;}
.app:not([data-action-display="compact"]) .break-end-row .break-action-clock::before {content:" : "!important;white-space:pre;}
.compact-action-rail .break-buffer-side {display:none;}
@media(prefers-reduced-motion:reduce){.break-buffer-track > i {transition:none;}}

/* Only painted bar controls receive taps. The avatar and reserved air do not. */
.percent-summary.is-goal-bar {pointer-events:none;}
.percent-summary.is-goal-bar > .goal-bar-svg {pointer-events:none;cursor:default;}
.goal-bar-svg :is(.goal-bar-track,.goal-bar-fill,.goal-bar-segment,.goal-bar-outline,.goal-bar-compression) {pointer-events:none;cursor:default;}
.percent-summary.is-goal-bar > .goal-sync-button {pointer-events:auto;}
.goal-bar-avatar,.goal-bar-avatar *,.goal-bar-connectors {pointer-events:none!important;}
.app[data-percentage-display=bar] .trip-summary > :is(.rendered-time-cell,.summary-cell) {position:relative;z-index:2;}
.percent-summary.is-goal-bar {position:relative;z-index:1;}

.auto-goal-dialog form {padding-bottom:16px;}

.goal-bounding-indicator{display:inline-block;pointer-events:none;font-size:.7em;vertical-align:super;color:inherit;}
.goal-bounding-raw{font-size:12px;font-weight:500;color:#c1def5;}
.goal-bounding-marker{pointer-events:none;transform-box:fill-box;transform-origin:center;}

/* Keep unresolved account layout choices from flashing as Full/Classic. */
html[data-layout-settings-pending="true"] #app :is(.percent-summary,.percent-summary *,.trip-action-controls,.trip-action-controls *,.compact-action-rail,.compact-action-rail *,.compact-interval-timer,.compact-interval-timer *,#tripLogButton) {visibility:hidden!important;pointer-events:none!important;}
.layout-switch-overlay {position:fixed;inset:0;z-index:2147483647;display:grid;place-items:center;background:rgb(0 15 40 / 42%);view-transition-name:wmof-layout-busy;cursor:progress;}
.layout-switch-overlay[popover] {margin:0;padding:0;border:0;width:100vw;height:100dvh;max-width:none;max-height:none;overflow:hidden;opacity:1;transition:none;}
@starting-style {.layout-switch-overlay[popover]:popover-open {opacity:1;}}
.layout-switch-overlay[hidden] {display:none;}
.layout-switch-overlay>span {padding:18px 26px;border:1px solid #a9ddf7;border-radius:14px;background:rgb(15 34 56 / 88%);color:white;font:700 20px Arial,sans-serif;}
::view-transition-group(wmof-layout-busy) {z-index:2147483647;}
::view-transition-old(wmof-layout-busy),::view-transition-new(wmof-layout-busy) {animation:none;}

/* Binary menu state has one palette; disclosure and radio choices are separate. */
:is(#mainMenu,#dropInMenu) [data-menu-toggle] {color:var(--menu-toggle-off,#9da6b3);transition:color 160ms linear;}
:is(#mainMenu,#dropInMenu) [data-menu-toggle]:is([aria-pressed="true"],[aria-checked="true"]),
:is(#mainMenu,#dropInMenu) label[data-menu-toggle]:has(input:checked) {color:var(--wm-blue-light,#a9ddf7);}
:is(#mainMenu,#dropInMenu) [data-menu-toggle] .sync-goals-menu-icon {color:inherit;}
:is(#mainMenu,#dropInMenu) label[data-menu-toggle] input {accent-color:var(--wm-blue-light,#a9ddf7);}

/* Bar-mode next-goal countdown shares the interval timer's summary slot. */
.app[data-goal-countdown=true] .trip-summary > .compact-interval-timer:not([hidden]) {display:grid;grid-row:2;grid-column:1 / -1;place-content:center;justify-items:center;gap:4px;min-height:0;padding:4px 0;}
.app[data-goal-countdown=true][data-percentage-display=bar] {--timer-summary-row-height:calc(var(--timer-summary-header-height) + var(--goal-bar-slot-height) + var(--compact-timer-space,76px));}
.app[data-goal-countdown=true][data-percentage-display=bar] .trip-summary {grid-template-rows:var(--timer-summary-header-height) var(--compact-timer-space,76px) var(--goal-bar-slot-height);}
.app[data-goal-countdown=true][data-percentage-display=bar] .percent-summary {grid-row:3;}
.app[data-goal-countdown=true] .trip-summary > .compact-interval-timer:not([hidden]) {
    grid-row:1;grid-column:1;min-width:0;gap:3px;padding:0;text-align:center;
}
.app[data-goal-countdown=true] .compact-interval-timer > span {max-width:100%;font-weight:700;}
.app[data-goal-countdown=true] .compact-interval-timer > output {font-size:34px;}
.app[data-goal-countdown=true] #standardTimeButton {grid-row:2;grid-column:1 / -1;}
.app[data-goal-countdown=true] .rendered-time-cell {grid-row:1;grid-column:2;}

.trip-log-percent-button {font:inherit;color:inherit;background:transparent;border:0;padding:0;width:100%;cursor:pointer;}
.trip-log-actual.is-official-percent {border:1px solid #a9ddf7;border-radius:7px;padding:5px 3px;}
.trip-log-official-badge {display:block;font:700 9px Arial,sans-serif;text-transform:uppercase;letter-spacing:.5px;margin-top:3px;}
.trip-log-official-entry {display:grid;gap:7px;margin:10px 0 0;padding:12px;border:1px solid #729ab3;border-radius:8px;background:rgb(169 221 247 / 10%);font-size:14px;}
.trip-log-official-entry strong {display:flex;gap:7px;align-items:center;color:#a9ddf7;}
.trip-log-official-entry svg {width:17px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;}
.trip-log-official-entry small {color:#bacfdf;}
.number-pad-anchor-digit {color:inherit;text-decoration:none;background:color-mix(in srgb,var(--wm-blue-light) 35%,transparent);border-radius:2px;}
.number-pad-official-details {text-align:center;font-size:14px;color:#c6dce9;padding:4px 10px;}
.clear-official-percentage {font:inherit;color:#fff;background:transparent;border:1px solid #a9bdd0;border-radius:7px;padding:7px 12px;margin-top:6px;}

.number-pad-display:has(.number-pad-digit-run) {display:flex;justify-content:center;align-items:center;white-space:nowrap;}
.number-pad-context:has(> .number-pad-official-details) {padding:10px 44px;}

.number-pad-digit-run {display:inline-block;white-space:nowrap;user-select:none;touch-action:none;}
.number-pad-display {touch-action:none;}
[data-pad-digit] {cursor:text;}

.number-pad-caret {display:inline-block;width:0;height:1em;position:relative;vertical-align:-.1em;pointer-events:none;}
.number-pad-caret::after {content:"";position:absolute;inset:0 auto 0 -1px;border-left:2px solid currentColor;}

.number-pad-fraction {font-size:.48em;line-height:1;font-variant-numeric:tabular-nums;}

/* Themes use the same touch target and alignment in either palette. */
.themes-submenu .halloween-theme-option {display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border-radius:8px;cursor:pointer;}
.themes-submenu .halloween-theme-option input {width:22px;height:22px;margin:0;flex:none;accent-color:var(--wm-blue-light);}

/* Embedded settings stay inside the shared modal boundary above the Mic Bar. */
shared-modal-host dialog#clockTimerSettingsFrameDialog:has(iframe:not([data-settings-surface="graphicalSettingsDialog"])) {
    top:0;bottom:auto;height:var(--shared-modal-safe-height,100dvh);max-height:var(--shared-modal-safe-height,100dvh);
}
shared-modal-host dialog#clockTimerSettingsFrameDialog iframe:not([data-settings-surface="graphicalSettingsDialog"]) {
    max-height:calc(var(--shared-modal-safe-height,100dvh) - 16px);
}

/* A paint-only timer outline follows the full tracks during either buffer. */
@property --timer-attention-angle {syntax:"<angle>";inherits:false;initial-value:0deg;}
.app {--timer-attention-fill:#052357;--timer-attention-base:#4c91e3;--timer-attention-mid:#8edcff;--timer-attention-light:#fff;--timer-attention-ink:#fff;--timer-attention-glow:rgb(142 220 255 / 24%);}
[data-timer-attention] {position:relative;}
[data-timer-attention] > :is(.break-action-label,.break-action-clock,output),.compact-interval-timer[data-timer-attention] > span:not(.break-buffer-side) {position:relative;z-index:2;}
[data-timer-attention] > :is(.break-action-label,.break-action-clock) {color:var(--timer-attention-ink);}
[data-timer-attention] > :is(.break-action-clock,output) {font-variant-numeric:tabular-nums;}
.break-buffer-side {z-index:1;}
.timer-attention-frame {position:absolute;display:block;pointer-events:none;z-index:0;filter:drop-shadow(0 0 5px var(--timer-attention-glow));animation:timer-attention-arrive 650ms ease-out;}
.timer-attention-frame[hidden] {display:none;}
.timer-attention-frame > svg {display:block;width:100%;height:100%;overflow:visible;}
.timer-attention-surface {fill:var(--timer-attention-fill);}
.timer-attention-gradient {width:100%;height:100%;background:conic-gradient(from var(--timer-attention-angle),var(--timer-attention-base),var(--timer-attention-base) 33%,var(--timer-attention-mid) 48%,var(--timer-attention-light) 56%,var(--timer-attention-mid) 64%,var(--timer-attention-base) 81%);animation:timer-attention-travel 4s linear infinite;}
.app[data-action-display="compact"][data-interval-state="down"] .compact-interval-timer {position:relative;z-index:3001;}
@keyframes timer-attention-travel {to{--timer-attention-angle:360deg;}}
@keyframes timer-attention-arrive {0%{filter:drop-shadow(0 0 0 transparent);}45%{filter:drop-shadow(0 0 10px var(--timer-attention-glow));}100%{filter:drop-shadow(0 0 5px var(--timer-attention-glow));}}
@media(prefers-reduced-motion:reduce){.timer-attention-frame,.timer-attention-gradient {animation:none!important;}}

/* Full break actions keep their hit area, with only the fitted timer outline visible. */
.app[data-action-display="full"] #endTripButton[data-timer-attention] {background:transparent!important;border-color:transparent!important;box-shadow:none;}

[data-timer-attention] .break-buffer-track {background:color-mix(in srgb,var(--timer-attention-mid) 12%,var(--timer-attention-fill));}
[data-timer-attention] .break-buffer-track > i {background:var(--timer-attention-mid);opacity:.55;}

.trip-summary-percent-button {border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;padding:2px;text-decoration:underline;text-underline-offset:4px;cursor:pointer;}
.trip-summary-percent-button.is-official-percent {outline:1px solid currentColor;outline-offset:2px;}
.trip-log-down-grid:has(>div:nth-child(2):last-child) {grid-template-columns:repeat(2,minmax(0,1fr));}

.trip-log-down-time {display:inline-flex;justify-content:center;align-items:baseline;gap:1px;font-variant-numeric:tabular-nums;}
.trip-log-down-milliseconds {font-size:.5em;font-weight:500;line-height:1;}
.trip-log-down-time.is-stacked {display:grid;justify-items:start;justify-content:start;gap:7px;}
.trip-log-down-time.is-stacked .trip-log-down-milliseconds {font-size:.48em;}

.trip-log-down-logged .trip-log-down-milliseconds {font-size:1em;font-weight:inherit;}

.scope-control:has(.historical-range-banner:not([hidden])) .scope-toggle {padding-bottom:18px;}
.scope-control:has(.historical-range-banner:not([hidden])) {border-color:#ffd778;}
.historical-range-banner:not([hidden]) {position:absolute;bottom:3px;left:8px;right:8px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px;font-weight:600;color:#ffe6a1;line-height:1.2;}
.historical-range-banner span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
.historical-range-banner button {border:1px solid currentColor;border-radius:4px;background:rgb(0 0 0 / 25%);color:inherit;font:inherit;white-space:nowrap;padding:1px 4px;min-height:16px;}
.trip-log-range-status,.historical-range-status:not([hidden]) {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:10px 12px;color:#ffe6a1;background:rgb(0 0 0 / 25%);font-size:12px;}
.trip-log-range-status {margin:0 12px 12px;border:1px solid currentColor;border-radius:8px;}
.trip-log-range-status button {border:1px solid currentColor;border-radius:5px;background:transparent;color:inherit;font:inherit;padding:5px 8px;}

.trip-log-controls label[hidden] {display:none;}

.trip-log-controls label.is-unavailable>span {text-decoration:line-through;opacity:.65;}

#includePendingDownTimeButton.is-unavailable>[data-language-id] {text-decoration:line-through;opacity:.65;}
#mainMenu [data-menu-toggle]:is(:disabled,[aria-disabled="true"]) {text-decoration:line-through;}
#mainMenu [data-menu-toggle]:has(input:disabled)>span {text-decoration:line-through;opacity:.65;}

.dedicated-trip-editor [aria-invalid="true"] {color:#ffb1ba;border-color:#ffb1ba;outline:1px solid #ffb1ba;outline-offset:2px;}

@media (max-width:380px) {.trip-editor-accounting-cell {padding-inline:2px;}}

/* Separate aggregate navigation from trip rows, without nested guide lines. */
.trip-log-body.trip-log-merged:not([hidden]):not(.trip-log-empty) {display:flex;flex-direction:column;overflow:auto;}
.trip-log-settings,.trip-log-scope-header,.trip-log-range-status {flex-shrink:0;}
.trip-log-split {display:flex;flex:1 0 260px;min-height:260px;flex-direction:column;overflow:hidden;}
.trip-log-aggregate-pane {flex:0 0 var(--trip-log-aggregate-share,32%);min-height:60px;max-height:calc(100% - 170px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;}
.trip-log-trips-pane {flex:1 1 0;min-height:150px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-bottom:8px;}
.trip-log-trips-pane .trip-log-column-header {top:0;}
.trip-log-splitter {flex:0 0 18px;position:relative;cursor:row-resize;touch-action:none;border-block:1px solid rgb(255 255 255 / 25%);background:var(--ui-charcoal-gradient,#263441);}
.trip-log-splitter::after {content:'';position:absolute;width:42px;height:4px;border-radius:3px;left:calc(50% - 21px);top:6px;background:var(--wm-blue-light);}
.trip-log-splitter:focus-visible {outline:2px solid var(--wm-yellow);outline-offset:-2px;}
.trip-log-aggregate-path {position:sticky;top:0;z-index:2;display:flex;flex-wrap:wrap;gap:3px;padding:5px 8px;background:var(--ui-charcoal-gradient,#263441);}
.trip-log-aggregate-path button {padding:4px 6px;min-width:0;border:1px solid rgb(255 255 255 / 35%);border-radius:5px;font-size:11px;color:inherit;background:transparent;}
.trip-log-aggregate-path button[aria-pressed=true] {color:var(--wm-blue-light);border-color:currentColor;}
.trip-log-aggregate-tree .trip-log-group-children {margin:0;padding:0;border:0;}
.trip-log-aggregate-tree .trip-log-group>summary {padding:9px 10px 9px 28px;border-bottom:1px solid rgb(255 255 255 / 15%);font-size:13px;}
.trip-log-aggregate-tree .trip-log-group>summary::after {display:none;}
.trip-log-aggregate-tree .trip-log-group.is-selected-scope>summary {box-shadow:inset 3px 0 var(--wm-blue-light);}
.trip-log-split:not(.has-aggregates)>.trip-log-aggregate-pane,.trip-log-split:not(.has-aggregates)>.trip-log-splitter {display:none;}
.trip-editor-toolbar {position:relative;margin-left:25px;}
.trip-editor-toolbar::before {box-sizing:content-box;content:"";position:absolute;left:-23px;top:50%;transform:translateY(-50%);width:10px;height:10px;border:2px solid var(--editor-accent);border-radius:50%;background:var(--editor-bg);}
.trip-editor-toolbar>.trip-log-add {width:100%;flex:1;}
.trip-editor-scheduled {background:color-mix(in srgb,var(--wm-blue-light) 13%,transparent);border:1px dashed var(--wm-blue-light);border-radius:7px;padding:10px;}
.trip-editor-scheduled>strong::before {content:'◷ ';color:var(--wm-blue-light);}

.trip-editor-down-accounting button.trip-editor-accounting-cell>strong {text-decoration:underline;text-underline-offset:3px;}

/* Category fills stay identical in individual intervals and the read-only total. */
.trip-editor-accounting-cell {background:var(--editor-card);}
.trip-editor-accounting-cell:is([data-down-amount="pending"],[data-down-amount="approved"]) {background:var(--editor-bg);}

/* Editor-origin numberpads retain their caller's neutral surfaces. */
html .number-pad-dialog[data-presentation="trip-editor"] {--pad-editor-bg:#303b45;--pad-editor-card:#46515c;--pad-editor-accent:var(--wm-blue-light);color:var(--wm-white);background:var(--pad-editor-bg);}
html[data-seasonal-theme="halloween"] .number-pad-dialog[data-presentation="trip-editor"] {--pad-editor-bg:#21170f;--pad-editor-card:#382717;}
html .number-pad-dialog[data-presentation="trip-editor"] :is(.number-pad-shell,.number-pad-header,.number-pad-readout,.number-pad-grid) {background:var(--pad-editor-bg);}
html .number-pad-dialog[data-presentation="trip-editor"] :is(.number-pad-context,.number-pad-voice-switch,.number-pad-settings,.number-pad-key,.number-pad-ampm,.number-pad-date) {background:var(--pad-editor-card);color:var(--wm-white);border-color:rgb(255 255 255 / 30%);}
html .number-pad-dialog[data-presentation="trip-editor"] :is(.number-pad-display,.number-pad-backspace,.number-pad-close) {color:var(--pad-editor-accent);}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-close {background:var(--pad-editor-bg);border:1px solid var(--pad-editor-accent);}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-confirm {background:var(--pad-editor-accent);color:#112431;}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-ampm[aria-pressed="true"] {background:var(--pad-editor-accent);color:#112431;}
html .number-pad-dialog[data-presentation="trip-editor"] input {color:inherit;color-scheme:dark;}

html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-display {color:var(--wm-white);}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-clear-reset {background:var(--pad-editor-card);color:var(--wm-white);}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-split-action {background:transparent;color:inherit;}

/* Aggregate level colors remain distinct from the selected-scope marker. */
.trip-log-body {--trip-log-year-bg:#273746;--trip-log-month-bg:#35434f;--trip-log-week-bg:#46535f;--trip-log-day-bg:#4d5c69;}
.trip-log-aggregate-tree .trip-log-group[data-scope-level="year"]>summary,.trip-log-aggregate-path button[data-scope-level="year"] {background:var(--trip-log-year-bg);}
.trip-log-aggregate-tree .trip-log-group[data-scope-level="month"]>summary,.trip-log-aggregate-path button[data-scope-level="month"] {background:var(--trip-log-month-bg);}
.trip-log-aggregate-tree .trip-log-group[data-scope-level="week"]>summary,.trip-log-aggregate-path button[data-scope-level="week"] {background:var(--trip-log-week-bg);}
.trip-log-aggregate-tree .trip-log-group[data-scope-level="day"]>summary,.trip-log-aggregate-path button[data-scope-level="day"] {background:var(--trip-log-day-bg);}
.trip-log-aggregate-tree .trip-log-group.is-selected-scope>summary {outline:1px solid var(--wm-blue-light);outline-offset:-1px;}
/* Flat day headings identify trips without reintroducing nesting guides. */
.trip-log-trips-pane .trip-log-column-header {line-height:16px;}
.trip-log-day-section {position:relative;display:flow-root;}
.trip-log-day-heading {position:sticky;top:36px;z-index:7;display:block;margin:0 12px;padding:9px 8px;border-bottom:1px solid rgb(255 255 255 / 40%);background:var(--trip-log-year-bg);color:var(--wm-white);font-size:13px;line-height:18px;box-shadow:0 3px 5px rgb(0 0 0 / 15%);}
.trip-log-day-section+.trip-log-day-section {margin-top:12px;}

/* Shared clipboard controls: a centered SVG, not a font glyph, in each box. */
.number-pad-header-actions {position:absolute;top:4px;right:6px;z-index:6;display:flex;gap:6px;}
.number-pad-dialog .number-pad-header-actions>button {position:static;box-sizing:border-box;display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;max-height:36px;padding:7px;border:1px solid var(--wm-blue-light);border-radius:8px;background:var(--ui-charcoal-gradient,#303b45);color:var(--wm-blue-light);}
.number-pad-header-actions>button[hidden] {display:none;}
.number-pad-header-actions>button:disabled {opacity:.4;cursor:default;}
.number-pad-header-actions svg {display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.number-pad-dialog .number-pad-close::before,.number-pad-dialog .number-pad-close::after {content:none;}
.number-pad-dialog .number-pad-context {min-height:44px;padding-left:12px;padding-right:132px;text-align:left;font-size:18px;line-height:1.2;}
.number-pad-header-actions .copy-check,.number-pad-header-actions .is-copied .copy-glyph {display:none;}
.number-pad-header-actions .is-copied .copy-check {display:block;}
.number-pad-clipboard-status {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-date-row {color:var(--wm-white);}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-meridiem {border:1px solid var(--wm-white);color:var(--wm-white);background:transparent;}
html .number-pad-dialog[data-presentation="trip-editor"] .number-pad-meridiem.is-selected {background:var(--pad-editor-accent);border-color:var(--pad-editor-accent);color:#112431;}

.number-pad-dialog .number-pad-context>:is(.goal-details,.number-pad-official-details) {margin-top:12px;margin-right:-120px;max-width:none;}
/* Derived goals: columns have fixed numerical tracks; edits never move the icon columns. */
.mode-dropdown.is-auto-goals{overflow-y:auto;overflow-x:hidden;padding:6px;max-width:calc(100vw - 24px)}
.auto-pane-head{display:flex;justify-content:space-between;align-items:center;padding:6px 6px 12px;border-bottom:1px solid rgb(255 255 255 / 25%);gap:8px}
.auto-pane-head strong{font-size:16px;color:var(--wm-blue-light);white-space:nowrap}
.mode-dropdown .auto-pane-back{width:auto;padding:5px 0;min-height:30px;font-size:13px;background:transparent}
.mode-dropdown .auto-pane-back::before,.mode-dropdown .auto-goal-edit::before{content:none}
.auto-column-head,.auto-scope-choice{display:grid;grid-template-columns:22px minmax(0,1fr) 52px 64px;column-gap:8px;align-items:center;padding:10px 6px;font-variant-numeric:tabular-nums}
.auto-column-head{font-size:10px;font-weight:700;color:var(--wm-blue-light);padding-block:9px}
.auto-lock-column svg{width:15px;height:15px;display:block;margin:auto}
.auto-column-fallback,.auto-scope-fallback{text-align:center}
.auto-column-target,.auto-scope-target{text-align:right;white-space:nowrap}
.auto-scope-choice{min-height:60px;font-size:14px;border:1px solid transparent;border-radius:5px;cursor:pointer}
.auto-scope-choice.selected{background:color-mix(in srgb,var(--wm-blue-light) 17%,transparent);border-color:var(--wm-blue-light)}
.auto-override-check{appearance:auto;accent-color:var(--wm-blue-light);width:20px;height:20px;margin:0;cursor:pointer}
.auto-goal-name{display:flex;align-items:center;gap:6px;min-width:0}
.auto-goal-copy{min-height:36px;display:flex;flex-direction:column;justify-content:center;min-width:0;font-weight:700}
.auto-goal-title{white-space:nowrap}
.auto-aggregate-percent{font:inherit}
.auto-confirm-hint{font-size:10px;line-height:14px;color:var(--wm-blue-light);font-weight:400;white-space:nowrap}
.mode-dropdown .auto-goal-edit{width:26px;min-width:26px;min-height:30px;height:30px;flex:none;padding:4px;display:grid;place-items:center;border:1px solid var(--wm-blue-light);border-radius:5px;background:color-mix(in srgb,var(--wm-blue-light) 10%,transparent);color:var(--wm-blue-light)}
.auto-goal-edit svg{width:16px;height:16px}
.auto-scope-fallback{font-size:12px;opacity:.8;white-space:nowrap}
.auto-scope-target{font-weight:700}
.auto-bounding{color:#7de2bd;margin-right:3px;font-size:1em}
html[data-seasonal-theme=halloween] .auto-bounding{color:#ffab53}
.auto-standard-choice{margin-top:8px;border-top-color:var(--wm-blue-light);background:color-mix(in srgb,var(--wm-blue-light) 8%,transparent);cursor:default}
.auto-scope-choice.selected:has(.auto-confirm-hint){animation:auto-goal-await 650ms ease-out 2}
@keyframes auto-goal-await{50%{box-shadow:inset 0 0 0 2px var(--wm-blue-light)}}
@media(prefers-reduced-motion:reduce){.auto-scope-choice.selected:has(.auto-confirm-hint){animation:none;box-shadow:inset 0 0 0 1px var(--wm-blue-light)}}
.auto-goal-header-lock{position:absolute;left:6px;top:6px;width:40px;height:40px;display:grid;place-items:center;color:var(--wm-blue-light);pointer-events:none}
.auto-goal-header-lock[hidden]{display:none}
.auto-goal-header-lock svg{width:28px;height:28px}
.goal-bar-override-pin{color:var(--wm-blue-light,#a9ddf7);pointer-events:none}
.goal-bar-node[data-auto-locked=true] .goal-bar-target-frame{stroke:var(--wm-blue-light,#a9ddf7)}
.trip-summary .summary-label{white-space:nowrap}
.trip-log-settings-dialog,.trip-log-down-dialog{width:min(94vw,520px);max-height:90dvh;padding:0;overflow:hidden;background:var(--ui-gray-gradient,var(--wm-gray));color:var(--wm-white)}
.trip-log-overlay-content{max-height:calc(90dvh - 76px);overflow-y:auto;padding:12px}
.trip-log-settings-dialog .trip-log-settings{position:static;display:block;opacity:1;transform:none;overflow:visible;background:transparent;transition:none}
.trip-log-settings-dialog .trip-log-settings-content{overflow:visible}
shared-modal-host > :is(.trip-log-settings-dialog,.trip-log-down-dialog){top:8px;bottom:calc(100dvh - var(--shared-modal-safe-height,100dvh) + 8px);height:max-content;max-height:max(0px,calc(var(--shared-modal-safe-height,100dvh) - 16px));margin:auto;}
shared-modal-host > :is(.trip-log-settings-dialog,.trip-log-down-dialog)[open]{display:flex;flex-direction:column;}
shared-modal-host > :is(.trip-log-settings-dialog,.trip-log-down-dialog)>.dialog-header{flex:none;}
shared-modal-host > :is(.trip-log-settings-dialog,.trip-log-down-dialog)>.trip-log-overlay-content{min-height:0;max-height:none;overflow-y:auto;}
.trip-log-settings-dialog .trip-log-settings-divider{display:none}
.trip-log-down-dialog .trip-log-down-section{margin:0}
.trip-log-down-button{position:fixed;z-index:22000;width:52px;height:52px;padding:10px;border:0;border-radius:6px;background:transparent;color:var(--wm-blue-light,#a9ddf7);cursor:pointer}
.trip-log-down-button[hidden]{display:none}
.trip-log-down-button svg{width:28px;height:28px}
.trip-log-down-button:hover{background:color-mix(in srgb,var(--wm-blue-light) 15%,transparent)}
.app[data-trip-list-state=open] #tripLogButton{padding-inline:112px 60px;font-size:clamp(22px,5vw,36px)}
.trip-log-settings-checks{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 16px;grid-column:1/-1;margin-top:8px}
.trip-log-controls .trip-log-settings-checks .trip-log-include-current{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;min-width:0;grid-column:auto;font-size:14px}
.trip-log-settings-checks input{flex:none;width:20px;height:20px}
.app[data-trip-list-state=open] #tripLogButton{font-size:clamp(28px,8vw,40px)}
.app[data-trip-list-state=open] #tripLogButton{padding-inline:88px;text-align:center;font-size:clamp(28px,8vw,40px)}
#tripLogSettingsButton,#tripLogDownButton{width:40px;height:40px;padding:6px}
.trip-log-empty-message{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}
.trip-log-empty-message small{font-size:16px;color:var(--wm-blue-light)}
.trip-log-settings-checks input{accent-color:var(--wm-blue-light,#a9ddf7);color-scheme:dark}
#tripLogSettingsButton,#tripLogDownButton{display:grid;place-items:center;box-sizing:border-box;line-height:1}
#tripLogSettingsButton[hidden],#tripLogDownButton[hidden]{display:none}
#tripLogSettingsButton svg,#tripLogDownButton svg{width:28px;height:28px;margin:0;display:block}
.trip-log-down-breakdown>header{display:flex;align-items:center;gap:10px;padding:12px}
.trip-log-down-breakdown>header>strong{font-size:17px;white-space:nowrap}
.break-over-duration{display:block;font-size:12px;line-height:1.3;margin-top:3px;font-weight:500;text-align:center}
#endTripButton[data-break-over-goal=true]{flex-direction:column;gap:3px}
[data-break-over-goal=true]>.break-action-label{white-space:nowrap;font-size:16px}
[data-break-over-goal=true]>.break-action-clock{font-size:30px;line-height:1.15}
.compact-interval-timer[data-break-over-goal=true]{min-height:90px}
.compact-interval-timer[data-break-over-goal=true]>span:not(.break-buffer-side){white-space:nowrap;font-size:16px}
.trip-log-range-help{grid-column:1/-1;font-size:13px;line-height:1.45;color:var(--wm-blue-light);margin-top:4px}
.trip-log-range-help hr{border:0;border-top:1px solid rgb(255 255 255 / 30%);margin:8px 0 12px}
.trip-log-range-help p{margin:0}
.trip-log-down-dialog .dialog-header h2{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--wm-blue-light)}
.trip-log-down-dialog .dialog-header h2 svg{width:26px;height:26px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7}
.trip-log-controls .trip-log-settings-checks .trip-log-include-current input{accent-color:var(--wm-blue-light,#a9ddf7)}
.trip-log-settings-checks{border-top:1px dotted rgb(255 255 255 / 45%);padding-top:14px}
.trip-log-range-help{color:#26323d}
.trip-log-settings-checks{border-top-color:#35414c}
html[data-seasonal-theme=halloween] .trip-log-range-help{color:#b8ada1}
html[data-seasonal-theme=halloween] .trip-log-settings-checks{border-top-color:#817466}
/* Move the live highlight on the compositor; do not repaint a 300%-wide background every frame. */
.trip-log-group.has-active-trip>summary,.trip-log-trip.is-active-trip>summary,.trip-log-entry.is-active-entry{position:relative;isolation:isolate;overflow:hidden;animation:none;background-image:none}
.trip-log-aggregate-tree .trip-log-group.has-active-trip>summary::after,.trip-log-trip.is-active-trip>summary::after,.trip-log-entry.is-active-entry::after{content:'';display:block;position:absolute;inset:0;left:0;top:0;bottom:0;border:0;pointer-events:none;z-index:-1;background:linear-gradient(105deg,transparent 15%,color-mix(in srgb,var(--trip-log-active-sweep-color) 35%,transparent) 45%,color-mix(in srgb,var(--trip-log-active-sweep-color) 55%,transparent) 50%,transparent 80%);transform:translateX(-100%);animation:trip-log-live-slide 4.2s linear infinite;animation-delay:var(--trip-log-active-sweep-delay,0ms);will-change:transform}
@keyframes trip-log-live-slide{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){.trip-log-aggregate-tree .trip-log-group.has-active-trip>summary::after,.trip-log-trip.is-active-trip>summary::after,.trip-log-entry.is-active-entry::after{animation:none;transform:none;will-change:auto}}
.trip-log-range-help,html[data-seasonal-theme=halloween] .trip-log-range-help{color:var(--wm-white)}
.trip-log-range-help hr{border-top-style:dotted;border-top-color:rgb(255 255 255 / 45%)}
.trip-log-range-help-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 16px}
.trip-log-range-help-grid p{font-weight:400}
.trip-log-settings-checks,html[data-seasonal-theme=halloween] .trip-log-settings-checks{border-top:0;padding-top:0}
.trip-log-setting-control{position:relative;display:inline-flex;align-items:center;flex:none;line-height:1}
.trip-log-setting-control.is-overridden::after{content:'';position:absolute;left:-3px;right:-3px;top:50%;height:2px;background:#253544;box-shadow:0 0 0 1px rgb(255 255 255 / 70%);pointer-events:none}
.trip-log-setting-control.is-overridden::after{transform:rotate(-35deg);transform-origin:center}
.trip-log-controls label.is-unavailable>span{text-decoration:none;opacity:.65}
.trip-log-controls label.is-overridden>span:not(.trip-log-setting-control){text-decoration:line-through;opacity:.65}
.trip-log-controls .trip-log-setting-control{text-decoration:none;opacity:1}
.trip-log-range-help h3{font-size:14px;margin:0 0 10px;text-align:left}
.trip-log-range-help h3{display:flex;align-items:center;gap:7px}
.trip-log-range-info{display:inline-grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;background:var(--wm-blue);color:var(--wm-white);font-size:14px;font-weight:700;line-height:1;border:1px solid var(--wm-blue-light)}
html[data-seasonal-theme=halloween] .trip-log-range-info{background:#73408a;color:#fff2d4;border-color:#d7b2ed}
.trip-log-range-help h3{width:100%;justify-content:center;padding:10px 12px;margin:0 0 12px;font-size:17px;line-height:1.3;background:var(--ui-charcoal-gradient,#263441);border-radius:5px;color:var(--wm-white)}
.trip-log-range-help h3{display:block;text-align:center;padding-inline:40px}
.trip-log-range-help-title{position:relative;display:inline-block}
.trip-log-range-help-title .trip-log-range-info{position:absolute;right:calc(100% + 8px);top:50%;transform:translateY(-50%)}
.trip-log-dialog[open] #tripLogButton{padding-inline:88px;text-align:center;font-size:clamp(28px,8vw,40px)}
.trip-log-settings-dialog>.dialog-header,.trip-log-down-dialog>.dialog-header{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--ui-charcoal-gradient,#263441)}
.trip-log-settings-dialog>.dialog-header h2,.trip-log-down-dialog>.dialog-header h2{font-size:22px;margin:0;min-width:0}
.trip-log-settings-dialog>.dialog-header button,.trip-log-down-dialog>.dialog-header button{display:grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:1px solid #899aaa;border-radius:6px;background:transparent;color:inherit;font-size:26px;line-height:1}
.trip-log-down-category{appearance:none;color:inherit;font:inherit;background:transparent;cursor:pointer;border:0;text-align:left;border-radius:3px}
.trip-log-down-category:not(:disabled):hover{background:rgb(255 255 255 / 7%);outline:1px solid var(--wm-blue-light)}
.trip-log-down-category:focus-visible{outline:2px solid var(--wm-blue-light);outline-offset:2px}
.trip-log-down-category:disabled{cursor:default}
.trip-log-down-grid>.trip-log-down-category{display:grid;gap:7px;text-align:left;padding:0 8px;border-right:1px solid #647786;font-size:11px}
.trip-log-down-grid>.trip-log-down-category:last-child{border-right:0}
.trip-log-down-grid:has(>.trip-log-down-category:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
button.trip-log-down-effective{font-size:11px;padding:0}
button.trip-log-down-logged{width:100%;border-top:1px solid #718392;padding:10px 12px;font-size:12px;color:#d0d9e1}
.trip-log-settings-checks label.is-shortcut-updated{animation:trip-log-check-updated 700ms ease-in-out 2;border-radius:4px}
@keyframes trip-log-check-updated{50%{background:color-mix(in srgb,var(--wm-blue-light) 25%,transparent);box-shadow:0 0 0 2px var(--wm-blue-light)}}
@media(prefers-reduced-motion:reduce){.trip-log-settings-checks label.is-shortcut-updated{animation:none;outline:2px solid var(--wm-blue-light);outline-offset:2px}}
.trip-log-shortcut-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

#tripLogSubmenu>.trip-log-range-help{padding:12px;font-size:13px;line-height:1.45;}
#tripLogSubmenu>.trip-log-range-help h3{font-size:16px;}
#tripLogOpenButton{width:100%;}

/* Trip Log row icons use the normal column; custom help spans both columns. */
#tripLogSubmenu { --trip-log-menu-icon-center:35px; }
.trip-menu-group #tripLogSubmenu > .trip-log-range-menu[data-menu-icon]::before {
    inset-inline-start:calc(var(--trip-log-menu-icon-center) - 79px);
}
#tripLogSubmenu > [data-menu-layout="custom"] { min-width:0; box-sizing:border-box; }
.trip-menu-group:has(> #tripLogSubmenu:not([hidden]))::before { display:none; }

/* Centered action captions and help share one compact icon column. */
.main-menu #tripLogSubmenu > :is(#tripLogReturnActiveButton,#tripLogOpenButton) {
    position:relative;
    display:block;
    width:calc(100% - 24px);
    min-height:42px;
    margin:8px 12px 12px;
    padding:10px 51px;
    border:1px solid currentColor;
    border-radius:8px;
    background:rgb(255 255 255 / 10%);
    text-align:center;
    font-size:16px;
    font-weight:600;
    line-height:1.3;
}
.main-menu #tripLogSubmenu > :is(#tripLogReturnActiveButton,#tripLogOpenButton)[hidden] { display:none; }
.main-menu #tripLogSubmenu > :is(#tripLogReturnActiveButton,#tripLogOpenButton)::before {
    position:absolute;
    width:20px;
    height:20px;
    inset-inline-start:calc(50% - var(--hamburger-menu-centered-caption-width,140px) / 2 - 32px);
    top:50%;
    transform:translateY(-50%);
}
#tripLogHistoricalRange { width:100%; box-sizing:border-box; text-align:center; justify-content:center; }
#tripLogHistoricalRange > span { display:block; width:100%; }
#tripLogSubmenu > .trip-log-range-help h3 { position:relative; }
#tripLogSubmenu > .trip-log-range-help .trip-log-range-help-title { position:static; }
#tripLogSubmenu > .trip-log-range-help .trip-log-range-info {
    right:auto;
    left:calc(50% - var(--hamburger-menu-centered-caption-width,140px) / 2 - 32px);
}

/* Every shared dialog respects the live Mic Bar boundary, including Profile. */
shared-modal-host > dialog:not(.number-pad-dialog) {
    box-sizing:border-box;
    min-height:0;
    max-height:max(0px,calc(var(--shared-modal-safe-height,100dvh) - 16px));
}
shared-modal-host > dialog:not(.number-pad-dialog):not(.login-dialog) {
    bottom:calc(100dvh - var(--shared-modal-safe-height,100dvh) + 8px);
}

/* Use the host's preferred size once; the iframe already excludes the Mic Bar. */
shared-modal-host > dialog.graphical-dialog {
    height:min(90dvh,calc(var(--shared-modal-safe-height,100dvh) - 16px));
}
.settings-embedded .graphical-dialog {
    min-height:0;
    height:min(calc(var(--graphical-host-viewport-height,100dvh) * .9),100dvh);
    max-height:100dvh;
}

/* Tabbed Clock/Timer settings: opaque, separate panes; only pane content scrolls. */
.graphical-dialog .graphical-settings-grid {
    display:grid;grid-template-rows:auto minmax(0,1fr);align-items:stretch;gap:8px;
    padding:10px 12px;overflow:hidden;min-height:0;
}
.graphical-tabs {display:grid;gap:6px;background:transparent;}
.graphical-tab-row {display:flex;gap:6px;background:transparent;}
.graphical-tab-row > button {
    flex:1;min-width:0;min-height:42px;padding:7px 5px;
    border:1px solid #7893ab;border-radius:8px;background:hsl(210 28% 25%);
    color:#edf3f8;font-family:inherit;font-weight:600;font-size:16px;line-height:1.2;box-shadow:none;
}
.graphical-tab-row > button[aria-selected="true"] {
    background:hsl(210 28% 37%);border-color:#a9ddf7;box-shadow:inset 0 -3px #a9ddf7;
}
.graphical-preview-tabs > button {background:hsl(210 65% 25%);}
.graphical-preview-tabs > button[aria-selected="true"] {background:hsl(210 65% 36%);}
.graphical-tab-panes {position:relative;align-self:stretch;box-sizing:border-box;height:100%;min-height:0;overflow:hidden;border:1px solid #637e92;border-radius:8px;background:#152d40;}
.graphical-dialog .graphical-tab-panel[hidden] {display:none!important;}
.graphical-dialog .graphical-tab-panel {
    box-sizing:border-box;position:relative;inset:auto;height:100%;min-height:0;min-width:0;
    border:0;border-radius:0;margin:0;padding:12px;background:#1c3548;box-shadow:none;
    overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-gutter:stable;
}
.graphical-dialog .graphical-tab-panel > .settings-category-content {padding:0;}
.graphical-dialog .clock-preview.graphical-tab-panel {
    display:grid;grid-template-rows:minmax(0,1fr);place-items:stretch;aspect-ratio:auto;pointer-events:auto!important;
    padding:35px 8px 8px;background:#152d40;overflow:hidden;scrollbar-gutter:auto;
}
.graphical-dialog .clock-preview.graphical-tab-panel clock-timer {
    width:100%;height:100%;inline-size:100%;block-size:100%;min-height:0;min-width:0;
    aspect-ratio:auto;opacity:1;transition:none;will-change:auto;
    --clock-timer-face-background-color:#152d40;
    --clock-timer-active-ring-background-color:#152d40;
}
.graphical-dialog .preview-legend-button,
.graphical-dialog:not(.show-setting-help) .preview-legend-button {
    position:absolute;top:7px;right:9px;width:26px;height:26px;min-height:0;
    display:grid!important;place-items:center;visibility:visible;pointer-events:auto;
    padding:0;margin:0;border:1px solid #a9ddf7;border-radius:50%;
    background:#0053e2;color:white;font-size:18px;line-height:1;z-index:2;
}
.graphical-preview-legend {
    box-sizing:border-box;position:fixed;inset:0;margin:auto;transform:none;
    width:min(340px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;
    background:#253e52!important;color:#fff;border:1px solid #a9ddf7;border-radius:10px;padding:12px;
}
.graphical-preview-legend .settings-help-header {
    box-sizing:border-box;padding:12px;border-radius:8px;margin-bottom:12px;
}
.preview-legend-row {display:grid;grid-template-columns:24px minmax(0,1fr) 44px;align-items:center;gap:10px;min-height:44px;font-size:15px;}
.preview-legend-row.without-toggle > label {grid-column:2;}
.preview-legend-row > label {min-width:0;line-height:1.2;}
.preview-legend-row > input[type=checkbox] {width:20px;height:20px;margin:0;accent-color:#a9ddf7;}
.preview-legend-row > input[type=color] {box-sizing:border-box;width:44px;height:32px;padding:2px;border:1px solid #a9ddf7;border-radius:5px;background:#172b3b;cursor:pointer;}
html[data-seasonal-theme="halloween"] .graphical-tab-row > button {background:#49351f;color:#fff5e2;border-color:#a77e48;}
html[data-seasonal-theme="halloween"] .graphical-preview-tabs > button {background:#704013;}
html[data-seasonal-theme="halloween"] .graphical-tab-row > button[aria-selected="true"] {background:#8b571f;border-color:#ffd966;box-shadow:inset 0 -3px #ffd966;}
html[data-seasonal-theme="halloween"] .graphical-tab-panes,
html[data-seasonal-theme="halloween"] .graphical-dialog .graphical-tab-panel {background:#211910;color:#fff5e2;}
html[data-seasonal-theme="halloween"] .graphical-dialog .clock-preview clock-timer {--clock-timer-face-background-color:#211910;--clock-timer-active-ring-background-color:#211910;}
html[data-seasonal-theme="halloween"] .graphical-preview-legend {background:#302416!important;color:#fff5e2;border-color:#ffd966;}

/* The preview toolbar shares the draft Timer Type and leaves room for its legend. */
.graphical-dialog .clock-preview.graphical-tab-panel {
    grid-template-rows:auto minmax(0,1fr);padding:8px;gap:8px;
}
.preview-controls {min-width:0;padding-right:36px;}
.graphical-dialog .preview-controls > label {
    display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;
    gap:8px;margin:0;font-size:14px;line-height:1.2;
}
.graphical-dialog .preview-controls select {
    box-sizing:border-box;min-width:0;width:100%;height:36px;min-height:36px;
    padding:4px 6px;font-size:14px;
}

/* Retain recorded Down details while distinguishing time excluded by the policy. */
.trip-log-downtime.is-not-applied,.trip-log-down-section.is-not-applied {background:#25313a;color:#9ca7af;}
.trip-log-downtime.is-not-applied .trip-log-downtime-approved {color:inherit;}
.trip-log-down-button.is-not-applied {background:#25313a;color:#9ca7af;border-color:#68737c;}
#includePendingDownTimeButton.is-overridden>[data-language-id] {text-decoration:line-through;opacity:.65;}
html[data-seasonal-theme=halloween] .trip-log-downtime.is-not-applied,
html[data-seasonal-theme=halloween] .trip-log-down-section.is-not-applied,
html[data-seasonal-theme=halloween] .trip-log-down-button.is-not-applied {background:#29251f;color:#b6ac9d;}

.trip-log-entry.is-not-applied {background:#25313a;color:#b6c0c8;border-radius:5px;}
.trip-editor-accounting-cell.is-not-applied {background:#25313a;color:#b6c0c8;border-color:#68737c;}
html[data-seasonal-theme=halloween] .trip-editor-accounting-cell.is-not-applied,
html[data-seasonal-theme=halloween] .trip-log-entry.is-not-applied {background:#29251f;color:#c1b6a6;}

/* Down labels navigate without changing the timeline's time-column layout. */
.trip-log-down-edit {display:inline-flex;align-items:center;gap:inherit;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:inherit;cursor:pointer;touch-action:manipulation;}
.trip-log-down-edit:hover,.trip-log-down-edit:focus-visible {text-decoration:underline;text-underline-offset:3px;}
.trip-log-down-edit:focus-visible {outline:2px solid currentColor;outline-offset:3px;border-radius:3px;}
.trip-log-hidden-finalized {padding:12px;text-align:center;border-bottom:1px solid #7e8f9a;color:inherit;}

[data-down-ledger-edit],.trip-editor-down-summary[role="button"] {cursor:pointer;touch-action:manipulation;}
[data-down-ledger-edit]:focus-visible,.trip-editor-down-summary[role="button"]:focus-visible {outline:2px solid currentColor;outline-offset:2px;}
/* Semantic timeline and Down accounting: backgrounds remain theme-owned. */
.trip-log-timeline,.trip-editor-timeline {position:relative;isolation:isolate;}
.trip-log-timeline>.trip-log-entry::before,.trip-log-timeline>.trip-log-entry:not(:last-child)::after,.trip-editor-timeline>.trip-editor-card::before,.trip-editor-timeline>.trip-editor-card:not(:last-child)::after {content:none;}
.down-timeline-dot {position:absolute;box-sizing:border-box;width:14px;height:14px;border:2px solid var(--down-accent);border-radius:50%;background:var(--editor-bg,var(--wm-gray,#5f6772));z-index:2;pointer-events:none;}
.trip-log-entry>span:first-child {position:relative;}
.trip-log-entry>span:first-child .down-timeline-dot,.trip-log-interval-times>span>.down-timeline-dot {left:-24px;top:3px;}
.trip-editor-card>.down-timeline-dot {left:-24px;top:18px;}
.down-timeline-link {position:absolute;width:2px;pointer-events:none;z-index:0;}
.trip-log-entry.trip-log-consolidated-interval {padding:8px 0;min-height:78px;align-items:stretch;}
.trip-log-interval-times {display:flex;flex-direction:column;justify-content:space-between;gap:20px;font-variant-numeric:tabular-nums;}
.trip-log-interval-times>span {position:relative;white-space:nowrap;}
.trip-log-interval-times>small {font-size:10px;}
.trip-log-interval-caption {position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px;margin:8px 0;padding:0 0 0 12px;border-left:2px solid var(--down-accent);min-width:0;}
.trip-log-interval-caption::before,.trip-log-interval-caption::after {content:'';position:absolute;left:0;width:6px;border-top:2px solid var(--down-accent);}
.trip-log-interval-caption::before {top:0;}.trip-log-interval-caption::after {bottom:0;}
.trip-log-interval-caption-lines,.trip-log-interval-caption-lines>.trip-log-down-edit {display:grid;grid-template-columns:18px minmax(0,1fr);column-gap:6px;row-gap:3px;align-items:center;}
.trip-log-interval-caption-lines svg {width:18px;height:20px;fill:none;stroke:var(--down-accent);stroke-width:1.8;grid-row:1/3;align-self:center;}
.trip-log-interval-caption-lines>.trip-log-down-edit {grid-column:1/-1;}
.interval-net-adjustment {grid-column:2;font-size:.9em;color:inherit;}
.down-exclusion-badge {display:inline-block;align-self:flex-start;padding:2px 4px;font-size:9px!important;line-height:1.2;font-weight:600;white-space:nowrap;color:var(--wm-white,#fff)!important;border:1px solid var(--down-accent);border-radius:4px;background:rgb(0 0 0 / 12%);}
.down-excluded:not(.trip-log-interval-caption) {position:relative;border:1px solid var(--down-accent);border-radius:7px;overflow:hidden;padding-left:12px;}
.down-excluded:not(.trip-log-interval-caption)::before {content:'';position:absolute;top:0;bottom:0;left:0;width:6px;background:repeating-linear-gradient(135deg,var(--down-accent) 0 3px,transparent 3px 6px);pointer-events:none;}
.down-excluded[data-exclusion=mixed]::before {background:repeating-linear-gradient(45deg,var(--down-accent) 0 3px,transparent 3px 6px);}
.trip-log-downtime.down-excluded {margin-left:0;margin-right:0;box-sizing:border-box;}
.trip-log-overview+.trip-log-downtime.down-excluded {width:calc(100% - 24px);margin-left:12px;margin-right:12px;}
.trip-log-downtime.down-excluded .down-exclusion-badge {flex:none;}
.trip-log-downtime.is-not-applied,.trip-log-down-section.is-not-applied {background:revert;color:inherit;}
.trip-log-downtime .trip-log-downtime-approved {color:inherit;}
.trip-log-down-grid>.trip-log-down-category.down-excluded {padding:6px 5px 6px 12px;border:1px solid var(--down-accent);}
.trip-log-down-category {color:inherit;}
.down-accounting-normal>.trip-editor-accounting-cell {border:0;background:transparent;}
.down-accounting-normal>.trip-editor-accounting-cell+.trip-editor-accounting-cell {border-left:1px solid var(--editor-border);}
.down-accounting-normal.meets-rounded-section {border-right:0;border-radius:7px 0 0 7px;}
.down-accounting-normal.meets-rounded-section::before,.down-accounting-normal.meets-rounded-section::after {content:'';position:absolute;left:100%;width:7px;border-top:1px solid var(--editor-border);pointer-events:none;}
.down-accounting-normal.meets-rounded-section::before {top:-1px;}.down-accounting-normal.meets-rounded-section::after {bottom:-1px;}
.trip-editor-accounting-cell.is-deficit>strong {color:inherit;}
.trip-editor-accounting-cell .down-exclusion-badge {font-size:8px!important;}
.trip-editor-down-accounting .trip-editor-approval {color:inherit;}
.trip-log-timeline>.trip-log-entry.is-active-entry::after {content:'';position:absolute;inset:0;width:auto;height:auto;z-index:-1;pointer-events:none;}
.trip-log-downtime.is-not-applied {background:transparent;color:inherit;}
.trip-log-down-section.is-not-applied {background:#27333e;color:inherit;}
.trip-log-down-section .trip-log-down-category[data-range-color] {color:var(--wm-white,#fff);}
.down-accounting-shared-edge>.trip-editor-accounting-cell.down-excluded {border:0;border-radius:0;background:var(--editor-bg);padding:5px 2px;overflow:visible;}
.down-accounting-shared-edge>.trip-editor-accounting-cell.down-excluded::before {content:none;}
.down-accounting-shared-edge>.trip-editor-accounting-cell+.trip-editor-accounting-cell {border-left:1px solid var(--down-accent);}
.down-accounting-strip .trip-editor-accounting-cell>small:not(.down-exclusion-badge) {white-space:nowrap;}
.down-accounting-strip .down-exclusion-badge {padding:2px 3px;font-size:clamp(6px,1.85vw,8px)!important;}
.trip-editor-toolbar::before {box-sizing:border-box;width:14px;height:14px;left:-23px;border-width:2px;}
.down-accounting-strip.trip-editor-down-accounting {display:flex;flex-direction:column;gap:7px;border:0;border-radius:0;overflow:visible;}
.down-accounting-row {display:flex;width:100%;min-width:0;}
.down-accounting-row>* {box-sizing:border-box;min-width:0;flex:0 0 calc(100% * var(--cell-share,1) / var(--row-columns));}
.down-accounting-row>.down-accounting-normal,.down-accounting-row>.down-accounting-shared-edge {position:relative;display:flex;min-width:0;}
.down-accounting-row>.down-accounting-normal>*,.down-accounting-row>.down-accounting-shared-edge>* {box-sizing:border-box;min-width:0;flex:1 1 0;width:0;}
.down-accounting-row>.down-accounting-normal {border:1px solid var(--editor-border);border-radius:7px;}
.down-accounting-normal.meets-rounded-section {border-right:0;border-radius:7px 0 0 7px;}
.down-accounting-row>.down-accounting-shared-edge {padding:0!important;}
.down-accounting-shared-edge>.trip-editor-accounting-cell:first-child {padding-left:8px;}
.down-accounting-row>.trip-editor-accounting-cell.down-excluded {padding-left:8px;padding-right:2px;border:1px solid var(--down-accent);border-radius:7px;background:var(--editor-bg);}
.trip-log-downtime-overview.down-excluded {box-sizing:border-box;width:calc(100% - 24px);margin-left:12px;margin-right:12px;}
.down-accounting-shared-edge {border:0!important;border-radius:7px;overflow:hidden;}
.down-accounting-shared-edge>.trip-editor-accounting-cell.down-excluded {border-top:1px solid var(--down-accent);border-bottom:1px solid var(--down-accent);}
.down-accounting-shared-edge>.trip-editor-accounting-cell:first-child {border-left:1px solid var(--down-accent);}
.down-accounting-shared-edge>.trip-editor-accounting-cell:last-child {border-right:1px solid var(--down-accent);}
.trip-editor-down-summary .trip-editor-accounting-cell>strong {font-size:clamp(10px,2.8vw,13px);}
.down-accounting-row>.down-accounting-normal>*,.down-accounting-row>.down-accounting-shared-edge>* {flex:0 0 calc(100% / var(--group-columns));width:auto;}
.down-excluded:not(.trip-log-interval-caption)::before {z-index:1;}
.trip-log-group.has-only-hidden-trips>summary::before {content:none;}
.trip-log-group.has-only-hidden-trips>summary {list-style:none;}
.trip-log-day-hidden-finalized {margin:8px 12px 12px;padding:8px;color:inherit;text-align:left;font-size:13px;}
.mode-dropdown.is-auto-goals .auto-scope-choice {padding-block:var(--auto-row-padding,10px);min-height:var(--auto-row-height,60px);}
.mode-dropdown.is-auto-goals .auto-column-head {padding-block:min(9px,var(--auto-row-padding,9px));}
.mode-dropdown .auto-target-columns {grid-template-columns:28px 64px minmax(0,1fr);column-gap:10px;}
.mode-dropdown .auto-column-goal {text-align:center;}.mode-dropdown .auto-column-target {text-align:left;}
.mode-dropdown .auto-target-choice {min-height:var(--auto-row-height,56px);padding-block:var(--auto-row-padding,8px);}
.mode-dropdown .auto-target-choice.has-target-lock {background:color-mix(in srgb,var(--wm-blue-light) 12%,transparent);border-color:var(--wm-blue-light);}
.mode-dropdown .auto-target-choice .auto-override-check {justify-self:center;}
.mode-dropdown .auto-goal-value {display:flex;align-items:center;justify-content:center;gap:1px;width:100%;min-width:0;min-height:32px;padding:3px 2px;border:1px solid var(--wm-blue-light);border-radius:5px;background:color-mix(in srgb,var(--wm-blue-light) 8%,transparent);font:inherit;font-weight:700;color:inherit;white-space:nowrap;}
.mode-dropdown .auto-goal-value::before {content:none;}
.mode-dropdown .auto-aggregate-select {width:100%;min-width:0;min-height:32px;padding:4px 20px 4px 6px;font:inherit;font-weight:700;color:inherit;background:color-mix(in srgb,var(--wm-blue-light) 10%,var(--wm-blue-dark));border:1px solid var(--wm-blue-light);border-radius:5px;}
.mode-dropdown .auto-aggregate-select option {background:var(--wm-blue-dark);color:var(--wm-white);}

/* Auto target drafts use explicit theme-colored confirmation controls. */
.mode-dropdown.is-auto-goals .auto-pane-head {margin:-6px -6px 0;padding:10px 12px;background:var(--wm-blue-light);color:var(--wm-blue-dark);border-bottom:2px solid color-mix(in srgb,var(--wm-blue-light) 65%,white);}
.mode-dropdown.is-auto-goals .auto-pane-head strong,.mode-dropdown.is-auto-goals .auto-pane-back {color:inherit;}
.mode-dropdown .auto-pane-actions {position:sticky;bottom:-6px;display:flex;gap:10px;margin:8px -6px -6px;padding:10px 12px;background:color-mix(in srgb,var(--wm-blue-light) 18%,var(--wm-blue-dark));border-top:1px solid var(--wm-blue-light);z-index:2;}
.mode-dropdown .auto-pane-actions button {flex:1;min-width:0;width:auto;min-height:36px;border:1px solid var(--wm-blue-light);border-radius:6px;font:inherit;font-size:14px;font-weight:bold;text-align:center;justify-content:center;padding:6px;}
.mode-dropdown .auto-pane-actions button::before {content:none;}
.mode-dropdown .auto-pane-cancel {background:var(--wm-blue-dark);color:var(--wm-blue-light);}
.mode-dropdown .auto-pane-ok {background:var(--wm-blue-light);color:var(--wm-blue-dark);}

.mode-dropdown .auto-standard-goal {display:block;text-align:center;font-weight:700;color:inherit;border:0;background:transparent;cursor:default;}

html:not([data-seasonal-theme="halloween"]) .mode-dropdown.is-auto-goals {--wm-blue-light:#a9ddf7;--wm-blue-dark:#001e60;background:#001e60;border-color:#8193ac;}
html:not([data-seasonal-theme="halloween"]) .mode-dropdown.is-auto-goals .auto-pane-head {background:#596775;color:white;border-bottom-color:#8193ac;}
html:not([data-seasonal-theme="halloween"]) .mode-dropdown.is-auto-goals .auto-pane-actions {background:#263b61;border-top-color:#8193ac;}
html:not([data-seasonal-theme="halloween"]) .mode-dropdown.is-auto-goals .auto-pane-actions button {border-color:#8193ac;}
html:not([data-seasonal-theme="halloween"]) .mode-dropdown.is-auto-goals .auto-pane-ok {background:#304e7a;color:#a9ddf7;}
html:not([data-seasonal-theme="halloween"]) .mode-dropdown.is-auto-goals :is(.auto-aggregate-select,.auto-goal-value) {background:#20375e;border-color:#8193ac;}

/* Only the drawn node shape and its info rectangle participate in node gestures. */
.goal-bar-svg .goal-bar-node {pointer-events:none;cursor:default;}
.goal-bar-svg .goal-bar-node .goal-bar-marker {pointer-events:auto;cursor:pointer;}
.goal-bar-svg .goal-bar-node .goal-bar-info-hit {pointer-events:auto;cursor:pointer;}
.goal-bar-svg .goal-bar-node :is(.goal-bar-glyph,.goal-bar-time,.goal-bar-percent,.goal-bar-target-frame,.goal-bar-value-ghost) {pointer-events:none;}
.goal-bar-svg .goal-bar-node[aria-hidden="true"] * {pointer-events:none!important;}

.goal-bar-svg .goal-bar-node.is-current * {pointer-events:none!important;cursor:default;}

.goal-bar-svg .goal-bar-node[data-node-id="standard"] .goal-bar-marker {pointer-events:none;cursor:default;}

.goal-bar-pin-badge {fill:var(--wm-blue-dark,#001e60);stroke:var(--wm-blue-light,#a9ddf7);stroke-width:1.5;}

/* Sync is committed by choosing an aggregate; no dismiss/action footer. */
.sync-aggregate-dialog {width:min(380px,calc(100vw - 32px));box-sizing:border-box;padding:0;border:1px solid var(--wm-blue-light);border-radius:14px;background:var(--wm-blue-dark);color:var(--wm-white);overflow:auto;}
.sync-aggregate-dialog .dialog-header {margin:0;padding:16px 20px;background:var(--wm-gray,#5f6772);border-bottom:1px solid rgb(255 255 255 / 28%);justify-content:center;}
.sync-aggregate-dialog .dialog-header h2 {margin:0;text-align:center;font-size:26px;}
#syncAggregatePrompt {margin:18px 16px 14px;text-align:center;font-size:16px;line-height:1.4;}
.sync-aggregate-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 16px 18px;}
.sync-aggregate-choices button {position:relative;min-width:0;min-height:64px;padding:12px 22px;border:1px solid rgb(169 221 247 / 55%);border-radius:9px;background:#163c73;color:var(--wm-white);font-size:21px;font-weight:600;text-align:center;}
.sync-aggregate-choices button[aria-pressed="true"] {background:#255480;border-color:var(--wm-blue-light);color:var(--wm-blue-light);}
.sync-aggregate-choices button[aria-pressed="true"]::before {content:'✓';position:absolute;left:9px;top:50%;transform:translateY(-50%);font-size:17px;}
.sync-aggregate-choices button:focus-visible {outline:2px solid var(--wm-blue-light);outline-offset:3px;}
.sync-aggregate-error {margin:0 16px 18px;color:var(--wm-white);}
html[data-seasonal-theme="halloween"] .sync-aggregate-choices button {background:#382717;border-color:#b47a36;}
html[data-seasonal-theme="halloween"] .sync-aggregate-choices button[aria-pressed="true"] {background:#5b3815;border-color:#ffd166;color:#ffd166;}

.sync-custom-dates {margin:0 16px 18px;padding:16px 0 0;border-top:1px solid rgb(169 221 247 / 50%);}
.sync-custom-dates[hidden] {display:none;}
.sync-custom-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#syncCustomDates .sync-custom-fields label {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;text-align:left;color:var(--wm-white);font-size:15px;}
#syncCustomDates input {display:block;width:100%;min-width:0;min-height:44px;box-sizing:border-box;padding:10px 7px;border:1px solid rgb(169 221 247 / 50%);border-radius:7px;background:#163c73;color:var(--wm-white);color-scheme:dark;font:16px Arial,sans-serif;}
#syncCustomDates input[aria-invalid="true"] {border-color:#ff8d8d;outline:1px solid #ff8d8d;}
#syncCustomDates p {margin:14px 0 0;font-size:14px;text-align:center;font-weight:400;line-height:1.4;color:var(--wm-white);}
html[data-seasonal-theme="halloween"] #syncCustomDates input {background:#382717;border-color:#b47a36;}

/* HTML goal bar: CSS owns paint and hit contours; JS supplies positions and state. */
.goal-bar-elements {
    --goal-label-family:Arial,sans-serif;--goal-label-weight:700;
    --goal-node-border-width:2px;--goal-info-border-width:1.5px;--goal-info-radius:5px;
    --goal-track-border-width:2.5px;--goal-marker-fill:#001e60;
    --goal-trip-ink:#ffc220;--goal-total-ink:#55d5fb;--goal-label-ink:#fff;
    --goal-annotation-ink:#c6def5;--goal-phase-color:var(--timer-trip-color,#0053e2);
    isolation:isolate;user-select:none;-webkit-user-select:none;
}
.goal-bar-elements[data-phase="overtime"] {--goal-phase-color:var(--timer-overtime-color,#ff5c5c);}
.goal-bar-elements[data-phase="b-game"] {--goal-phase-color:var(--timer-tolerance-color,#2e7d32);}
.goal-bar-elements .goal-bar-rect {position:absolute;left:var(--bar-x,0px);top:var(--bar-y,0px);width:var(--bar-width,0px);height:var(--bar-height,0px);border-radius:var(--bar-radius,0px);box-sizing:border-box;}
.goal-bar-elements .goal-bar-track {background:var(--goal-marker-fill);}
.goal-bar-elements .goal-bar-fill {background:var(--timer-trip-color,#0053e2);}
.goal-bar-elements[data-all-failed="true"] .goal-bar-fill {background:var(--goal-phase-color);}
.goal-bar-elements .goal-bar-segment {background:var(--goal-phase-color);}
.goal-bar-elements[data-down="true"] .goal-bar-segment,.goal-bar-elements[data-down="true"][data-all-failed="true"] .goal-bar-fill {background:var(--timer-down-color,#5f6772);}
.goal-bar-elements .goal-bar-outline {left:calc(var(--bar-x) - var(--goal-track-border-width)/2);top:calc(var(--bar-y) - var(--goal-track-border-width)/2);width:calc(var(--bar-width) + var(--goal-track-border-width));height:calc(var(--bar-height) + var(--goal-track-border-width));border:var(--goal-track-border-width) solid #fff;pointer-events:none;}
.goal-bar-elements :is(.goal-bar-nodes,.goal-bar-connectors,.goal-bar-scale-ticks) {position:absolute;inset:0;pointer-events:none;}
.goal-bar-elements .goal-bar-scale-ticks {clip-path:inset(var(--tick-clip-top) var(--tick-clip-right) var(--tick-clip-bottom) var(--tick-clip-left) round var(--tick-clip-radius));}
.goal-bar-elements .goal-bar-scale-tick {position:absolute;left:0;top:0;translate:-50% -50%;width:1px;height:var(--goal-tick-height);background:#fff;pointer-events:none;}
.goal-bar-elements :is(.goal-bar-node,.goal-bar-marker-group,.goal-bar-value-stack,.goal-bar-value-ghost) {position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;}
.goal-bar-elements .goal-bar-node {--goal-node-color:var(--goal-label-ink);--goal-node-paint:var(--goal-node-color);}
.goal-bar-elements .goal-bar-node[data-node-id="trip"] {--goal-node-color:var(--goal-trip-ink);}
.goal-bar-elements .goal-bar-node[data-node-id="total"] {--goal-node-color:var(--goal-total-ink);}
.goal-bar-elements .goal-bar-node[data-merged="true"] {--goal-node-paint:linear-gradient(90deg,var(--goal-trip-ink) 30%,var(--goal-total-ink) 70%);}
.goal-bar-elements .goal-bar-node .goal-bar-marker {
    position:absolute;left:calc(-1 * var(--goal-marker-half-width));top:calc(-1 * var(--goal-marker-outer-radius));
    width:calc(2 * var(--goal-marker-half-width));height:calc(2 * var(--goal-marker-outer-radius));
    clip-path:var(--goal-node-shape);background:var(--goal-node-paint);pointer-events:auto;cursor:pointer;touch-action:manipulation;
    transition:clip-path 360ms ease-in-out,width 360ms ease-in-out,left 360ms ease-in-out;
}
.goal-bar-elements .goal-bar-marker::after {content:'';position:absolute;inset:0;background:var(--goal-marker-fill);clip-path:var(--goal-node-inner-shape);pointer-events:none;}
.goal-bar-elements .goal-bar-node[data-node-id="standard"] .goal-bar-marker {left:-1px;top:calc(-1 * var(--goal-marker-half-line));width:2px;height:calc(2 * var(--goal-marker-half-line));background:repeating-linear-gradient(to bottom,var(--goal-label-ink) 0 3px,transparent 3px 6px);clip-path:none;pointer-events:none;}
.goal-bar-elements .goal-bar-node.is-current .goal-bar-marker {left:-4px;top:calc(-1 * var(--goal-marker-half-line));width:8px;height:calc(2 * var(--goal-marker-half-line));background:linear-gradient(to right,var(--goal-label-ink) 0 2px,transparent 2px 6px,var(--goal-label-ink) 6px 8px);clip-path:none;pointer-events:none;}
.goal-bar-elements .goal-bar-node:is(.is-current,[data-node-id="standard"]) .goal-bar-marker::after {display:none;}
.goal-bar-elements .goal-bar-node .goal-bar-info-hit {border-radius:calc(var(--goal-info-radius) + var(--goal-info-border-width)/2);clip-path:inset(0 round calc(var(--goal-info-radius) + var(--goal-info-border-width)/2));background:transparent;pointer-events:auto;cursor:pointer;touch-action:manipulation;}
.goal-bar-elements .goal-bar-target-frame {border-radius:calc(var(--goal-info-radius) + var(--goal-info-border-width)/2);pointer-events:none;}
.goal-bar-elements .goal-bar-target-frame::before {content:'';position:absolute;inset:0;border-radius:inherit;padding:var(--goal-info-border-width);box-sizing:border-box;background:var(--goal-node-paint);mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;}
.goal-bar-elements .goal-bar-node[data-auto-locked="true"] .goal-bar-target-frame::before {background:var(--wm-blue-light,#a9ddf7);}
.goal-bar-elements .goal-bar-text {position:absolute;left:0;display:block;width:max-content;max-width:none;height:auto;margin:0;padding:0;border:0;translate:-50% -80%;white-space:pre;line-height:1;font-family:var(--goal-label-family);font-size:var(--goal-label-size,14px);font-weight:var(--goal-label-weight);font-variant-numeric:tabular-nums;color:var(--goal-label-ink);pointer-events:none;}
.goal-bar-elements .goal-bar-glyph {font-size:calc(var(--goal-marker-radius) * 1.15);}
.goal-bar-elements .goal-bar-text:empty {display:none;}
.goal-bar-elements .goal-bar-glyph[data-goal-id="trip"] {color:var(--goal-trip-ink);}
.goal-bar-elements .goal-bar-glyph[data-goal-id="total"] {color:var(--goal-total-ink);}
.goal-bar-elements .goal-bar-zero {font-size:10px;font-weight:400;color:var(--goal-annotation-ink);}
.goal-bar-elements .goal-bar-probe {visibility:hidden;pointer-events:none;}
.goal-bar-elements .goal-bar-accessible-title {display:none;}
.goal-bar-elements .goal-bar-connector {position:absolute;height:1px;transform-origin:0 0;background:var(--goal-annotation-ink);opacity:.65;pointer-events:none;}
.goal-bar-elements .goal-bar-compression {position:absolute;left:0;top:0;translate:-50% -50%;width:13px;height:14px;background:var(--goal-annotation-ink);pointer-events:none;}
.goal-bar-elements .goal-bar-compression-left {clip-path:polygon(100% 0,0 50%,100% 100%);}
.goal-bar-elements .goal-bar-compression-right {clip-path:polygon(0 0,100% 50%,0 100%);}
.goal-bar-elements .goal-bounding-marker {position:absolute;left:-5px;top:-5px;width:10px;height:8px;clip-path:polygon(0 100%,50% 0,100% 100%);background:var(--goal-label-ink);pointer-events:none;}
.goal-bar-elements .goal-bar-override-pin {position:absolute;left:-11px;top:-11px;width:22px;height:22px;box-sizing:border-box;border:1.5px solid var(--wm-blue-light,#a9ddf7);border-radius:5px;background:var(--goal-marker-fill);color:var(--wm-blue-light,#a9ddf7);pointer-events:none;}
.goal-bar-elements .goal-bar-pin-icon {position:absolute;inset:3px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 2h8l-1 7 4 5H5l4-5Zm4 12v9' transform='rotate(35 12 12)' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;}
.goal-bar-elements .goal-bar-avatar-overlay {position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;}
.goal-bar-elements .goal-bar-node.is-current *,.goal-bar-elements .goal-bar-node[aria-hidden="true"] * {pointer-events:none!important;}
@media(prefers-reduced-motion:reduce){.goal-bar-elements .goal-bar-marker {transition:none;}}
