/*
 * static/css/map.css — Styles for the interactive map page (/map/).
 *
 * Kept in a standalone stylesheet rather than @tailwindcss directives
 * because the selectors below target MapLibre internals and a custom
 * bottom-sheet that Tailwind can't express cleanly. Design tokens
 * (colour, type) still come from base.css / @theme — the locals below
 * are MapLibre-chrome-only.
 *
 * SNOW-35 removed the #frame phone-mock wrapper; the page now extends
 * public/base.html and the map fills the viewport minus the site nav.
 * SNOW-36 reintroduces search + save-offline as a floating utility
 * cluster pinned top-right (.map-utility-*). The legend selector is
 * retained for SNOW-38.
 */

:root {
    --paper: #f4f1e8;
    --ink: #1a1a1a;
    --muted: #5f5e5a;
    --border: rgba(0, 0, 0, 0.12);
    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

/* ——————————————————————————————————————————————————————————————
   Floating utility cluster (SNOW-36)
   Two frosted-glass pills pinned top-right: a search pill that
   expands in-place to reveal the existing combobox input, and a
   round "save offline" icon button. Safe-area insets respected so
   the pills never sit under the iOS notch / Dynamic Island.
   ——————————————————————————————————————————————————————————————*/

.map-utility-cluster {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    z-index: 4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.map-utility-pill {
    display: inline-flex;
    align-items: center;
    height: 40px;
    background: var(--color-glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 0.5px solid var(--color-border);
    border-radius: 999px;
    box-shadow: var(--shadow-glass);
    color: var(--color-text-1);
    padding: 0;
}

/* SNOW-79: ``.map-utility-pill--button`` (the round 40×40 "Save
   offline" icon button + its saving/saved/error data-state variants
   and the spin keyframe) was removed when the precache feature
   retired. No active call sites remain in the template. If a future
   ticket reintroduces an icon-only utility pill, recreate the rule
   then rather than carrying it as dead CSS. */

/* Basemap layer picker (SNOW-58) — round 40×40 pill that anchors a
   popover of basemap radio options. ``position: relative`` so the
   absolutely-positioned ``.basemap-menu`` tracks the pill rather than
   the cluster, which keeps the popover under the pill even after the
   search pill expands and shifts the layout. */
.map-utility-pill--basemap {
    position: relative;
    width: 40px;
    flex: 0 0 auto;
    justify-content: center;
}

.map-utility-pill--basemap:hover {
    filter: brightness(1.04);
}

.basemap-menu {
    position: absolute;
    top: 48px;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    min-width: 148px;
    background: var(--color-card);
    border: 0.5px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-glass);
    z-index: 5;
}

.basemap-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--color-text-1);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.basemap-menu-item::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: transparent;
    transition: background 120ms ease, border-color 120ms ease;
}

.basemap-menu-item[aria-checked="true"]::before {
    background: var(--color-accent, #0c447c);
    border-color: var(--color-accent, #0c447c);
    box-shadow: inset 0 0 0 2.5px var(--color-card);
}

.basemap-menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.basemap-menu-item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* SNOW-59: overlay section appended to the basemap popover. The
   separator + section label divide overlay checkboxes from the
   basemap radios above; checkbox glyphs are square rather than the
   round radio dot so the role distinction reads at a glance. */
.basemap-menu-separator {
    height: 1px;
    margin: 6px 8px;
    background: var(--color-border);
}

.basemap-menu-section-label {
    padding: 4px 12px 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-2, var(--color-text-1));
    pointer-events: none;
}

.basemap-menu-item--overlay::before {
    border-radius: 3px;
}

.basemap-menu-item--overlay[aria-checked="true"]::before {
    background: var(--color-accent, #0c447c);
    border-color: var(--color-accent, #0c447c);
    box-shadow: inset 0 0 0 2px var(--color-card);
}

/* Disabled overlay (Micro regions — required, can't be toggled). The
   tick still reads as "on" but the row signals it isn't actionable:
   not-allowed cursor, dimmed text, no hover highlight. */
.basemap-menu-item[disabled],
.basemap-menu-item[aria-disabled="true"] {
    color: var(--color-text-2, var(--color-text-1));
    opacity: 0.65;
    cursor: not-allowed;
}

.basemap-menu-item[disabled]:hover,
.basemap-menu-item[aria-disabled="true"]:hover {
    background: transparent;
}

/* Search pill — collapsed to a round 40×40 by default; on expansion
   grows to reveal the input beside the icon. */
.map-utility-pill--search {
    width: 40px;
    flex: 0 0 auto;
    overflow: hidden;
    transition: width 180ms cubic-bezier(0.32, 0.72, 0, 1);
}

.map-utility-pill--search[data-state="expanded"] {
    width: min(calc(100vw - 76px), 280px);
}

/* Transparent icon button inside the search pill — also the standalone
   click target when the pill is collapsed. */
.map-utility-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    cursor: pointer;
}

.map-utility-button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 999px;
}

/* Search input inside the expanded pill — hidden until the pill is
   in the expanded state. Width/opacity transition in sync with the
   pill's width transition so the reveal feels like one motion. */
.map-utility-pill--search .search-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    height: 40px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 14px;
    color: var(--color-text-1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease 60ms;
}

.map-utility-pill--search[data-state="expanded"] .search-input {
    width: auto;
    padding: 0 14px 0 2px;
    opacity: 1;
    pointer-events: auto;
}

.map-utility-pill--search .search-input::placeholder {
    color: var(--color-text-3);
}

/* Suppress the native clear-button "x" so the pill styling stays uniform. */
.map-utility-pill--search .search-input::-webkit-search-cancel-button,
.map-utility-pill--search .search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* Search-results dropdown — anchored below the cluster, right-aligned
   to it. Width caps at 320px on wide viewports and shrinks to fit
   narrow ones. Sits on top of everything that isn't the bottom sheet. */
.search-results {
    position: absolute;
    top: 48px;
    right: 0;
    width: min(calc(100vw - 24px), 320px);
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--color-card);
    border: 0.5px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-glass);
    max-height: 320px;
    overflow-y: auto;
    z-index: 5;
}

.search-result {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    border-bottom: 0.5px solid var(--border);
}

.search-result:last-child {
    border-bottom: 0;
}

.search-result:hover,
.search-result.active {
    background: #f2efe7;
}

.search-result-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-primary {
    font-size: 13px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-secondary {
    font-size: 11px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-badge {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: #ece8dc;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Region badge carries slightly more weight than resort — regions are
   the canonical map entity, resorts are labels that point at one. */
.search-result-badge--region {
    color: #0c447c;
    background: #e2ebf4;
}

.search-empty {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

#map {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    position: relative;
}

.hint {
    padding: 10px 12px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    border-top: 0.5px solid var(--border);
}

/* Collapsible danger-scale legend (SNOW-38) — bottom-left overlay,
   anchored above the season scrubber. The card is absolutely positioned
   relative to the container so toggling it does not reflow the page.
   Stacking: scrubber=2, legend=3, utility cluster=4. */

.map-legend {
    position: absolute;
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    /* 56px scrubber baseline + ~40px scrubber height + 12px gap.
       --sheet-offset is written by setSnap() / clearSheetDom() in map.js
       so the legend rises with the sheet rather than being covered by it. */
    bottom: calc(108px + env(safe-area-inset-bottom, 0px) + var(--sheet-offset, 0px));
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: bottom 260ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Always-visible date readout, styled to match the (i) toggle so the
   pair reads as one grouped control. Updated by static/js/map.js on
   snowdesk:date-changed (scrubber commits + timelapse frames) and on
   snowdesk:date-preview (live drag). */
.map-date-pill {
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    background: var(--color-glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 0.5px solid var(--color-border);
    border-radius: 999px;
    box-shadow: var(--shadow-glass);
    color: var(--color-text-1);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    white-space: nowrap;
    user-select: none;
}

.map-legend-toggle {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--color-glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 0.5px solid var(--color-border);
    border-radius: 999px;
    box-shadow: var(--shadow-glass);
    color: var(--color-text-1);
    cursor: pointer;
}

.map-legend-card {
    position: absolute;
    /* Anchor above the (i) toggle (the rightmost item in the flex row). */
    right: 0;
    bottom: 40px;            /* 32px button + 8px gap */
    min-width: 132px;
    padding: 8px 10px;
    background: var(--color-glass);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 0.5px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-glass);
    font-size: 11px;
    line-height: 1.5;
    color: var(--color-text-1);
    transform-origin: bottom right;
    opacity: 0;
    transform: translateY(4px) scale(0.98);
    pointer-events: none;
    transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.map-legend[data-state="expanded"] .map-legend-card {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.map-legend-title {
    font-weight: 500;
    color: var(--color-text-2);
    margin-bottom: 4px;
}

.map-legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-legend-swatch {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 2px;
    border: 0.5px solid rgba(0, 0, 0, 0.15);
}

.map-legend-swatch--low          { background: var(--color-eaws-low); }
.map-legend-swatch--moderate     { background: var(--color-eaws-moderate); }
.map-legend-swatch--considerable { background: var(--color-eaws-considerable); }
.map-legend-swatch--high         { background: var(--color-eaws-high); }

/* SNOW-78: legend pin matches the on-map resort circle paint — neutral
 * dark fill with a thin white stroke so it reads against any basemap or
 * EAWS rating fill. Smaller than the rating swatches so the pin looks
 * like a point of interest rather than a coloured area. */
.map-legend-pin {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #ffffff;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}

.maplibregl-ctrl-attrib {
    font-size: 9px !important;
}

/* Bottom sheet — iOS-style drawer with two snap states (SNOW-43).
 *
 * The sheet is always rendered at full ``--sheet-expanded-height``;
 * the visible state is selected via ``data-snap`` on the root element.
 *
 *   data-snap unset      → dismissed (translateY(100%) — fully off-screen)
 *   data-snap="peek"     → peek partial + a short tease of expanded body
 *   data-snap="expanded" → full body visible (hazard blocks + CTA)
 *
 * The peek snap height is set dynamically by JS once the peek partial
 * has been measured (peek content height + a small "tease" so a slice
 * of the first hazard block bleeds into the visible area — a genuine
 * peek at what's below). ``--sheet-peek-height`` is the fallback used
 * before content is loaded; JS overrides it on the sheet element.
 *
 * ``.dragging`` / ``.animating`` disable the CSS transition so the JS
 * controller can drive transform directly during gestures and release
 * animations.
 */

:root {
    --sheet-peek-height: 22vh;
    --sheet-expanded-height: 80vh;
}

.sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    background: #fff;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 0.5px solid var(--border);
    padding: 0;
    height: var(--sheet-expanded-height);
    transform: translateY(100%);
    transition: transform 260ms cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    user-select: none;
    display: flex;
    flex-direction: column;
    /*
     * touch-action: none on the sheet itself — we take over vertical
     * gestures. The scrollable inner body re-enables scroll locally.
     */
    touch-action: none;
}

.sheet[data-snap="peek"] {
    transform: translateY(
        calc(var(--sheet-expanded-height) - var(--sheet-peek-height))
    );
}

.sheet[data-snap="expanded"] {
    transform: translateY(0);
}

.sheet.dragging {
    transition: none;
}

.sheet.animating {
    /* JS drives the transform during release. */
    transition: none;
}

.sheet-grab {
    padding: 10px 14px 4px;
    cursor: grab;
    position: relative;
    flex: 0 0 auto;
}

.sheet-grab:active {
    cursor: grabbing;
}

.sheet-handle {
    width: 36px;
    height: 4px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 2px;
    margin: 0 auto;
}

.sheet-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: rgba(0, 0, 0, 0.6);
}

.sheet-close:hover {
    background: rgba(0, 0, 0, 0.09);
}

.sheet-close:focus-visible {
    outline: 2px solid #0c447c;
    outline-offset: 2px;
}

.sheet-body-wrap {
    padding: 6px 14px 14px;
    flex: 1 1 auto;
    overflow-y: auto;
    /*
     * Inner scrolling is allowed; the drag controller watches scrollTop
     * to decide whether a downward gesture should scroll the body or
     * drag the sheet.
     */
    touch-action: pan-y;
}

.sheet-title {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    padding-right: 36px;
}

.sheet-cta {
    display: block;
    margin-top: 14px;
    text-align: center;
    background: var(--ink);
    color: #fff;
    padding: 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

/* Region peek partial — the always-visible head shown at the peek
 * snap-point. Region name + danger chip on one row, optional one-line
 * summary below. The .danger-tile class comes from the global theme
 * (src/css/main.css) so the chip matches the rest of the bulletin UI.
 */

.region-peek {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.region-peek-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /* Reserve space for the close button so the title doesn't run under it. */
    padding-right: 36px;
}

/* Wraps the H2 and the bulletin deep-link glyph (SNOW-81) so they
 * cluster on the left of the peek header while the danger tile floats
 * to the right via the parent's space-between. */
.region-peek-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.region-peek-name {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    /* Take only the space the name needs so the bulletin glyph can sit
     * right next to it. The wrapping ``.region-peek-title`` row is the
     * one that grows to push the danger tile to the far right. */
    flex: 0 1 auto;
    min-width: 0;
    /* Truncate gracefully if a long name would otherwise push the icon
     * (and the danger tile) past the close-button gutter. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bulletin deep-link glyph — the reverse of the map-pin link in the
 * bulletin masthead, so navigation between the two surfaces is one
 * tap in either direction (SNOW-81). */
.region-peek-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--muted);
    text-decoration: none;
    /* 32px hit-target around the 18px glyph for finger-friendliness. */
    width: 32px;
    height: 32px;
    margin: -7px;
    border-radius: 6px;
    transition: color 80ms;
}

.region-peek-link:hover,
.region-peek-link:focus-visible {
    color: var(--ink);
}

.region-peek-link-icon {
    display: inline-block;
    color: inherit;
}

.region-peek-summary {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

/* Each "<chip> trait-title" pair stays together on one line; only the
 * middle-dot separator may break. Keeps level numbers stuck to their
 * scope line so they never end up orphaned at the start of a wrap. */
.region-peek-summary-trait {
    display: inline;
    white-space: nowrap;
}

.region-peek-summary-sep {
    color: var(--muted);
}

/* Debug-only readout — hidden unless the sheet carries .debug. */
.region-peek-debug-id {
    display: none;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 10px;
    color: #8a8880;
}

.sheet.debug .region-peek-debug-id {
    display: block;
}

/* Region expanded partial — full hazard blocks (one .rating-block per
 * trait, supplied by public/_rating_block.html) plus the open-bulletin
 * CTA. The .rating-block styling comes from the global theme.
 */

.region-expanded {
    display: flex;
    flex-direction: column;
    /* Tiny top margin separates the expanded body from the peek head when
     * both are visible at the expanded snap. */
    margin-top: 12px;
}

.region-expanded-empty {
    margin: 0 0 12px;
    padding: 14px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* SLF data-licence attribution — required by SNOW-30 on every surface
 * that renders bulletin content. Sits below the "Open full bulletin"
 * CTA so it never competes with the primary action; visible whenever
 * the sheet is at the expanded snap.
 */
.region-expanded-attribution {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 0.5px solid var(--border);
    font-size: 11px;
    color: var(--muted);
}

.region-expanded-attribution a {
    color: var(--muted);
    text-decoration: underline;
}

.region-expanded-attribution a:hover {
    color: var(--ink);
}

/* SNOW-79: ``.offline-cta`` (the "Save offline" full-width CTA that
   sat below the search field) was retired with the rest of the
   precache feature. Removed wholesale — no remaining call sites. */

/* Season scrubber — floating bottom-pinned pill (SNOW-37).
   The pill sits above MapLibre's attribution control (which stays pinned at
   bottom: 0 — legally required to remain visible). 44px is the height of the
   expanded attribution box; 12px is the gap between the two. */

.season-scrubber {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 0.5px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px;
    user-select: none;
}

.season-scrubber-bound {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    flex: 0 0 auto;
    color: var(--muted);
}

.season-scrubber-track {
    flex: 1 1 auto;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    position: relative;
    cursor: grab;
}

.season-scrubber-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    touch-action: none;
}

.season-scrubber-track.dragging {
    cursor: grabbing;
}

.season-scrubber-track.animating .season-scrubber-thumb {
    transition: left 200ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Inline play / stop button on the scrubber. Sits at the left edge as a
   filled dark circle echoing the thumb visual, so the scrubber reads as
   a single unified time-control surface. SVG state is swapped via the
   data-state attribute set by static/js/map.js. */
.scrubber-play {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.scrubber-play:hover {
    background: #000;
}

.scrubber-play[data-state="playing"] .scrubber-play-icon,
.scrubber-play[data-state="stopped"] .scrubber-stop-icon {
    display: none;
}

/* Speed cycler — sits to the right of the play button. Mirrors the play
   button's pill geometry but swaps the filled circle for an outlined
   capsule with the current multiplier as a numeric label. min-width
   keeps the layout stable as the label cycles 1× / 2× / 4× / ½×. */
.scrubber-speed {
    flex: 0 0 auto;
    height: 22px;
    min-width: 32px;
    margin: 0;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--ink);
    border: 0.5px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.scrubber-speed:hover {
    background: rgba(0, 0, 0, 0.05);
}
