/* 09-viewport-tools.css: index.html@cd3fd3f lines 604-735 (gizmo mode buttons, pilot banner, gizmo divider, selection badge, view buttons).
   06 T4a (06 3.5): role tokens. Gizmo and view buttons are overlay chips with 18 x 18 icons (the gizmo SVGs had no size
   rule and filled the 40 px button); an active tool is white with a Morph Black icon; the active pilot button and the
   pilot banner are Signal Red with white text or icon (5.98:1) and a 1 px Morph Black outline, so the red keeps a
   Morph Black neighbour over any scene content (3.31:1). That outline would replace the :focus-visible ring of
   03-layout.css (its selector is more specific), so while the active pilot button has keyboard focus the ring takes
   the outline and the Morph Black edge becomes a 1 px box-shadow. The selection badge is an opaque --color-surface-1
   chip (not the translucent overlay chip, on which red falls to 2.6:1 over a light wall) with a red left bar and the
   same outline, which lies outside the chip and changes no rect.
   B-L24 landed here in 06 T4a: the selection badge is stacked 12 px above the help badge of 07-viewport.css
   (bottom: 20px), so the two never overlap. It is anchored to the help badge (anchor name --help-badge): a fixed
   bottom: 64px overlapped it by 2 px wherever the help text wraps to two lines (windows below about 1073 px). With a
   one-line help badge the anchored value is exactly 64 px; bottom: 64px is also the fallback where anchor positioning
   is unsupported, and 52 px the fallback for a missing anchor. The other half of B-L24, the missing .view-btn.active rule,
   landed in 01 F1-2 (css/features/debug-view.css).
   Slice of the original <style>, rewritten to role tokens (css-slices.mjs --report-only lists the difference, 07 S7);
   link order = file number. Do not reorder rules across files. */
.gizmo-mode-btn {
    width: 40px;
    height: 40px;
    background: var(--color-surface-overlay);
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    color: var(--color-text-secondary);
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
}

.gizmo-mode-btn svg {
    width: 18px;
    height: 18px;
}

.gizmo-mode-btn:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}

.gizmo-mode-btn.active {
    background: var(--color-control-active-bg);
    border-color: var(--color-control-active-bg);
    color: var(--color-on-control-active);
}

.gizmo-mode-btn.pilot.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-on-accent);
    outline: 1px solid var(--color-bg-app);
}

.gizmo-mode-btn.pilot.active:focus-visible {
    outline: 2px solid var(--color-focus-ring);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px var(--color-bg-app);
}

.gizmo-mode-btn.space {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
}

.gizmo-mode-btn.space.world {
    background: var(--color-surface-overlay);
    border-color: var(--color-border-strong);
    color: var(--color-text-primary);
}

.gizmo-mode-btn.space.local {
    background: var(--color-control-active-bg);
    border-color: var(--color-control-active-bg);
    color: var(--color-on-control-active);
}

.pilot-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    outline: 1px solid var(--color-bg-app);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-on-accent);
    pointer-events: none;
    display: none;
    z-index: 100;
    white-space: nowrap;
}

.pilot-info.visible {
    display: block;
}

.pilot-info__icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -3px;
}

.gizmo-divider {
    width: 100%;
    height: 1px;
    background: var(--color-border-strong);
    margin: 4px 0;
}

.selection-indicator {
    position: absolute;
    bottom: 64px;
    bottom: calc(anchor(--help-badge top, 52px) + 12px);
    left: 20px;
    background: var(--color-surface-1);
    border: 1px solid var(--color-border-subtle);
    border-left: 3px solid var(--color-accent);
    outline: 1px solid var(--color-bg-app);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 11px;
    color: var(--color-text-secondary);
    pointer-events: none;
    display: none;
}

.selection-indicator.visible {
    display: block;
}

.selection-indicator .selected-name {
    color: var(--color-text-primary);
    font-weight: 600;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: var(--color-surface-overlay);
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    color: var(--color-text-secondary);
}

.view-btn:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}
