/* Onboarding IA-first — light, allineato al catalogo. Isolato da sala-pesi-allenamento. */

:root {
    --brand: #00adb5;
    --brand-dark: #0b6e75;
    --scheda: #a84810;
    --scheda-bg: #fff6ee;
    --scheda-border: #c45c12;
    --scheda-ink: #7a3208;
    --scheda-soft: #ffe4cc;
    --ink: #2c3e50;
    --muted: #7f8c8d;
    --legal: #5f6b73;
    --line: #e5e9ee;
    --card: #fff;
    --page: #f4f6f9;
    --listen: #c45c12;
    --ok: #1e8449;
    --gb-radius: 14px;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--page);
    color: var(--ink);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body.is-listening {
    background: #f7f4f1;
}

.gb-top {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 20px;
}

.gb-top-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gb-brand {
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    font-size: 15px;
}

.gb-top-nav a {
    color: var(--brand);
    font-size: 14px;
    text-decoration: none;
}

.gb-top-nav a:hover {
    text-decoration: underline;
}

.gb-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 20px 32px;
}

.gb-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--scheda);
}

.gb-progress {
    height: 5px;
    border-radius: 99px;
    background: #eceff2;
    overflow: hidden;
    margin: 4px 0 6px;
}

.gb-progress span {
    display: block;
    height: 100%;
    width: 14%;
    background: linear-gradient(90deg, var(--scheda-border), var(--scheda));
    transition: width 0.25s ease;
}

.gb-meta {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.gb-privacy-note {
    display: none;
}

.gb-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

.gb-layout-stack {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
}

.gb-stage {
    position: relative;
    margin-bottom: 10px;
}

@media (max-width: 860px) {
    .gb-layout {
        grid-template-columns: 1fr;
    }
}

.gb-avatar {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--gb-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    min-height: 220px;
    max-height: none;
    margin: 0 auto 4px;
    transition: max-height 0.4s ease, min-height 0.4s ease, width 0.4s ease, opacity 0.35s ease;
}

.gb-layout-stack .gb-avatar {
    width: 100%;
    max-height: none;
}

.gb-stage .gb-mic {
    position: static;
    margin-top: 8px;
}

body.gb-avatar-hidden .gb-avatar {
    /* Resta grande e 16:9 su ogni step: niente collapse che taglia il volto. */
    opacity: 1;
    max-height: none;
    min-height: 220px;
    height: auto;
    pointer-events: auto;
    aspect-ratio: 16 / 9;
    transform: none;
}

body.gb-avatar-hidden .gb-play {
    display: none;
}

body.gb-avatar-fading .gb-avatar video,
body.gb-avatar-fading #avatar-video {
    opacity: 0;
    transition: opacity 0.35s ease;
}

body.gb-avatar-rest .gb-avatar {
    width: min(100%, 300px);
    max-height: 168px;
    min-height: 0;
    margin-left: auto;
    margin-right: auto;
}

body.gb-avatar-rest .gb-avatar video,
body.gb-avatar-rest #avatar-video {
    opacity: 1;
}

.gb-avatar video,
#avatar-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    background: #fff;
    transition: opacity 0.35s ease;
}

.gb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 2;
    padding: 0;
}

.gb-play::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 14px;
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent var(--scheda);
}

.gb-play:hover {
    background: #fff;
}

body.is-playing .gb-play,
body.gb-avatar-hidden .gb-play {
    display: none;
}

.gb-mic {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.gb-mic:not([hidden]) {
    display: flex;
}

.gb-avatar-caption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    color: var(--scheda-ink);
}

.gb-mic-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c5ced4;
}

.gb-mic.is-listening {
    border-color: var(--scheda-border);
    color: var(--scheda-ink);
    background: var(--scheda-bg);
}

.gb-mic.is-listening .gb-mic-dot {
    background: var(--listen);
    box-shadow: 0 0 0 0 rgba(196, 92, 18, 0.55);
    animation: gb-pulse 1.15s ease-out infinite;
}

@keyframes gb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(196, 92, 18, 0.55); }
    70% { box-shadow: 0 0 0 14px rgba(196, 92, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 92, 18, 0); }
}

.gb-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--gb-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 16px 20px 18px;
    overflow-x: hidden;
}

[data-step-panel][hidden] {
    display: none !important;
}

.gb-card h2 {
    margin: 0 0 4px;
    font-size: 18px;
    color: var(--ink);
    font-weight: 700;
}

.gb-lead {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.gb-lead-sub {
    margin: 14px 0 8px;
}

.gb-sub {
    margin-top: 4px;
}

.gb-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 4px;
}

.gb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--ink);
    cursor: pointer;
}

.gb-check input[type='checkbox'] {
    width: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--scheda-border);
    flex-shrink: 0;
}

.gb-grid-carichi {
    margin-top: 14px;
}

.gb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.gb-btn,
.gb-btn-avanti,
.gb-chip {
    min-height: 44px;
    touch-action: manipulation;
}

@media (max-width: 560px) {
    .gb-grid { grid-template-columns: 1fr; }
    .gb-shell { padding: 8px 12px calc(24px + env(safe-area-inset-bottom, 0px)); }
    .gb-btn,
    .gb-btn-avanti { min-height: 48px; }
    .gb-layout-stack .gb-avatar {
        width: 100%;
        min-height: 180px;
        max-height: none;
    }
    .gb-legal {
        font-size: 12px;
        line-height: 1.4;
        padding: 10px 12px;
    }
    .gb-legal li { margin-bottom: 6px; }
    .gb-lead {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .gb-privacy {
        font-size: 13px;
        margin: 8px 0;
    }
    .gb-btn-avanti {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 48px;
    }
    .gb-top { padding: 8px 12px; }
    .gb-card { padding: 16px 14px 18px; }
    .gb-card h2 { font-size: 17px; }
    .gb-kicker { margin-bottom: 2px; }
    .gb-meta { margin-bottom: 2px; }
}

label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 600;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

input:focus,
select:focus {
    outline: 2px solid var(--scheda-border);
    border-color: var(--scheda-border);
}

.gb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gb-luoghi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.gb-luogo-card {
    appearance: none;
    text-align: center;
    font: inherit;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 10px 10px;
    cursor: pointer;
}

.gb-luogo-card:hover {
    border-color: var(--scheda-border);
}

.gb-luogo-card.is-on {
    background: var(--scheda-bg);
    border: 2px solid var(--scheda-border);
}

.gb-luogo-nome {
    display: block;
    font-weight: 700;
    font-size: 16px;
}

.gb-luogo-per {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.gb-luogo-stato {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 650;
    color: var(--muted);
}

.gb-luogo-stato.is-ok {
    color: var(--ok);
}

.gb-domanda-palestra {
    margin: 4px 0 14px;
    padding: 16px 14px 14px;
    border: 2px solid var(--scheda-border);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.gb-domanda-palestra p {
    margin: 0 0 12px;
    font-weight: 700;
}

.gb-domanda-azioni {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gb-chip {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
}

.gb-chip:hover {
    border-color: var(--scheda-border);
}

.gb-chip.is-on {
    background: var(--scheda-bg);
    color: var(--scheda-ink);
    border-color: var(--scheda-border);
    border-width: 2px;
    font-weight: 650;
}

.gb-sala-studio-box {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f4fbfc;
}
body.gb-sala-studio #luogo-lead,
body.gb-sala-studio #luogo-box,
body.gb-sala-studio #sez-attrezzi-casa,
body.gb-sala-studio #sez-attrezzi-palestra {
    display: none !important;
}

.gb-zona-card {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f8fb;
}
.gb-zona-card h3 {
    margin: 0 0 6px;
    font-size: 14px;
}
.gb-zona-card .gb-lead-sub { margin: 8px 0 4px; }
.gb-zona-card input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}
#salute-disclaimer { margin-top: 12px; }

.gb-attrezzi {
    margin-top: 4px;
}

.gb-attrezzi-azioni {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.gb-attrezzi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 8px;
}

.gb-attrezzo {
    appearance: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    padding: 10px 11px 9px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    min-height: 52px;
}

.gb-attrezzo:hover {
    border-color: var(--scheda-border);
}

.gb-attrezzo.is-on {
    background: var(--scheda-bg);
    color: var(--scheda-ink);
    border-color: var(--scheda-border);
    border-width: 2px;
}

.gb-attrezzo-tag {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 3px;
}

.gb-attrezzo.is-on .gb-attrezzo-tag {
    color: var(--scheda);
}

.gb-advanced {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbfc;
    padding: 0 12px 10px;
}

.gb-advanced summary {
    cursor: pointer;
    list-style: none;
    padding: 11px 2px;
    font-size: 13px;
    font-weight: 650;
    color: var(--scheda-ink);
}

.gb-advanced summary::-webkit-details-marker {
    display: none;
}

.gb-advanced summary::before {
    content: '▸ ';
    color: var(--scheda);
}

.gb-advanced[open] summary::before {
    content: '▾ ';
}

.gb-advanced .gb-hint {
    margin: 0 0 8px;
}

.gb-advanced .gb-grid {
    margin-top: 4px;
}

.gb-privacy {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.35;
    margin: 8px 0;
    color: var(--ink);
}

.gb-privacy input[type='checkbox'] {
    width: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--scheda-border);
    flex-shrink: 0;
    margin-top: 2px;
}

.gb-legal {
    background: #f8f9fa;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--legal);
    margin: 0 0 10px;
    overflow: hidden;
}

.gb-legal p {
    margin: 0 0 6px;
    color: var(--ink);
}

.gb-legal ul {
    margin: 0;
    padding-left: 16px;
}

.gb-legal li {
    margin-bottom: 6px;
    overflow-wrap: break-word;
}

@media (min-width: 720px) {
    .gb-legal ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px 18px;
    }
    .gb-legal li {
        margin-bottom: 0;
    }
}

.gb-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.gb-nav[hidden] {
    display: none !important;
}

body.gb-step-benvenuto #btn-prev,
body.gb-step-benvenuto #btn-replay,
body.gb-step-benvenuto .gb-play {
    display: none !important;
}

body.gb-step-benvenuto #onboard-nav .gb-btn-avanti {
    width: 100%;
}

.gb-nav-ritorno {
    flex-direction: column;
    margin-top: 18px;
}

.gb-nav-ritorno .gb-btn-avanti {
    width: 100%;
    min-height: 48px;
}

.gb-btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    font: inherit;
    cursor: pointer;
    background: var(--scheda);
    color: #fff;
    font-weight: 700;
}

.gb-btn:hover {
    background: var(--scheda-ink);
}

.gb-btn-avanti {
    min-width: 160px;
    padding: 11px 22px;
    font-size: 16px;
}


.gb-btn.secondary {
    background: #ecf0f1;
    color: var(--ink);
    border: 1px solid transparent;
}

.gb-btn.secondary:hover {
    background: #dfe4e8;
}

.gb-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.gb-error {
    color: #c0392b;
    font-size: 13px;
    margin: 8px 0 0;
}

.gb-error[hidden],
.gb-error:empty {
    display: none !important;
    margin: 0;
}

.gb-live {
    font-size: 13px;
    color: var(--scheda);
    margin: 8px 0 0;
}

.gb-live:empty,
.gb-live[hidden] {
    display: none !important;
    margin: 0;
}

body.gb-avatar-gone #gb-avatar,
body.gb-avatar-gone .gb-stage,
body.gb-avatar-gone .gb-play {
    display: none !important;
}

body.gb-senza-avatar #gb-avatar,
body.gb-senza-avatar #btn-play,
body.gb-senza-avatar #btn-replay {
    display: none !important;
}

body.gb-senza-avatar .gb-stage {
    margin-bottom: 0;
}

body.gb-step-analisi .gb-privacy-note,
body.gb-step-analisi #gb-consent-card article {
    display: none;
}

body.gb-step-analisi .gb-mic {
    display: none !important;
}

body.gb-step-analisi #gb-consent-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

body.gb-scan-on {
    background: #101214;
}

body.gb-scan-on .gb-top,
body.gb-scan-on .gb-kicker,
body.gb-scan-on .gb-progress,
body.gb-scan-on .gb-meta,
body.gb-scan-on .gb-layout,
body.gb-scan-on #riepilogo {
    display: none !important;
}

body.gb-scan-embed .gb-layout {
    display: none;
}

.gb-scan-fs {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 8px auto 0;
    min-height: 420px;
    border-radius: 14px;
    overflow: hidden;
    z-index: 4;
    background: #101214;
    color: #f4f6f9;
}

.gb-scan-fs:fullscreen,
.gb-scan-fs:-webkit-full-screen {
    max-width: none;
    margin: 0;
    min-height: 100%;
    border-radius: 0;
}

.gb-scan-fs[hidden] {
    display: none !important;
}

.gb-scan-fs-stage {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    max-height: min(70dvh, 70vh);
    background: #101214;
}

@media (orientation: landscape) and (max-height: 500px) {
    .gb-scan-fs {
        min-height: 0;
        max-width: none;
        margin: 0;
        border-radius: 0;
    }
    .gb-scan-fs-stage {
        aspect-ratio: auto;
        min-height: 0;
        max-height: none;
        height: calc(100dvh - 132px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
    .gb-scan-fs-bar {
        flex-wrap: wrap;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .gb-scan-fasi { padding: 6px 12px 4px; }
}

.gb-scan-fs-stage video,
.gb-scan-fs-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.gb-scan-fs-stage video {
    z-index: 0;
    opacity: 1;
    background: #101214;
}

.gb-scan-fs-stage canvas {
    z-index: 1;
    background: transparent;
    pointer-events: none;
}

.gb-scan-prepara {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    margin: 0;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(16, 18, 20, 0.45);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 650;
    pointer-events: none;
}

.gb-scan-prepara[hidden] {
    display: none !important;
}

.gb-scan-video-pronta {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 2px;
    height: 2px;
    opacity: 1;
    pointer-events: none;
    object-fit: cover;
}

.gb-scan-fs-stage.is-accendo {
    background: #2a3036;
}

.gb-scan-fs-stage.is-accendo video {
    background: transparent;
}

.gb-scan-accendo {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: #2a3036;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 650;
    text-align: center;
    pointer-events: none;
}

.gb-scan-accendo[hidden] {
    display: none !important;
}

.gb-sagoma {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.gb-sagoma[hidden] {
    display: none !important;
}

.gb-pedana {
    position: absolute;
    left: 50%;
    top: 92.5%;
    width: 35%;
    height: 6%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gb-pedana-forma {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(214, 218, 222, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gb-sagoma.is-dentro .gb-pedana-forma {
    background: #3ddc84;
    border-color: rgba(61, 220, 132, 0.95);
    box-shadow: 0 0 16px rgba(61, 220, 132, 0.55);
}

.gb-sagoma-anello {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 72px;
    height: 72px;
    margin: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.gb-sagoma.is-dentro .gb-sagoma-anello {
    opacity: 1;
}

.gb-sagoma-anello circle {
    fill: none;
    stroke: var(--ok, #1e8449);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 94.2;
    stroke-dashoffset: 94.2;
    transform-origin: 18px 18px;
    transform: rotate(-90deg);
}

.gb-sagoma.is-dentro .gb-sagoma-anello circle {
    animation: gb-sagoma-giro 1s linear forwards;
}

@keyframes gb-sagoma-giro {
    to { stroke-dashoffset: 0; }
}

.gb-sagoma-msg {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    margin: 0;
    max-width: calc(100% - 24px);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(16, 18, 20, 0.78);
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 650;
    text-align: center;
    white-space: nowrap;
}

.gb-sagoma.is-dentro .gb-sagoma-msg {
    color: #fff;
}

.gb-sagoma-debug {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 3;
    margin: 0;
    max-width: calc(100% - 16px);
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(16, 18, 20, 0.55);
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
}

.gb-sagoma-debug[hidden] {
    display: none !important;
}

.gb-scan-fasi {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    list-style: none;
    margin: 0;
    padding: 14px 16px 8px;
}

.gb-scan-fasi li {
    font-size: 12px;
    letter-spacing: 0.02em;
    color: #8b949c;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
}

.gb-scan-fasi li.is-on {
    color: #fff;
    font-weight: 650;
    border-bottom-color: var(--scheda-border);
}

.gb-scan-fasi li.is-done {
    color: #c5d0d6;
}

.gb-scan-fasi li.is-done::after {
    content: ' ✓';
    color: #3dd68c;
    font-weight: 700;
}

.gb-scan-hold {
    height: 6px;
    margin: 0 18px 8px;
    border-radius: 99px;
    background: #2a3036;
    overflow: hidden;
}

.gb-scan-hold span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--scheda-border);
    transition: width 0.12s linear;
}

.gb-scan-hold.is-bravo span {
    background: #3dd68c;
}

.gb-scan-fs-status.is-bravo {
    color: #b7f5d2;
}

.gb-scan-fs-status {
    margin: 0;
    padding: 10px 16px 12px;
    text-align: center;
    font-size: 15px;
    line-height: 1.35;
    color: #f4f6f9;
    font-weight: 600;
}

.gb-scan-fs-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 16px 18px;
}

.gb-scheda {
    margin-top: 16px;
}
.gb-scheda-meta {
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 12px;
}
.gb-scheda-giorno {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 14px;
}
.gb-scheda-giorno h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--brand);
}
.gb-scheda-fase {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f7f9fb;
    border: 1px solid var(--line);
}
.gb-scheda-fase h4 {
    margin: 0 0 6px;
    font-size: 14px;
}
.gb-scheda-ex {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
}
.gb-scheda-ex:last-child {
    border-bottom: none;
}

.gb-pacchetto {
    padding: 14px 14px 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f4fb;
}
.gb-pacchetto h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #5b3d8f;
}
.gb-pacchetto-list {
    margin: 8px 0 12px;
    padding-left: 20px;
}
.gb-pacchetto-list li {
    margin: 4px 0;
    font-size: 14px;
}

.gb-hint {
    font-size: 13px;
    color: var(--muted);
}

.gb-hint a {
    color: var(--brand);
    text-decoration: none;
}

.gb-hint a:hover {
    text-decoration: underline;
}

.gb-ok {
    color: var(--ok);
}

.gb-misure-riga {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}
.gb-misure-num {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    color: var(--ink);
}
.gb-misure-grafico,
.gb-misure-grasso-grafico {
    width: 112px;
    flex: 0 0 112px;
    max-height: 40px;
}
.gb-misure-valori,
.gb-misure-date {
    display: grid;
    font-size: 11px;
    line-height: 14px;
    text-align: center;
}
.gb-misure-date {
    color: var(--muted);
}
.gb-misure-traccia {
    position: relative;
    height: 40px;
}
.gb-misure-grasso-grafico .gb-misure-traccia {
    height: 40px;
}
.gb-misure-grafico svg,
.gb-misure-grasso-grafico svg {
    width: 100%;
    height: 40px;
    max-height: 40px;
    display: block;
}
.gb-misure-oltre {
    margin: 6px 0 8px;
}
.gb-misure-punto {
    position: absolute;
    width: 8px;
    height: 8px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #00adb5;
    border: 2px solid #fff;
    transform: translate(-50%, -50%);
}
#misure-altezza {
    width: 120px;
    margin: 6px 0 0;
}

@media (max-height: 740px) {
    .gb-layout-stack .gb-avatar {
        width: 100%;
        max-height: none;
        min-height: 200px;
    }
    .gb-legal {
        font-size: 12px;
        padding: 8px 12px;
    }
    .gb-card h2 { font-size: 17px; }
}

#analisi-status {
    margin-top: 0;
}

body.gb-piano-attivo .gb-layout,
body.gb-piano-attivo .gb-progress,
body.gb-piano-attivo .gb-meta,
body.gb-piano-attivo .gb-privacy-note,
body.gb-piano-attivo #gb-consent-card {
    display: none;
}
