:root {
    --vibe-bg: #0b1016;
    --vibe-panel: #10161d;
    --vibe-panel-strong: #151c24;
    --vibe-line: #26313d;
    --vibe-ink: #f3f5f7;
    --vibe-muted: #9099a5;
    --vibe-primary: #ff4f61;
    --vibe-secondary: #ff9d3f;
    --vibe-stabiliser: #f2c94c;
    --vibe-body: #252c34;
    --vibe-muscle-idle: #343c46;
    --vibe-outline: #59636f;
}

body.biometrics-v1-app {
    min-width: 320px;
    margin: 0;
    padding: 12px;
    overflow-x: hidden;
    background: var(--vibe-bg);
    color: var(--vibe-ink);
}

.vibe-shell {
    max-width: 1480px;
    margin: 0 auto;
    color: var(--vibe-ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.vibe-shell .ba-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--vibe-line);
    background: #0d131a;
}

.vibe-shell .ba-topbar-main,
.vibe-shell .ba-topbar-meta {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.vibe-shell .ba-brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--vibe-outline);
    color: var(--vibe-ink);
    flex: 0 0 auto;
}

.vibe-shell .ba-brand-mark i {
    display: none;
}

.vibe-shell .ba-brand-mark::before {
    content: "V";
    font: 800 21px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.vibe-shell .ba-kicker,
.vibe-shell .ba-subtitle {
    margin: 0;
    color: var(--vibe-muted);
    font: 700 10px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.vibe-shell .ba-title {
    margin: 3px 0;
    color: var(--vibe-ink);
    font: 800 clamp(20px, 4vw, 30px)/1 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0;
}

.vibe-shell .ba-nav-link,
.vibe-shell .ba-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 10px;
    border: 1px solid var(--vibe-line);
    background: #121923;
    color: var(--vibe-ink);
    text-decoration: none;
    font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .05em;
}

.vibe-layout {
    margin-top: 14px;
}

.vibe-stage-panel {
    border: 1px solid var(--vibe-line);
    background: var(--vibe-panel);
}

.vibe-controls {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--vibe-line);
}

.vibe-select-label {
    display: grid;
    gap: 6px;
    color: var(--vibe-muted);
    font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.vibe-select,
.vibe-figure-tabs button {
    min-height: 40px;
    border: 1px solid #35404d;
    background: #0f151d;
    color: var(--vibe-ink);
    font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .04em;
}

.vibe-select {
    min-width: min(360px, 82vw);
    padding: 0 12px;
}

.vibe-figure-tabs {
    display: inline-flex;
    gap: 6px;
}

.vibe-figure-tabs button {
    min-width: 86px;
    padding: 0 14px;
    cursor: pointer;
}

.vibe-figure-tabs button.is-active {
    border-color: var(--vibe-primary);
    background: var(--vibe-primary);
    color: #17070a;
}

.vibe-presentation {
    padding: clamp(16px, 3vw, 34px);
}

.vibe-hero-copy {
    border-bottom: 1px solid var(--vibe-line);
    padding-bottom: clamp(14px, 2vw, 22px);
}

.vibe-view-label,
.vibe-map-label,
.vibe-eyebrow {
    margin: 0;
    color: var(--vibe-muted);
    font: 800 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.vibe-hero-copy h1 {
    margin: 8px 0 8px;
    color: var(--vibe-ink);
    font: 900 clamp(34px, 5.4vw, 78px)/.95 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0;
    text-transform: uppercase;
}

.vibe-map-label {
    color: #b2bac4;
}

.vibe-visual-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(330px, .92fr);
    gap: clamp(18px, 3vw, 46px);
    align-items: center;
    padding-top: clamp(14px, 2.8vw, 28px);
}

.vibe-stage {
    position: relative;
    min-width: 0;
}

.vibe-anatomy {
    display: block;
    width: 100%;
    height: min(76vh, 800px);
    min-height: 610px;
}

.vibe-svg-backdrop {
    fill: transparent;
}

.vibe-body-silhouette {
    fill: url(#vibe-body-shade);
    stroke: var(--vibe-outline);
    stroke-width: 2;
}

.vibe-anatomy-boundary {
    fill: none;
    stroke: rgba(135, 147, 160, .42);
    stroke-width: 1.4;
    stroke-linecap: round;
}

.vibe-muscles path {
    --activation: 0;
    fill: color-mix(in srgb, var(--vibe-muscle-idle) calc(72% + (var(--activation) * 8%)), #1e252e);
    stroke: rgba(122, 134, 148, .58);
    stroke-width: 1.1;
    transition: fill .22s ease, stroke .22s ease, filter .22s ease, opacity .22s ease;
}

.vibe-muscles path[data-load="primary"] {
    fill: color-mix(in srgb, var(--vibe-primary) calc(58% + (var(--activation) * 42%)), var(--vibe-muscle-idle));
}

.vibe-muscles path[data-load="secondary"] {
    fill: color-mix(in srgb, var(--vibe-secondary) calc(56% + (var(--activation) * 40%)), var(--vibe-muscle-idle));
}

.vibe-muscles path[data-load="stabiliser"] {
    fill: color-mix(in srgb, var(--vibe-stabiliser) calc(48% + (var(--activation) * 34%)), var(--vibe-muscle-idle));
}

.vibe-muscles path[data-active="true"] {
    stroke: rgba(255, 248, 236, .92);
    filter: url(#vibe-muscle-edge);
}

.vibe-figure.is-hidden {
    display: none;
}

.vibe-callout-line {
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    opacity: .95;
}

.vibe-callout-marker {
    stroke: #110d10;
    stroke-width: 2;
}

.vibe-callout-number {
    fill: #13090b;
    font: 900 14px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-anchor: middle;
}

.vibe-data-panel {
    display: grid;
    gap: 18px;
    align-content: center;
    min-width: 0;
}

.vibe-muscle-legend,
.vibe-secondary-list {
    display: grid;
    gap: 12px;
}

.vibe-muscle-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px 0;
    border-top: 1px solid var(--vibe-line);
}

.vibe-muscle-card:first-of-type {
    border-top: 0;
}

.vibe-marker {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: var(--load-color);
    color: #14090b;
    font: 900 14px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.vibe-muscle-card h2 {
    margin: 0 0 4px;
    color: var(--vibe-ink);
    font: 900 20px/1.05 ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0;
}

.vibe-muscle-card p {
    margin: 0 0 9px;
    color: var(--vibe-muted);
    font-size: 13px;
    line-height: 1.32;
}

.vibe-muscle-card strong,
.vibe-compact-row strong {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--load-color);
    font: 900 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .06em;
}

.vibe-intensity {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin-top: 10px;
}

.vibe-intensity span {
    display: block;
    height: 9px;
    background: #303842;
}

.vibe-intensity span.is-active {
    background: var(--segment-color);
}

.vibe-compact-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(89, 99, 111, .35);
    color: var(--vibe-muted);
    font-size: 13px;
}

.vibe-empty-note,
.vibe-figure-note {
    margin: 0;
    color: var(--vibe-muted);
    font-size: 12px;
    line-height: 1.35;
}

@media (max-width: 940px) {
    body.biometrics-v1-app {
        padding: 8px;
    }

    .vibe-shell .ba-topbar {
        align-items: flex-start;
    }

    .vibe-shell .ba-topbar-meta {
        flex: 0 0 auto;
    }

    .vibe-shell .ba-nav-link span,
    .vibe-shell .ba-subtitle {
        display: none;
    }

    .vibe-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .vibe-select {
        width: 100%;
    }

    .vibe-figure-tabs {
        width: 100%;
    }

    .vibe-figure-tabs button {
        flex: 1 1 0;
    }

    .vibe-visual-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-top: 12px;
    }

    .vibe-anatomy {
        height: 62svh;
        min-height: 520px;
        max-height: 690px;
    }

    .vibe-data-panel {
        align-content: start;
    }
}

@media (max-width: 480px) {
    .vibe-presentation {
        padding: 14px 10px 18px;
    }

    .vibe-hero-copy h1 {
        font-size: clamp(30px, 10vw, 44px);
    }

    .vibe-anatomy {
        width: 116%;
        height: 59svh;
        min-height: 500px;
        margin-left: -8%;
    }

    .vibe-muscle-card {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 0;
    }

    .vibe-muscle-card h2 {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vibe-muscles path {
        transition: none;
    }
}
