/* ─────────────────────────────────────────────
   Analyse IA – interface "AI vision"
   ───────────────────────────────────────────── */

.analysis-box-wrapper .ai-results-box-wrapper .ai-results-box-items {
    background: radial-gradient(120% 120% at 0% 0%, #f7f1e6 0%, #fbf8f2 45%, #ffffff 100%);
}

/* Status pill next to title */
.ai-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(45, 70, 57, .08);
    color: var(--theme-secondary);
    border: 1px solid rgba(45, 70, 57, .12);
    transition: all .3s ease;
}
.ai-status-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa39e;
}
.ai-status-pill.is-scanning {
    background: rgba(183, 146, 72, .12);
    color: var(--theme-hover);
    border-color: rgba(183, 146, 72, .3);
}
.ai-status-pill.is-scanning::before {
    background: var(--theme);
    animation: aiPulseDot 1s ease-in-out infinite;
}
.ai-status-pill.is-done {
    background: rgba(45, 70, 57, .1);
    color: var(--theme-secondary);
    border-color: rgba(45, 70, 57, .25);
}
.ai-status-pill.is-done::before {
    background: #2fa36b;
    box-shadow: 0 0 0 4px rgba(47, 163, 107, .18);
}

/* ── Face stage ─────────────────────────────── */
.analysis-box-wrapper .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
    position: relative;
    background: #0f1a15;
    box-shadow: 0 18px 45px rgba(15, 26, 21, .35);
    isolation: isolate;
}
.ai-face-stage img {
    display: block;
    transition: filter .6s ease, transform .8s ease;
}
.ai-face-stage.is-scanning img {
    filter: saturate(.7) contrast(1.05) brightness(.85);
}
/* live camera */
.ai-face-stage video.ai-cam {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    border-radius: 10px;
    background: #0f1a15;
    transition: filter .6s ease;
}
.ai-face-stage.is-live video.ai-cam { display: block; }
.ai-face-stage.is-live img { visibility: hidden; }
.ai-face-stage.is-live.is-scanning video.ai-cam { filter: saturate(.75) contrast(1.05) brightness(.9); }
.ai-face-stage.is-live .ai-corner { transition-duration: .25s; }
.ai-face-stage.is-live .ai-frame { transition-duration: .25s; }
.ai-face-stage.is-live .ai-lock-badge { transition-duration: .25s; }

.ai-face-stage .ai-countdown {
    position: absolute;
    z-index: 8;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 30px rgba(183, 146, 72, .9), 0 4px 18px rgba(0, 0, 0, .5);
    opacity: 0;
}
.ai-face-stage .ai-countdown.is-active { opacity: 1; animation: aiCount .95s ease-out infinite; }
.ai-face-stage .ai-countdown.is-flash { opacity: 1; background: rgba(255,255,255,.85); animation: aiFlash .45s ease-out 1 forwards; }

.ai-face-stage .ai-guide {
    position: absolute;
    z-index: 7;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(6px);
    max-width: 88%;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 26, 21, .78);
    border: 1px solid rgba(212, 184, 150, .35);
    color: #f3e9d8;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}
.ai-face-stage .ai-guide.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ai-face-stage .ai-guide.is-ok { border-color: rgba(120, 200, 150, .6); color: #cff5dc; }

/* camera panel (left column) */
.analysis-box-wrapper .analysis-box-left-items .upload-box-items.ai-cam-panel {
    align-items: stretch;
    text-align: left;
    border-style: solid;
    border-color: rgba(183, 146, 72, .35);
    background: linear-gradient(160deg, #fbf8f1, #f3f5f3);
    padding: 18px;
    gap: 14px;
}
.ai-cam-panel .ai-cam-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-secondary);
}
.ai-cam-panel .ai-cam-status .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: #b8b8b8;
    box-shadow: 0 0 0 0 rgba(183, 146, 72, .5);
}
.ai-cam-panel .ai-cam-status.is-live .dot { background: #e0473d; animation: aiPulseDot 1.2s ease-in-out infinite; }
.ai-cam-panel .ai-cam-status.is-busy .dot { background: var(--theme); animation: aiPulseDot 1.2s ease-in-out infinite; }
.ai-cam-panel .ai-cam-status.is-done .dot { background: #2eaa5f; }
.ai-cam-panel .ai-cam-status.is-error .dot { background: #e0473d; }

.ai-cam-panel .ai-live-metrics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ai-cam-panel .ai-live-metrics li {
    background: #fff;
    border: 1px solid rgba(183, 146, 72, .18);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ai-cam-panel .ai-live-metrics li span { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #7c847f; }
.ai-cam-panel .ai-live-metrics li b { font-size: 18px; color: var(--theme-secondary); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ai-cam-panel .ai-live-metrics li b.small { font-size: 12px; font-weight: 600; }
.ai-cam-panel .ai-live-metrics li b.ok { color: #2eaa5f; }
.ai-cam-panel .ai-live-metrics li b.warn { color: #c98a1a; }

.ai-cam-panel .ai-cam-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.analysis-box-wrapper .analysis-box-left-items .upload-box-items.ai-cam-panel .upload-btn {
    margin-bottom: 0;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.analysis-box-wrapper .analysis-box-left-items .upload-box-items.ai-cam-panel .upload-btn:hover { background-color: var(--theme-hover); }
.ai-cam-panel .ai-alt-link {
    text-align: center;
    font-size: 12.5px;
    color: #6b7570;
    text-decoration: underline;
    cursor: pointer;
    margin: 0;
}
.ai-cam-panel .ai-alt-link:hover { color: var(--theme-hover); }
.ai-cam-panel .ai-cam-error {
    font-size: 12.5px;
    line-height: 1.5;
    color: #8a2f28;
    background: #fdf1f0;
    border: 1px solid #f3c9c5;
    border-radius: 8px;
    padding: 8px 10px;
}

.ai-face-stage canvas.ai-mesh {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* subtle grid behind */
.ai-face-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(183, 146, 72, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(183, 146, 72, .12) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0;
    transition: opacity .5s ease;
    mix-blend-mode: screen;
}
.ai-face-stage.is-scanning::before,
.ai-face-stage.is-done::before {
    opacity: .55;
}

/* face frame: --fx --fy --fw --fh are set by JS (percent of the stage) */
.ai-face-stage {
    --fx: 10%;
    --fy: 8%;
    --fw: 80%;
    --fh: 84%;
}

/* corner brackets – follow the detected face */
.ai-face-stage .ai-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    z-index: 3;
    pointer-events: none;
    border: 2px solid var(--theme);
    opacity: .9;
    transition: top .7s cubic-bezier(.22, 1, .36, 1), left .7s cubic-bezier(.22, 1, .36, 1),
                width .7s ease, height .7s ease, opacity .4s ease, border-color .4s ease;
}
.ai-face-stage .ai-corner.tl { top: var(--fy); left: var(--fx); border-right: 0; border-bottom: 0; }
.ai-face-stage .ai-corner.tr { top: var(--fy); left: calc(var(--fx) + var(--fw) - 26px); border-left: 0; border-bottom: 0; }
.ai-face-stage .ai-corner.bl { top: calc(var(--fy) + var(--fh) - 26px); left: var(--fx); border-right: 0; border-top: 0; }
.ai-face-stage .ai-corner.br { top: calc(var(--fy) + var(--fh) - 26px); left: calc(var(--fx) + var(--fw) - 26px); border-left: 0; border-top: 0; }
.ai-face-stage.is-scanning .ai-corner {
    animation: aiCornerBreathe 1.4s ease-in-out infinite;
}
.ai-face-stage.is-locked .ai-corner {
    border-color: var(--theme-light);
    animation: aiLock .9s ease-out 1;
}

/* face frame outline (thin) */
.ai-face-stage .ai-frame {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    top: var(--fy);
    left: var(--fx);
    width: var(--fw);
    height: var(--fh);
    border: 1px dashed rgba(212, 184, 150, .45);
    border-radius: 6px;
    opacity: 0;
    transition: all .7s cubic-bezier(.22, 1, .36, 1);
}
.ai-face-stage.is-scanning .ai-frame,
.ai-face-stage.is-done .ai-frame { opacity: 1; }

/* face source badge */
.ai-face-stage .ai-lock-badge {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    top: calc(var(--fy) - 22px);
    left: calc(var(--fx) + var(--fw) / 2);
    transform: translateX(-50%);
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #0f1a15;
    background: var(--theme-light);
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: all .5s ease;
    white-space: nowrap;
}
.ai-face-stage.is-locked .ai-lock-badge { opacity: 1; }

/* scan line – confined to the face frame, position driven by JS */
.ai-face-stage .ai-scanline {
    position: absolute;
    left: var(--fx);
    width: var(--fw);
    top: var(--fy);
    height: 3px;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--theme) 25%, #fff 50%, var(--theme) 75%, transparent);
    box-shadow: 0 0 18px 4px rgba(183, 146, 72, .55);
    opacity: 0;
    transition: opacity .3s ease, left .7s ease, width .7s ease;
}
.ai-face-stage .ai-scanline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 3px;
    height: 60px;
    background: linear-gradient(180deg, rgba(183, 146, 72, .28), transparent);
}
.ai-face-stage.is-scanning .ai-scanline { opacity: 1; }

/* HUD labels */
.ai-face-stage .ai-hud {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    font-family: "Quicksand", monospace, sans-serif;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .9);
    background: rgba(15, 26, 21, .55);
    backdrop-filter: blur(4px);
    padding: 5px 9px;
    border-radius: 6px;
    border: 1px solid rgba(183, 146, 72, .35);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s ease, transform .4s ease;
}
.ai-face-stage.is-scanning .ai-hud,
.ai-face-stage.is-done .ai-hud {
    opacity: 1;
    transform: translateY(0);
}
.ai-face-stage .ai-hud.top { top: 46px; left: 14px; }
.ai-face-stage .ai-hud.top b {
    color: var(--theme-light);
    font-weight: 700;
}
.ai-face-stage .ai-hud.bottom {
    bottom: 46px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.ai-face-stage .ai-hud.bottom span strong {
    color: var(--theme-light);
}

/* label tags anchored on mesh zones */
.ai-face-stage .ai-tag {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #0f1a15;
    background: var(--theme-light);
    padding: 3px 8px;
    border-radius: 4px;
    transform: translate(-50%, -50%) scale(.85);
    opacity: 0;
    transition: opacity .35s ease, transform .35s ease;
    white-space: nowrap;
}
.ai-face-stage .ai-tag::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 1px;
    height: 6px;
    background: var(--theme-light);
}
.ai-face-stage .ai-tag.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ── Loading steps ──────────────────────────── */
.ai-progress {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #0f1a15;
    color: #fff;
    display: none;
    box-shadow: 0 12px 30px rgba(15, 26, 21, .25);
}
.ai-progress.is-active { display: block; }
.ai-progress .ai-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}
.ai-progress .ai-progress-head .pct {
    color: var(--theme-light);
    font-variant-numeric: tabular-nums;
}
.ai-progress .ai-progress-bar {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
}
.ai-progress .ai-progress-bar > span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--theme-hover), var(--theme), var(--theme-light));
    background-size: 200% 100%;
    animation: aiShimmer 1.6s linear infinite;
    transition: width .5s ease;
}
.ai-progress .ai-steps {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 14px;
}
.ai-progress .ai-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #000;
    transition: color .3s ease;
}
.ai-progress .ai-steps li i {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 9px;
    border: 1px solid rgba(255, 255, 255, .25);
    flex: 0 0 auto;
}
.ai-progress .ai-steps li.is-current { color: #fff; }
.ai-progress .ai-steps li.is-current i {
    border-color: var(--theme);
    color: var(--theme-light);
    animation: aiPulseDot 1s ease-in-out infinite;
}
.ai-progress .ai-steps li.is-done { color: #000; }
.ai-progress .ai-steps li.is-done i {
    background: var(--theme);
    border-color: var(--theme);
    color: #0f1a15;
}

/* ── Global score card ──────────────────────── */
.ai-global-score {
    display: none;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #2d4639 0%, #3a5647 100%);
    color: #fff;
    border-radius: 15px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(45, 70, 57, .25);
    animation: aiFadeUp .6s ease both;
}
.ai-global-score.is-visible { display: flex; }
.ai-global-score .ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
}
.ai-global-score .ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.ai-global-score .ring circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}
.ai-global-score .ring .track { stroke: rgba(255, 255, 255, .15); }
.ai-global-score .ring .value {
    stroke: var(--theme-light);
    stroke-dasharray: 201;
    stroke-dashoffset: 201;
    transition: stroke-dashoffset 1.4s cubic-bezier(.22, 1, .36, 1);
}
.ai-global-score .ring .num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
}
.ai-global-score .ring .num small {
    font-size: 10px;
    margin-left: 1px;
    color: var(--theme-light);
}
.ai-global-score .meta .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--theme-light);
    font-weight: 700;
}
.ai-global-score .meta .status {
    font-size: 18px;
    font-weight: 700;
    margin: 2px 0 4px;
}
.ai-global-score .meta p {
    margin: 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .8);
    line-height: 1.45;
}

/* results reveal */
.results-column .tab-pane .result-card {
    animation: aiFadeUp .5s ease both;
}
.results-column .tab-pane .result-card:nth-child(2) { animation-delay: .08s; }
.results-column .tab-pane .result-card:nth-child(3) { animation-delay: .16s; }
.results-column .result-card .detail-text {
    margin: -4px 0 10px;
    font-size: 12.5px;
    color: #6b7570;
    line-height: 1.45;
}

/* error */
.ai-error {
    background: #fdecec;
    color: #8a2a2a;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 14px;
    font-size: 13.5px;
    border: 1px solid rgba(138, 42, 42, .15);
}

/* upload drag state */
.analysis-box-wrapper .analysis-box-left-items .upload-box-items.is-dragover {
    border-color: var(--theme) !important;
    background: rgba(183, 146, 72, .08);
    transform: scale(1.01);
}
.analysis-box-wrapper .analysis-box-left-items .upload-box-items {
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

/* ── AI recommendations (right column) ──────── */
.analysis-box-wrapper .analysis-box-right-items .gt-recent-post-area .gt-recent-items.ai-reco {
    display: block;
    background: #fff;
    border: 1px solid rgba(183, 146, 72, .18);
    border-radius: 14px;
    padding: 14px;
    animation: aiFadeUp .5s ease both;
}
.ai-reco .ai-reco-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.ai-reco .ai-reco-head .gt-recent-thumb {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}
.ai-reco .ai-reco-head .gt-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ai-reco .ai-reco-head .title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-secondary);
    line-height: 1.2;
}
.ai-reco .ai-reco-head .zone {
    display: block;
    font-size: 11.5px;
    color: #7c847f;
    margin-top: 2px;
}
.ai-reco .reco-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.ai-reco .reco-badge.haute   { background: rgba(45, 70, 57, .12); color: var(--theme-secondary); }
.ai-reco .reco-badge.moyenne { background: rgba(183, 146, 72, .14); color: var(--theme-hover); }
.ai-reco .reco-badge.basse   { background: #eef0ee; color: #6b7570; }
.ai-reco .reco-explain {
    position: relative;
    margin: 0 0 10px;
    padding: 10px 12px 10px 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #4a534e;
    background: #faf6ee;
    border-left: 3px solid var(--theme);
    border-radius: 0 10px 10px 0;
}
.ai-reco .reco-explain .why {
    display: block;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--theme-hover);
    margin-bottom: 4px;
}
.ai-reco .reco-explain .why i { margin-right: 4px; }
.ai-reco .read-more { font-size: 13px; }
.ai-reco-intro {
    font-size: 12.5px;
    color: #6b7570;
    margin: -6px 0 12px;
    line-height: 1.5;
}
.ai-reco-intro strong { color: var(--theme-secondary); }

/* ── keyframes ──────────────────────────────── */
@keyframes aiCount {
    0%   { transform: scale(1.4); opacity: .2; }
    30%  { transform: scale(1); opacity: 1; }
    100% { transform: scale(.92); opacity: .85; }
}
@keyframes aiFlash {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes aiPulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 71, 61, .45); }
    50%      { box-shadow: 0 0 0 6px rgba(224, 71, 61, 0); }
}
@keyframes aiLock {
    0%   { transform: scale(1.35); opacity: .4; }
    60%  { transform: scale(.95); opacity: 1; }
    100% { transform: scale(1); }
}
@keyframes aiPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: .55; }
}
@keyframes aiCornerBreathe {
    0%, 100% { opacity: .9; transform: scale(1); }
    50%      { opacity: .5; transform: scale(1.08); }
}
@keyframes aiShimmer {
    0%   { background-position: 0% 0; }
    100% { background-position: -200% 0; }
}
@keyframes aiFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ai-face-stage.is-scanning .ai-corner,
    .ai-face-stage.is-locked .ai-corner,
    .ai-status-pill.is-scanning::before,
    .ai-progress .ai-progress-bar > span {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE / TABLET — clearer vertical flow
   Order: Camera → Metrics → Scores → Recommendations
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1199px) {
    .ai-analyse-layout .ai-results-box-wrapper {
        padding: 22px 18px;
    }
    .ai-analyse-layout .analysis-box-left-items,
    .ai-analyse-layout .analysis-box-right-items {
        padding: 22px 18px;
    }

    /* Camera full width on top of scores */
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items {
        padding: 14px;
        margin-top: 18px;
    }
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container {
        flex-direction: column;
        gap: 16px;
    }
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
        max-width: none;
        width: 100%;
        height: min(72vw, 460px);
        min-height: 320px;
        margin: 0;
        border-radius: 14px;
        overflow: hidden;
    }
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .results-column {
        width: 100%;
    }

    /* Tabs: horizontal scroll, no wrap crush */
    .ai-analyse-layout .ai-result-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 16px;
        gap: 8px;
        padding-bottom: 4px;
        justify-content: flex-start !important;
    }
    .ai-analyse-layout .ai-result-tabs::-webkit-scrollbar { display: none; }
    .ai-analyse-layout .ai-result-tabs .nav-item { flex: 0 0 auto; }
    .ai-analyse-layout .ai-result-tabs .nav-link {
        white-space: nowrap;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    .ai-face-stage .ai-countdown { font-size: 72px; }
    .ai-face-stage .ai-guide {
        white-space: normal;
        max-width: 92%;
        bottom: 28px;
        font-size: 11px;
        line-height: 1.35;
        padding: 7px 12px;
    }
    .ai-face-stage .ai-hud.top,
    .ai-face-stage .ai-hud.bottom {
        font-size: 10px;
        padding: 4px 8px;
    }
    .ai-face-stage .ai-tag { font-size: 10px; padding: 3px 7px; }
}

@media (max-width: 767px) {
    .ai-analyse-layout .ai-intro-block p {
        font-size: 14px;
        margin-top: 8px;
        line-height: 1.5;
    }
    .ai-analyse-layout .ai-intro-block .title,
    .ai-analyse-layout .ai-results-head .title,
    .ai-analyse-layout .analysis-box-right-items .analysis-box .title {
        font-size: 18px;
    }

    /* Compact status under title */
    .ai-status-pill {
        margin-top: 8px;
        font-size: 11px;
        padding: 5px 12px;
        max-width: 100%;
        white-space: normal;
        line-height: 1.3;
        text-align: left;
    }

    /* Camera: portrait-friendly stage */
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
        height: min(118vw, 520px);
        min-height: 360px;
        max-height: 70vh;
        border-radius: 16px;
    }

    /* Metrics grid stays 2x2, tighter */
    .ai-cam-panel .ai-live-metrics {
        gap: 8px;
    }
    .ai-cam-panel .ai-live-metrics li {
        padding: 10px;
    }
    .ai-cam-panel .ai-live-metrics li b {
        font-size: 16px;
    }

    /* Tips: more compact */
    .ai-analyse-layout .ai-tips-box {
        padding: 12px 14px;
    }
    .ai-analyse-layout .ai-tips-box .icon-2 { margin-bottom: 8px; }
    .ai-analyse-layout .ai-tips-box span { font-size: 14px; }
    .ai-analyse-layout .ai-tips-box p { font-size: 13px; margin-top: 4px; }

    /* Global score: stack cleanly */
    .ai-global-score {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 14px;
    }
    .ai-global-score .meta p {
        font-size: 12px;
        line-height: 1.4;
    }

    /* Progress steps: slightly denser */
    .ai-progress .ai-steps li {
        font-size: 12.5px;
        padding: 5px 0;
    }

    /* Recommendations cards */
    .analysis-box-wrapper .analysis-box-right-items .gt-recent-post-area .gt-recent-items.ai-reco,
    .ai-reco {
        padding: 12px;
    }
    .ai-reco .reco-explain {
        font-size: 12.5px;
        padding: 9px 10px 9px 12px;
    }

    /* Hide duplicate RDV under results; keep the one in column 03 */
    .ai-rdv-desktop { display: none; }

    .ai-face-stage .ai-countdown { font-size: 64px; }
    .ai-face-stage .ai-lock-badge {
        font-size: 9px;
        top: calc(var(--fy) - 18px);
        padding: 2px 7px;
    }
}

@media (max-width: 575px) {
    .ai-analyse-layout .ai-results-box-wrapper,
    .ai-analyse-layout .analysis-box-left-items,
    .ai-analyse-layout .analysis-box-right-items {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items {
        padding: 10px;
        margin-top: 14px;
    }

    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
        height: min(130vw, 480px);
        min-height: 340px;
        max-height: 68vh;
    }

    .ai-analyse-layout .analysis-box .number {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* On very small screens, hide long intro text — camera panel is enough */
    .ai-analyse-layout .ai-intro-block p {
        display: none;
    }

    .ai-cam-panel {
        margin-top: 0 !important;
    }

    .ai-face-stage .ai-guide {
        bottom: 22px;
        border-radius: 12px;
    }

    .ai-face-stage .ai-hud.bottom {
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Book button full width */
    .analysis-box-wrapper .analysis-box-right-items .button-items .book-btn {
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* Sticky mobile action bar after bilan (appears via JS class on body/panel) */
.ai-mobile-bar {
    display: none;
}
@media (max-width: 767px) {
    .ai-mobile-bar {
        display: none;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 1040;
        gap: 8px;
        padding: 10px;
        border-radius: 14px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(183, 146, 72, .28);
        box-shadow: 0 12px 32px rgba(15, 26, 21, .18);
        backdrop-filter: blur(8px);
    }
    .ai-mobile-bar.is-visible {
        display: flex;
    }
    .ai-mobile-bar .upload-btn,
    .ai-mobile-bar .book-btn {
        flex: 1;
        margin: 0 !important;
        text-align: center;
        justify-content: center;
        padding: 12px 10px;
        font-size: 13px;
        border-radius: 10px;
        text-decoration: none;
    }
    .ai-mobile-bar .book-btn {
        background: var(--theme-secondary);
        color: #fff;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
    }
    body.has-ai-mobile-bar {
        padding-bottom: 84px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Responsive polish — no horizontal scroll, usable camera
   ═══════════════════════════════════════════════════════════ */
.analysis-section {
    overflow-x: hidden;
}
.analysis-section .container {
    max-width: 100%;
}
.analysis-section .analysis-wrapper {
    max-width: 920px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.analysis-box-wrapper .ai-results-box-wrapper .ai-results-box-items {
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}
.analysis-box-wrapper .ai-results-box-wrapper .nav .nav-item {
    max-width: 100%;
}
.analysis-wrapper .analysis-icon-items .title {
    line-height: 1.3;
}

@media (max-width: 1399.98px) {
    .analysis-breadcrumb.breadcrumb-wrapper {
        margin: 133px 12px 0;
        border-radius: 16px;
    }
    .analysis-breadcrumb .page-heading {
        padding: 108px 12px 56px;
    }
}

@media (max-width: 1199.98px) {
    .analysis-section.section-padding {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 60px;
    }
    .analysis-section .analysis-wrapper {
        margin: 28px auto 20px;
        padding: 0 4px;
    }
    .analysis-wrapper .analysis-icon-items {
        gap: 8px;
    }
    .analysis-wrapper .analysis-icon-items .icon {
        width: 42px;
        height: 42px;
        line-height: 42px;
        flex-shrink: 0;
    }
    .analysis-wrapper .analysis-icon-items .title {
        font-size: 15px;
    }
    .ai-analyse-layout .analysis-box-left-items,
    .ai-analyse-layout .analysis-box-right-items,
    .ai-analyse-layout .ai-results-box-wrapper {
        max-width: 100%;
    }
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
        height: min(62vw, 420px);
        min-height: 280px;
        max-height: 62vh;
    }
}

@media (max-width: 767.98px) {
    .analysis-breadcrumb.breadcrumb-wrapper {
        margin: 8px 8px 0;
        border-radius: 14px;
    }
    .analysis-breadcrumb .page-heading {
        padding: 96px 10px 40px;
    }
    .analysis-breadcrumb .page-heading h1 {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
    }
    .analysis-section .analysis-wrapper {
        margin: 20px auto 12px;
    }
    .analysis-wrapper .analysis-icon-items {
        justify-content: flex-start;
        padding: 0 2px;
    }
    .analysis-wrapper .analysis-icon-items .title {
        font-size: 13.5px;
    }

    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
        height: min(70dvh, 380px);
        min-height: 260px;
        max-height: 62dvh;
        width: 100%;
    }
    .ai-face-stage img,
    .ai-face-stage video.ai-cam,
    .ai-face-stage canvas.ai-mesh {
        max-width: 100%;
    }

    .ai-cam-panel .upload-btn,
    .analysis-box-wrapper .analysis-box-left-items .upload-box-items.ai-cam-panel .upload-btn,
    .analysis-box-wrapper .analysis-box-right-items .button-items .book-btn,
    .btn-rdv {
        min-height: 46px;
        width: 100%;
        box-sizing: border-box;
    }

    .ai-progress .ai-progress-head {
        flex-wrap: wrap;
        gap: 6px;
    }
    .ai-progress .ai-steps {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .ai-global-score .meta p {
        word-break: break-word;
    }

    .analysis-box-wrapper .analysis-box-right-items .gt-recent-post-area .gt-recent-items {
        align-items: flex-start;
        gap: 12px;
    }
    .analysis-box-wrapper .analysis-box-right-items .gt-recent-post-area .gt-recent-items .gt-recent-thumb {
        max-width: 72px;
        height: 72px;
        flex: 0 0 72px;
    }
    .analysis-box-wrapper .analysis-box-right-items .gt-recent-post-area .gt-recent-items .gt-recent-content .title {
        font-size: 15px;
        word-break: break-word;
    }
}

@media (max-width: 575.98px) {
    .analysis-wrapper .row {
        --bs-gutter-x: 12px;
        row-gap: 10px;
    }
    .analysis-wrapper .analysis-icon-items {
        background: #fff;
        border-radius: 12px;
        padding: 10px 12px;
        border: 1px solid rgba(183, 146, 72, 0.16);
    }
    .ai-analyse-layout .ai-results-box-wrapper .ai-results-box-items .analysis-container .image-box.ai-face-stage {
        height: min(68dvh, 340px);
        min-height: 240px;
        max-height: 58dvh;
    }
    .ai-face-stage .ai-countdown {
        font-size: 52px;
    }
    .ai-face-stage .ai-hud.top,
    .ai-face-stage .ai-hud.bottom {
        max-width: calc(100% - 16px);
    }
    .ai-global-score {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .ai-result-tabs .nav-link {
        font-size: 12px !important;
        padding: 7px 12px !important;
    }
}

@media (max-width: 380px) {
    .analysis-wrapper .analysis-icon-items .title {
        font-size: 12.5px;
    }
    .ai-cam-panel .ai-live-metrics {
        grid-template-columns: 1fr;
    }
}

/* Login / start gate */
.ai-gate-block {
  padding: 22px 20px !important;
  background: #fff;
  border: 1px solid rgba(183, 146, 72, 0.2);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(45, 70, 57, 0.08);
}
.ai-gate-block .title {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--theme-secondary);
}
.ai-gate-block p {
  font-size: 14px;
  line-height: 1.55;
  color: #5c665f;
  margin-bottom: 16px;
}
.ai-gate-alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(224, 71, 61, 0.1);
  color: #b42318;
  font-size: 13px;
}
.ai-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(45, 70, 57, 0.16);
  background: #fff;
  color: #2d4639;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(45, 70, 57, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-google-btn:hover {
  border-color: #b79248;
  color: #2d4639;
  box-shadow: 0 10px 24px rgba(183, 146, 72, 0.18);
}
.ai-start-btn {
  width: 100%;
}
.ai-gate-note {
  margin: 12px 0 0 !important;
  font-size: 12px !important;
  opacity: 0.8;
}
.ai-face-stage:not(.is-active) .ai-scanline,
.ai-face-stage:not(.is-active) .ai-tag,
.ai-face-stage:not(.is-active) video.ai-cam {
  opacity: 0.35;
}
#ai-cam-panel[hidden] {
  display: none !important;
}
#ai-gate[hidden] {
  display: none !important;
}

/* ── Single-section step flow ───────────────── */
body.is-analysis-flow .page-wrapper > main {
  padding-top: 96px;
}
.ai-flow-page {
  position: relative;
  min-height: calc(100vh - 96px);
  padding: 24px 0 110px;
  overflow-x: clip;
  overflow-y: visible;
}
.ai-flow-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(183, 146, 72, 0.16), transparent 55%),
    radial-gradient(70% 50% at 100% 20%, rgba(45, 70, 57, 0.12), transparent 50%),
    linear-gradient(180deg, #fff8f3 0%, #f7f1e8 100%);
  pointer-events: none;
}
.ai-flow-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
}
.ai-flow-brand {
  text-align: center;
  margin-bottom: 22px;
}
.ai-flow-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #b79248;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ai-flow-brand h1 {
  margin: 0 0 10px;
  color: #2d4639;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
}
.ai-flow-brand p {
  margin: 0 auto;
  max-width: 520px;
  color: #5f6a64;
  font-size: 15px;
  line-height: 1.6;
}
.ai-flow-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
}
.ai-flow-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(45, 70, 57, 0.1);
  color: #7a847e;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-flow-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(45, 70, 57, 0.08);
  color: inherit;
  font-size: 12px;
  flex-shrink: 0;
}
.ai-flow-steps li.is-current {
  background: #fff;
  border-color: #b79248;
  color: #2d4639;
  box-shadow: 0 10px 28px rgba(183, 146, 72, 0.18);
}
.ai-flow-steps li.is-current span {
  background: #b79248;
  color: #fff;
}
.ai-flow-steps li.is-done {
  background: rgba(45, 70, 57, 0.08);
  border-color: rgba(45, 70, 57, 0.18);
  color: #2d4639;
}
.ai-flow-steps li.is-done span {
  background: #2d4639;
  color: #fff;
}
.ai-flow-stage {
  position: relative;
  width: 100%;
}
.ai-flow-panel {
  display: none;
  animation: aiFlowIn 0.45s ease;
  width: 100%;
}
.ai-flow-panel.is-active,
.ai-flow-panel:not([hidden]) {
  display: block;
}
.ai-flow-panel[hidden] {
  display: none !important;
}
@keyframes aiFlowIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-flow-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 36px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(183, 146, 72, 0.2);
  box-shadow: 0 24px 60px rgba(45, 70, 57, 0.1);
  text-align: center;
  backdrop-filter: blur(10px);
}
.ai-flow-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(183, 146, 72, 0.14);
  color: #b79248;
  font-size: 24px;
}
.ai-flow-icon.is-ready {
  background: rgba(45, 70, 57, 0.12);
  color: #2d4639;
}
.ai-flow-card h2 {
  margin: 0 0 10px;
  color: #2d4639;
  font-size: 28px;
}
.ai-flow-card > p {
  margin: 0 0 22px;
  color: #5f6a64;
  line-height: 1.6;
}
.ai-flow-perks {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.ai-flow-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(45, 70, 57, 0.05);
  color: #2d4639;
  font-size: 13px;
  font-weight: 600;
}
.ai-flow-perks i { color: #b79248; width: 16px; text-align: center; }
.ai-flow-tip {
  margin-top: 18px !important;
  font-size: 13px !important;
  color: #6b7570 !important;
}

/* ── Step 2 capture ─────────────────────────── */
.ai-capture-grid,
.ai-results-layout {
  width: 100%;
}
.ai-results-layout .ai-results-box-wrapper,
.ai-capture-grid .ai-results-box-wrapper {
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(183, 146, 72, 0.16);
  box-shadow: 0 18px 48px rgba(45, 70, 57, 0.08);
}
.ai-capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ai-capture-head h2 {
  margin: 0 0 8px;
  color: #2d4639;
  font-size: clamp(20px, 3vw, 26px);
}
.ai-capture-head .upload-btn {
  margin: 0;
  white-space: nowrap;
}
.ai-capture-main.analysis-container {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.ai-flow-page .ai-face-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(68vh, 620px);
  min-height: 320px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #0f1a15;
  box-shadow: 0 18px 45px rgba(15, 26, 21, 0.28);
}
.ai-flow-page .ai-face-stage img,
.ai-flow-page .ai-face-stage video.ai-cam,
.ai-flow-page .ai-face-stage canvas.ai-mesh {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ai-flow-page .ai-face-stage img {
  display: block;
}
.ai-capture-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.ai-flow-page .ai-cam-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 !important;
  padding: 14px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(183, 146, 72, 0.28) !important;
  background: linear-gradient(160deg, #fbf8f1, #f3f5f3) !important;
  align-items: stretch !important;
  text-align: left !important;
}
.ai-flow-page .ai-cam-panel .upload-btn {
  width: 100%;
  margin: 0;
}
.ai-flow-page .ai-progress {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(45, 70, 57, 0.1);
}
.ai-flow-page .ai-steps {
  margin: 10px 0 0;
  padding: 0;
}

/* ── Step 3 results ─────────────────────────── */
.ai-results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: start;
}
.ai-flow-page .ai-global-score {
  display: none;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2d4639, #3f5a4b);
  color: #fff8f3;
}
.ai-flow-page .ai-global-score.is-visible {
  display: flex;
}
.ai-flow-page .ai-global-score .meta .label,
.ai-flow-page .ai-global-score .meta .status,
.ai-flow-page .ai-global-score .meta p {
  color: rgba(255, 248, 243, 0.92);
}
.ai-flow-page .ai-global-score .meta p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}
.ai-flow-page .ai-result-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 2px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.ai-flow-page .ai-result-tabs .nav-item {
  flex: 0 0 auto;
}
.ai-flow-page .ai-result-tabs .nav-link {
  display: inline-flex;
  white-space: nowrap;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 700;
  color: #2d4639 !important;
  background: rgba(45, 70, 57, 0.06) !important;
  border: 1px solid transparent !important;
}
.ai-flow-page .ai-result-tabs .nav-link.active {
  background: #b79248 !important;
  color: #fff !important;
  border-color: #b79248 !important;
}
.ai-flow-page .ai-results-tabs-body {
  width: 100%;
}
.ai-flow-page .result-card {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(183, 146, 72, 0.14);
  box-shadow: 0 8px 20px rgba(45, 70, 57, 0.04);
}
.ai-flow-page .result-card.mb-0 {
  margin-bottom: 0;
}
.ai-flow-page .result-card .pro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ai-flow-page .result-card .pro-title {
  color: #2d4639;
  font-size: 14px;
  font-weight: 700;
}
.ai-flow-page .result-card .point {
  color: #b79248;
  font-size: 14px;
  font-weight: 800;
}
.ai-flow-page .result-card .progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(45, 70, 57, 0.08);
  overflow: hidden;
}
.ai-flow-page .result-card .progress.bg-2 {
  background: rgba(183, 146, 72, 0.16);
}
.ai-flow-page .result-card .progress.bg-3 {
  background: rgba(224, 120, 60, 0.14);
}
.ai-flow-page .result-card .progress-value {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d4639, #b79248);
}
.ai-flow-page .result-card .progress-value.style-two {
  background: linear-gradient(90deg, #b79248, #d4b896);
}
.ai-flow-page .result-card .progress-value.style-three {
  background: linear-gradient(90deg, #c2783a, #b79248);
}
.ai-flow-page .result-card .status-text,
.ai-flow-page .result-card .detail-text {
  margin: 10px 0 0;
  color: #5f6a64;
  font-size: 13px;
  line-height: 1.5;
}
.ai-reco-aside {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(165deg, #2d4639 0%, #3a5647 100%);
  color: #f7f1e6;
  box-shadow: 0 18px 48px rgba(45, 70, 57, 0.22);
  min-width: 0;
}
.ai-reco-aside h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 22px;
}
.ai-reco-sub {
  margin: 0 0 14px;
  color: rgba(255, 248, 243, 0.72);
  font-size: 13px;
}
.ai-reco-aside .gt-recent-post-area,
.ai-reco-aside .ai-reco-intro,
.ai-reco-aside .ai-reco-card,
.ai-reco-aside .title,
.ai-reco-aside .zone,
.ai-reco-aside .reco-explain,
.ai-reco-aside .why,
.ai-reco-aside .read-more {
  color: rgba(255, 248, 243, 0.92);
}
.ai-reco-aside .ai-reco-intro strong {
  color: #d4b896;
}
.ai-reco-aside .gt-recent-items.ai-reco {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ai-reco-aside .ai-reco .title {
  color: #365042 !important;
}
.ai-reco-aside .ai-reco .zone,
.ai-reco-aside .ai-reco .reco-explain,
.ai-reco-aside .ai-reco .why {
  color: rgb(0 0 0 / 78%) !important;
}
.ai-reco-aside .ai-reco .read-more {
  color: #d4b896 !important;
}
.ai-reco-aside .ai-reco .reco-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ai-reco-aside .ai-reco-card {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ai-reco-aside .book-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  margin-top: 14px;
  background: #b79248;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}
.ai-reco-aside .disclaimer {
  margin: 12px 0 0;
  color: rgba(255, 248, 243, 0.7);
  font-size: 12px;
}
.ai-reco-aside .disclaimer i {
  color: #d4b896;
  margin-inline-end: 6px;
}

@media (max-width: 1199.98px) {
  .ai-capture-main.analysis-container,
  .ai-results-layout {
    grid-template-columns: 1fr;
  }
  .ai-flow-page .ai-face-stage {
    max-height: min(62vh, 560px);
    min-height: 300px;
    margin-inline: auto;
    max-width: 460px;
  }
}

@media (max-width: 991.98px) {
  body.is-analysis-flow .page-wrapper > main {
    padding-top: 84px;
  }
  .ai-flow-page {
    padding: 18px 0 120px;
  }
  .ai-flow-steps {
    gap: 6px;
  }
  .ai-flow-steps li {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .ai-results-layout .ai-results-box-wrapper,
  .ai-capture-grid .ai-results-box-wrapper,
  .ai-reco-aside {
    padding: 14px;
    border-radius: 18px;
  }
  .ai-capture-side {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .ai-flow-brand {
    margin-bottom: 16px;
  }
  .ai-flow-brand p {
    font-size: 13.5px;
  }
  .ai-flow-steps li {
    flex-direction: column;
    gap: 4px;
    border-radius: 16px;
    min-height: 58px;
    padding: 8px 6px;
    font-size: 11px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
  .ai-flow-page .ai-face-stage {
    max-width: none;
    max-height: none;
    min-height: 0;
    aspect-ratio: 3 / 4;
    height: auto;
  }
  .ai-flow-page .ai-face-stage .ai-guide {
    bottom: 18px;
    font-size: 11px;
    white-space: normal;
    max-width: 92%;
  }
  .ai-flow-page .ai-face-stage .ai-hud.top,
  .ai-flow-page .ai-face-stage .ai-hud.bottom {
    font-size: 10px;
  }
  .ai-flow-page .ai-face-stage .ai-tag {
    display: none;
  }
  .ai-flow-page .ai-live-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .ai-flow-page .ai-global-score {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .ai-capture-head .upload-btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .ai-flow-card {
    padding: 28px 18px;
    border-radius: 22px;
  }
  .ai-flow-page .ai-cam-panel .ai-live-metrics li b {
    font-size: 16px;
  }
  .ai-flow-page .ai-result-tabs .nav-link {
    padding: 7px 12px !important;
    font-size: 12px !important;
  }
}
