:root {
    --bg: #050508;
    --surface: #12121a;
    --text: #fafafa;
    --muted: #a1a1aa;
    --accent: #a855f7;
    --accent-hover: #9333ea;
    --warn: #f59e0b;
    --ok: #22c55e;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overscroll-behavior: none;
}

.totem {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.step {
    display: none;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    min-height: 0;
    width: 100%;
}

.step.active {
    display: flex;
}

/* Step 1 — attract */
.step-attract {
    background: radial-gradient(ellipse at 50% 30%, #2e1064 0%, var(--bg) 55%);
}

.step-attract h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.step-attract p {
    color: var(--muted);
    margin: 0 0 2rem;
    max-width: 28rem;
}

.btn-hero {
    font-size: 1.35rem;
    padding: 1.25rem 2.5rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-hero:active {
    transform: scale(0.98);
}

.attract-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 22rem;
}

.btn-inicio {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.btn-inicio:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-inicio:active {
    transform: scale(0.98);
}

.result-actions .btn-inicio {
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
}

/* Step 2 — capture (câmera em cima, instruções em barra embaixo) */
.step-capture {
    padding: 0;
    justify-content: flex-start;
    align-items: stretch;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    text-align: center;
    background: var(--bg);
}

.capture-stage {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    flex: 1 1 auto;
    align-self: stretch;
}

.capture-camera-zone {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 11rem);
    min-height: calc(100dvh - 11rem);
    overflow: hidden;
    background: #000;
}

.capture-camera-zone .camera-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: unset;
    border-radius: 0;
    overflow: hidden;
    background: #000;
    border: none;
    border-bottom: 2px solid rgba(168, 85, 247, 0.35);
}

.capture-instruction-bar {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 1.5rem 1.5rem;
    max-height: 38vh;
    max-height: 38dvh;
    background: linear-gradient(180deg, rgba(15, 15, 22, 0.97) 0%, var(--bg) 100%);
    border-top: 2px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.pose-step-badge {
    margin: 0 0 0.5rem;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a78bfa;
}

.capture-instruction-bar h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
    max-width: 28rem;
    line-height: 1.3;
    font-weight: 600;
}

#webcam {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    z-index: 1;
}

#pose-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transform-origin: center center;
    z-index: 2;
    pointer-events: none;
}

.camera-flip-controls {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 15;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    pointer-events: auto;
}

.btn-camera-flip {
    padding: 0.55rem 0.9rem;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s, transform 0.15s;
}

.btn-camera-flip:active {
    transform: scale(0.96);
    background: rgba(168, 85, 247, 0.45);
}

#pose-canvas {
    pointer-events: none;
}

.pose-process-canvas {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.capture-countdown {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem 1.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 55%);
    pointer-events: none;
}

.capture-countdown.hidden {
    display: none;
}

.countdown-label {
    margin: 0 0 0.75rem;
    font-size: clamp(1.1rem, 3.5vw, 1.35rem);
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.countdown-bar-track {
    width: 100%;
    max-width: 420px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.countdown-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #6366f1);
    transition: width 0.05s linear;
}

.countdown-seconds {
    margin-top: 0.5rem;
    font-size: clamp(2.25rem, 8vw, 3rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 12px rgba(168, 85, 247, 0.6);
}

.capture-instruction-bar .pose-alert {
    margin: 0;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: clamp(1.05rem, 3.2vw, 1.25rem);
    line-height: 1.4;
    width: 100%;
    max-width: 36rem;
    min-height: 3.25rem;
    display: none;
}

.pose-alert {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    max-width: 480px;
    display: none;
}

.capture-instruction-bar .pose-alert.visible,
.pose-alert.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-capture-nano {
    display: block;
    width: 100%;
    max-width: 36rem;
    margin-top: 0.85rem;
    padding: 0.85rem 1.1rem;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    font-weight: 700;
    border: 2px solid rgba(250, 204, 21, 0.65);
    border-radius: 12px;
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.btn-capture-nano:hover:not(:disabled) {
    background: rgba(250, 204, 21, 0.22);
}

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

.btn-capture-nano:active:not(:disabled) {
    transform: scale(0.98);
}

.capture-stage {
    position: relative;
}

.capture-stage--confirm .capture-camera-zone,
.capture-stage--confirm .capture-instruction-bar {
    visibility: hidden;
    pointer-events: none;
}

.photo-confirm-panel {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: var(--bg);
    overflow-y: auto;
}

.photo-confirm-panel.hidden {
    display: none;
}

.photo-confirm-inner {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.photo-confirm-title {
    margin: 0 0 1rem;
    font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.captured-preview {
    width: 100%;
    max-height: 52vh;
    object-fit: contain;
    border-radius: var(--radius);
    border: 2px solid rgba(168, 85, 247, 0.45);
    background: #000;
    margin-bottom: 1rem;
}

.photo-confirm-hint {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.photo-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.photo-confirm-actions .btn-action {
    width: 100%;
    margin-top: 0;
}

.btn-confirm-photo {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    color: #fff;
    font-weight: 700;
}

.pose-alert.warn {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warn);
    border: 1px solid var(--warn);
}

.pose-alert.ok {
    background: rgba(34, 197, 94, 0.12);
    color: var(--ok);
    border: 1px solid var(--ok);
}

.pose-alert.searching {
    background: rgba(161, 161, 170, 0.12);
    color: #d4d4d8;
    border: 1px solid rgba(161, 161, 170, 0.45);
}

.btn-action {
    margin-top: 0.5rem;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Step 3 — catálogo (tema claro, legível em totem) */
.step-catalog {
    --cat-bg: #f8fafc;
    --cat-surface: #ffffff;
    --cat-text: #0f172a;
    --cat-muted: #64748b;
    --cat-border: #e2e8f0;
    --cat-accent: #7c3aed;
    --cat-accent-soft: #ede9fe;

    justify-content: stretch;
    align-items: stretch;
    padding: 0;
    text-align: left;
    overflow: hidden;
    background: var(--cat-bg);
    color: var(--cat-text);
}

.catalog-header {
    flex-shrink: 0;
    padding: 1.25rem 1.25rem 0.75rem;
    text-align: center;
    background: var(--cat-surface);
    border-bottom: 1px solid var(--cat-border);
}

.catalog-step {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cat-accent);
}

.catalog-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cat-text);
}

.catalog-hint {
    margin: 0;
    color: var(--cat-muted);
    font-size: 1rem;
}

.catalog-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

@media (min-width: 520px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.catalog-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--cat-surface);
    border: 2px solid var(--cat-border);
    border-radius: 14px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.catalog-item:active {
    transform: scale(0.98);
}

.catalog-item.selected {
    border-color: var(--cat-accent);
    box-shadow: 0 0 0 3px var(--cat-accent-soft), 0 4px 14px rgba(124, 58, 237, 0.15);
}

.catalog-item.selected::after {
    content: "✓";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cat-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
    z-index: 2;
}

.catalog-item .catalog-thumb {
    background: #f1f5f9;
    padding: 0.5rem;
    border-bottom: 1px solid var(--cat-border);
}

.catalog-item img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    display: block;
}

.catalog-item .catalog-name {
    display: block;
    padding: 0.65rem 0.75rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cat-text);
}

.catalog-footer {
    flex-shrink: 0;
    width: 100%;
    padding: 0;
    background: var(--cat-surface);
    border-top: 1px solid var(--cat-border);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
    z-index: 20;
}

.catalog-footer-inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
    text-align: center;
}

.selected-label {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    color: var(--cat-muted);
    min-height: 1.35em;
}

.selected-label.has-selection {
    color: var(--cat-text);
    font-weight: 600;
}

.dress-hint {
    margin: 0 0 0.65rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    line-height: 1.35;
    text-align: left;
    color: #6d28d9;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
}

.dress-hint.hidden {
    display: none;
}

.engine-picker {
    width: 100%;
    margin-bottom: 0.85rem;
    text-align: left;
}

.engine-picker-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cat-muted);
}

.engine-picker-select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid var(--cat-border);
    background: var(--cat-surface);
    color: var(--cat-text);
}

.engine-picker-select:focus {
    outline: none;
    border-color: var(--cat-accent);
    box-shadow: 0 0 0 3px var(--cat-accent-soft);
}

.btn-wear {
    display: block;
    width: 100%;
    padding: 1.05rem 1.5rem;
    font-size: 1.15rem;
    border: none;
    border-radius: 12px;
    background: var(--cat-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn-wear:not(:disabled):hover {
    background: #6d28d9;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-wear:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-wear:not(:disabled):active {
    transform: scale(0.98);
}

.step-catalog .muted {
    color: var(--cat-muted);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1rem;
}

/* Step 4 — loading experiência */
.step-loading {
    justify-content: center;
    padding: 1rem 1.25rem 1.5rem;
    background: radial-gradient(ellipse at 50% 20%, #1e1b4b 0%, var(--bg) 55%);
}

.loading-stage {
    width: min(100%, 420px);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.loading-instruction-bar {
    flex-shrink: 0;
    padding-top: 0.75rem;
}

.loading-video-zone {
    display: none;
    flex: 1 1 50%;
    min-height: 50%;
    max-height: 50%;
    width: 100%;
    background: #000;
}

.loading-video-zone:not(.is-hidden) {
    display: flex;
    align-items: stretch;
}

.scan-frame {
    position: relative;
    width: 200px;
    height: 260px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(168, 85, 247, 0.45);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.25);
    background: #0f0f14;
}

.loading-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    filter: brightness(0.92) contrast(1.05);
}

.scan-grid {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 8px,
        rgba(168, 85, 247, 0.06) 8px,
        rgba(168, 85, 247, 0.06) 9px
    );
    pointer-events: none;
}

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a855f7, #22d3ee, transparent);
    box-shadow: 0 0 16px #a855f7;
    animation: scanMove 2.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scanMove {
    0% {
        top: 0;
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: calc(100% - 3px);
        opacity: 0.6;
    }
}

.loading-instruction-bar h2 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.loading-highlight {
    margin: 0 0 1rem;
    color: #c4b5fd;
    font-size: 0.95rem;
    min-height: 1.3em;
}

.loading-steps {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--muted);
    transition: color 0.25s, opacity 0.25s;
}

.loading-step .step-icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
}

.loading-step.active {
    color: #fafafa;
    font-weight: 600;
}

.loading-step.active .step-icon {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
    animation: pulseIcon 1s ease-in-out infinite;
}

.loading-step.done {
    color: #86efac;
}

.loading-step.done .step-icon {
    border-color: #22c55e;
    background: #22c55e;
    box-shadow: inset 0 0 0 2px #14532d;
}

.loading-step.done .step-icon::after {
    content: '✓';
    display: block;
    font-size: 0.65rem;
    line-height: 1.1rem;
    text-align: center;
    color: #fff;
    font-weight: 700;
}

@keyframes pulseIcon {
    50% {
        transform: scale(1.15);
    }
}

.loading-tip {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    min-height: 3.2em;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s, transform 0.35s;
}

.loading-tip.tip-visible {
    opacity: 1;
    transform: translateY(0);
}

.loading-progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #22d3ee);
    transition: width 0.8s ease-out;
}

.loading-footnote {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.is-hidden {
    display: none !important;
}

.loading-video-carousel {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.loading-video-frame {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #000;
}

.loading-promo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.loading-video-caption {
    display: none;
    margin: 0.2rem 0 0.5rem;
    font-size: 0.95rem;
    color: #c4b5fd;
    min-height: 1.2em;
}

/* Modo propaganda: metade superior = vídeo, metade inferior = barra de instrução */
.step-loading.step-loading--video {
    padding: 0;
    justify-content: flex-start;
    align-items: stretch;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.step-loading.step-loading--video .loading-stage {
    width: 100%;
    max-width: none;
    height: 100%;
    text-align: center;
}

.step-loading.step-loading--video .loading-content {
    display: none;
}

.step-loading.step-loading--video .loading-instruction-bar {
    flex: 1 1 50%;
    min-height: 50%;
    max-height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 1rem 1.25rem 1.35rem;
    background: linear-gradient(180deg, rgba(5, 5, 8, 0.94) 0%, var(--bg) 100%);
    border-top: 2px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.step-loading.step-loading--video h2#loading-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.1rem, 3.5vw, 1.35rem);
}

.step-loading.step-loading--video .loading-video-caption {
    display: block;
}

.step-loading.step-loading--video .loading-highlight {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
}

.step-loading.step-loading--video .loading-progress-track {
    margin-bottom: 0.65rem;
}

.step-loading.step-loading--video .loading-footnote {
    margin: 0;
    font-size: 0.82rem;
}

/* Step 5 — resultado (imagem em destaque, estilo totem) */
.step-result {
    padding: 0.5rem 0.75rem max(0.85rem, env(safe-area-inset-bottom));
    justify-content: flex-start;
    gap: 0.5rem;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.step-result h2 {
    flex-shrink: 0;
    margin: 0;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
}

.result-image {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 10.5rem);
    max-height: calc(100dvh - 10.5rem);
    min-height: 50vh;
    min-height: 50dvh;
    object-fit: contain;
    object-position: center center;
    border-radius: var(--radius);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    background: #0a0a0f;
}

/* Nano Banana — ocupa quase a tela inteira */
.step-result.step-result--nano .result-image {
    max-height: calc(100vh - 7.5rem);
    max-height: calc(100dvh - 7.5rem);
    min-height: 62vh;
    min-height: 62dvh;
}

.result-actions {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-top: 0.35rem;
    width: 100%;
    max-width: 36rem;
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: var(--text);
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
    grid-column: 1 / -1;
}
