/* ═══════════════════════════════════════════════════════════
   GAFETES PRO EDITORIAL STUDIO — Design System
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
    /* Colors — Light mode */
    --bg-global: rgba(239, 237, 239, 0.5);
    --card-bg: #ffffff;
    --input-bg: #e8e7e4;
    --input-border: rgba(0, 0, 0, 0.06);
    --text-main: #1a1a1a;
    --text-mute: #6b6b6b;
    --accent-primary: #0097b5;
    --accent-secondary: #dda906;
    --accent-success: #27AE60;
    --accent-danger: #e74c3c;
    --accent-tips: #f39c12;

    /* Surfaces */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --overlay-bg: rgba(0, 0, 0, 0.4);

    /* Layout — Large rounded corners */
    --sidebar-width: 360px;
    --radius-main: 30px;
    --radius-ui: 14px;
    --gap-ui: 6px;

    /* Safe area (readable from JS via getComputedStyle) */
    --safe-top: env(safe-area-inset-top, 0px);

    /* Motion */
    --transition-smooth: all 0.4s cubic-bezier(0.28, 0.11, 0.32, 1);
    --transition-fast: all 0.2s ease;
    --hover-lift: translateY(-1px);
    --hover-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

    /* Shadows */
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-elevated: 0 4px 20px rgba(0, 0, 0, 0.1);

    /* Color dot active border */
    --dot-active-border: rgba(0, 0, 0, 0.55);

    /* Pills — floating UI elements (sidebar, zoom, bars) */
    --pill-bg: #ffffff;
    --pill-border: rgba(0, 0, 0, 0.08);
    --pill-text: rgba(0, 0, 0, 0.75);
    --pill-text-mute: rgba(0, 0, 0, 0.38);
    --pill-hover: rgba(0, 0, 0, 0.06);
    --pill-active: rgba(0, 0, 0, 0.08);
    --pill-sep: rgba(0, 0, 0, 0.07);
    --pill-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --pill-backdrop: blur(20px);

    /* Bars (text bar + prompt bar) */
    --bar-bg: #ffffff;
    --bar-border: rgba(0, 0, 0, 0.05);
    --bar-text: rgba(0, 0, 0, 0.85);
    --bar-text-mute: rgba(0, 0, 0, 0.35);
    --bar-placeholder: rgba(0, 0, 0, 0.25);
    --bar-sep: rgba(0, 0, 0, 0.08);
    --bar-shadow: 0 2px 40px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ── Dark Mode — paleta de la barra flotante ── */
html:has(body.dark) {
    background: #0a0a0a;
}

body.dark {
    --bg-global: #141416;
    --card-bg: rgba(20, 20, 22, 0.93);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.08);
    --text-main: rgba(255, 255, 255, 0.9);
    --text-mute: rgba(255, 255, 255, 0.38);
    --glass-bg: rgba(20, 20, 22, 0.93);

    --dot-active-border: rgba(255, 255, 255, 0.85);

    --pill-bg: rgba(20, 20, 22, 0.93);
    --pill-border: rgba(255, 255, 255, 0.07);
    --pill-text: rgba(255, 255, 255, 0.7);
    --pill-text-mute: rgba(255, 255, 255, 0.38);
    --pill-hover: rgba(255, 255, 255, 0.1);
    --pill-active: rgba(255, 255, 255, 0.1);
    --pill-sep: rgba(255, 255, 255, 0.08);
    --pill-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    --bar-bg: rgba(20, 20, 22, 0.93);
    --bar-border: rgba(255, 255, 255, 0.08);
    --bar-text: rgba(255, 255, 255, 0.9);
    --bar-text-mute: rgba(255, 255, 255, 0.35);
    --bar-placeholder: rgba(255, 255, 255, 0.28);
    --bar-sep: rgba(255, 255, 255, 0.1);
    --bar-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Dark mode — slider thumbs & controls */
body.dark .scale-slider::-webkit-slider-thumb,
body.dark .position-slider::-webkit-slider-thumb {
    background: rgba(255, 255, 255, 0.5);
}
body.dark .scale-slider::-moz-range-thumb,
body.dark .position-slider::-moz-range-thumb {
    background: rgba(255, 255, 255, 0.5);
}
body.dark .scale-card::before {
    background: rgba(255, 255, 255, 0.06);
}
body.dark .position-slider {
    background: rgba(255, 255, 255, 0.08);
}
body.dark .position-slider:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Dark mode — download button */
body.dark .download-btn {
    background: #f5f5f7;
    color: #1d1d1f;
}
body.dark .download-btn:hover {
    background: #e5e5e7;
}

/* Dark mode — format toggles, page buttons */
body.dark .format-toggle-btn {
    background: rgba(255, 255, 255, 0.06);
}
body.dark .format-toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}
body.dark .page-btn {
    background: rgba(255, 255, 255, 0.06);
}
body.dark .page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

/* Dark mode — iOS toggle */
body.dark .badge-stroke-toggle input[type="checkbox"] {
    background: rgba(255, 255, 255, 0.1);
}
body.dark .badge-stroke-toggle input[type="checkbox"]::after {
    background: #e5e5e7;
}

/* Dark mode — sidebar border */
body.dark .sidebar-base {
    border-color: rgba(255, 255, 255, 0.08);
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Base ── */
html {
    background: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-global);
    margin: 8px;
    border-radius: 24px;
    height: calc(100vh - 16px);
    padding-left: var(--sidenav-open);
    padding-right: var(--sidenav-open);
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    overflow: hidden;
    position: relative;
    transition: background 0.4s ease, color 0.4s ease, padding-left 0.22s cubic-bezier(0.4, 0, 0.2, 1), padding-right 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

body.nav-collapsed {
    padding-left: var(--sidenav-closed);
    padding-right: var(--sidenav-closed);
}

/* ═══════════════════════════════════════════════
   LAYOUT — Three Column
   ═══════════════════════════════════════════════ */
.side-column {
    width: 33.33vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: relative;
}

.canvas-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    position: relative;
    overflow: visible;
}

/* ═══════════════════════════════════════════════
   SIDEBAR BASE
   ═══════════════════════════════════════════════ */
.sidebar-base {
    width: 340px;
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    border-radius: var(--radius-main);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

/* ── Column edge alignment — 3× closer than centered ── */
.side-column--left {
    align-items: flex-start;
    padding-left: calc((33.33vw - 340px) / 6);
}

.side-column--right {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    align-items: flex-end;
    padding-right: calc((33.33vw - 340px) / 6);
}

/* ── Left Sidebar ── */
.sidebar-left {
    padding: 20px 10px;
    gap: var(--gap-ui);
    max-height: 95vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-left::-webkit-scrollbar {
    display: none;
}

/* ── Header ── */
.sidebar-header {
    margin-bottom: 8px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══════════════════════════════════════════════
   ACCESS GATE
   ═══════════════════════════════════════════════ */

/* ── Access Gate ── */
.access-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #eceae5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.28, 0.11, 0.32, 1);
}

.access-gate--out {
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
}

.gate-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.access-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-ui);
    padding: 44px 20px 20px;
    width: 340px;
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-main);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.access-logo {
    height: 48px;
    width: auto;
    opacity: 0.45;
    filter: brightness(0);
    margin-bottom: 6px;
}

.access-title {
    font-family: 'Sora', sans-serif;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.access-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-mute);
    margin-bottom: 8px;
}

.access-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-ui);
    width: 100%;
}

.access-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-ui);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    box-sizing: border-box;
    transition: var(--transition-smooth);
}

.access-input::placeholder {
    color: var(--text-mute);
    font-size: 13px;
    font-weight: 400;
}

#accessEmailInput {
    text-align: left;
    letter-spacing: 0;
}

#accessCodeInput {
    text-align: center;
    letter-spacing: 0.20em;
    font-size: 18px;
    font-weight: 600;
}

.access-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 151, 181, 0.10);
    background: rgba(255, 255, 255, 0.65);
}

/* Tono a tono — same warm palette as the card, no contrast pop */
.access-btn {
    width: 100%;
    height: 44px;
    border-radius: var(--radius-ui);
    background: rgba(0, 0, 0, 0.07);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    margin-top: 4px;
    transition: var(--transition-smooth);
    box-shadow: none;
}

.access-btn:hover {
    background: rgba(0, 0, 0, 0.11);
    border-color: rgba(0, 0, 0, 0.09);
}

.access-btn:active {
    transform: scale(0.98);
    background: rgba(0, 0, 0, 0.14);
}

.access-error {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-danger);
    margin-top: 2px;
    animation: fadeIn 0.2s ease;
}


@keyframes accessShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

.access-input--shake {
    animation: accessShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    border-color: var(--accent-danger) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.25) !important;
}

/* ── App watermark — ISO mono top-left ── */
.app-watermark {
    display: none;
}

.brand-badge {
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    background: rgba(0, 151, 181, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   UI COMPONENTS
   ═══════════════════════════════════════════════ */

/* ── Label ── */
.label-style {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-mute);
    text-transform: uppercase;
    padding-left: 12px;
    margin-bottom: 4px;
    margin-top: 8px;
    letter-spacing: 0.04em;
}

/* ── Input Card ── */
.ui-card,
.ui-select,
.file-label {
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-ui);
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    position: relative;
    cursor: pointer;
    box-shadow: none;
}

.ui-card::placeholder {
    color: var(--text-mute);
    font-size: 13px;
}

.ui-card:hover,
.ui-select:hover,
.file-label:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.06);
}

.ui-card:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 151, 181, 0.1);
    transform: none;
}

/* ── File Label ── */
.file-label {
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mute);
}

.file-label svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* ── Select ── */
.ui-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238e8e93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ── Scale Slider Card ── */
.scale-card {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 16px;
    cursor: default;
    position: relative;
    overflow: hidden;
    height: 44px;
    background: var(--input-bg) !important;
    transition: none;
}

/* Rounded fill bar inside card */
.scale-card::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    bottom: 3px;
    width: calc(var(--fill, 0%) - 3px);
    min-width: 0;
    background: rgba(0, 0, 0, 0.045);
    border-radius: calc(var(--radius-ui) - 3px);
    pointer-events: none;
}

.scale-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mute);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin-right: 4px;
}

.scale-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 38px;
    text-align: right;
    position: relative;
    z-index: 1;
}

/* ── Slider (invisible track + vertical bar thumb) ── */
.scale-slider {
    -webkit-appearance: none;
    flex: 1;
    height: 24px;
    background: transparent;
    margin: 0 6px;
    padding: 0;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.scale-slider::-webkit-slider-runnable-track {
    height: 24px;
    background: transparent;
}

.scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 4px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.scale-slider::-webkit-slider-thumb:hover {
    background: rgba(0, 0, 0, 0.45);
}

/* Firefox slider */
.scale-slider::-moz-range-thumb {
    width: 4px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

.scale-slider::-moz-range-track {
    height: 24px;
    background: transparent;
    border: none;
}

/* ── Color Palette ── */
.color-card {
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-ui);
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    width: 100%;
}

.color-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
}

.color-dot:hover {
    transform: scale(1.2);
}

.color-dot.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--input-bg), 0 0 0 4px currentColor;
}

/* ── Badge Hex Color Inputs ── */
.badge-hex-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.hex-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hex-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hex-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.hex-input {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
    height: 36px;
    padding: 0 8px;
    text-transform: uppercase;
}

/* ── Logo Toggle ── */
.logo-toggle-row {
    display: flex;
    gap: 4px;
    padding: 0;
}

.logo-toggle-btn {
    flex: 1;
    height: 36px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-ui);
    background: var(--input-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 500;  /* Medium weight like Apple */
    letter-spacing: -0.01em;
    color: var(--text-mute);
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.logo-toggle-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.logo-toggle-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* ── Format Toggle ── */
.format-toggle-row {
    display: flex;
    gap: 6px;
    padding: 0;
    background: none;
}

.format-toggle-btn {
    flex: 1;
    border: none;
    border-radius: var(--radius-ui);
    background: rgba(0, 0, 0, 0.04);
    font-family: 'Inter', -apple-system, sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    opacity: 0.5;
}

.format-toggle-btn:hover:not(.active) {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.06);
}

.format-toggle-btn:active {
    transform: scale(0.96);
}

/* Botón activo: fondo oscuro tone-to-tone, texto color paleta */
.format-toggle-btn.active {
    background: var(--format-btn-bg, #1d1d1f);
    opacity: 1;
}

.format-toggle-btn.active .format-label {
    color: var(--active-color, #DDFF9D);
}

.format-toggle-btn.active .format-ratio {
    color: var(--active-color, #DDFF9D);
    opacity: 0.6;
}

.format-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-mute);
}

.format-ratio {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-mute);
}

/* ── Download Button ── */
.download-btn {
    background: #1d1d1f;
    color: #fff;
    border: none;
    height: 48px;
    border-radius: 999px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.download-btn:hover {
    background: #2c2c2e;
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.download-btn:active {
    transform: scale(0.97);
}

.download-btn.ready {
    background: #34C759 !important;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

/* ── Progress Bar ── */
.export-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--input-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-mute);
    min-width: 32px;
    text-align: right;
}

/* Fixed pill overlay shown during export */
.export-progress--fixed {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    min-width: 260px;
    max-width: 360px;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 999px;
    padding: 20px 20px;
    box-shadow: var(--bar-shadow);
}

/* AI Key floating panel */
.ai-key-panel {
    position: fixed;
    left: calc(var(--sidenav-open) + 16px);
    bottom: 16px;
    z-index: 300;
    flex-direction: column;
    gap: 8px;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--bar-shadow);
    min-width: 280px;
}

body.nav-collapsed .ai-key-panel {
    left: calc(var(--sidenav-closed) + 16px);
}

/* ═══════════════════════════════════════════════
   TAB PANELS
   ═══════════════════════════════════════════════ */
.tab-panel {
    display: none;
    flex-direction: column;
    gap: var(--gap-ui);
}

.tab-panel.active {
    display: flex;
}

/* Hide elements per tab */
body.tab-poster .hide-for-poster {
    display: none;
}

body.tab-badge .hide-for-badge {
    display: none;
}

/* ── Empty State ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    text-align: center;
}

.empty-state p {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.empty-state span {
    font-size: 12px;
    color: var(--text-mute);
}

/* ═══════════════════════════════════════════════
   DATA PREVIEW
   ═══════════════════════════════════════════════ */
.data-preview {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-ui);
    padding: 12px;
    margin-top: 4px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-table-wrap {
    overflow-x: auto;
    margin-bottom: 8px;
}

.preview-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.preview-table-wrap th {
    text-align: left;
    padding: 4px 6px;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--input-border);
}

.preview-table-wrap td {
    padding: 5px 6px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.data-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
}

.data-stats span:first-child {
    color: var(--text-mute);
}

.status-ok {
    color: var(--accent-success);
}

.status-error {
    color: var(--accent-danger);
}

/* ── Page Navigator ── */
.page-nav {
    animation: slideDown 0.3s ease;
}

.page-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 18px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.08);
}

.page-btn:active:not(:disabled) {
    transform: scale(0.92);
}

.page-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mute);
    min-width: 50px;
    text-align: center;
}

/* ═══════════════════════════════════════════════
   POSTER CANVAS
   ═══════════════════════════════════════════════ */
.poster-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Multi-format container */
.poster-formats-container {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.poster {
    /* Dynamic dimensions set inline via poster-generator.js */
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: none;  /* No borders - Apple style */
    box-shadow: none;  /* Sin sombra de marco */
    transition: var(--transition-smooth);
}

body.dark .poster {
    box-shadow: none;
}

/* Background */
.bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: move;
}

.bg-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    pointer-events: none;
    display: none;
}

/* Format label overlay */
.format-label-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    z-index: 10;
    pointer-events: none;
}

/* Logo Container */
.logo-container {
    position: absolute;
    z-index: 50;
    pointer-events: none;
    color: #DDFF9D;  /* Color por defecto (Amarillo) - evita flash al cargar */
    transition: color 0.15s ease;  /* Transición más rápida */
}

/* Logo Container - Posteo (5:4) alineado con text-container */
.poster[data-format="posteo"] .logo-container {
    left: 26px;
    bottom: 8px;
}

/* Logo Container - Historia (9:16): bloque bajado 112px @1080 (25.2px preview): 44 - 25.2 = 18.8px */
.poster[data-format="historia"] .logo-container {
    left: 15px;
    bottom: 18.8px;
}

/* Logo Container - Reels (9:16): posición original */
.poster[data-format="reels"] .logo-container {
    left: 15px;
    bottom: 44px;
}

/* Logo Image - Escala base para logos de programas externos */
.logo-image {
    display: block;
    width: auto;
    object-fit: contain;
    transition: opacity 0.15s ease;  /* Transición suave al cambiar logos */
}

.poster[data-format="posteo"] .logo-image {
    height: 45px;
}

.poster[data-format="historia"] .logo-image,
.poster[data-format="reels"] .logo-image {
    height: 31.5px;
}

/* SVG Inline - DNE Isotipo (cambia con colores) */
.logo-svg-inline {
    display: block;
    width: auto;
    transition: color 0.15s ease, opacity 0.15s ease;  /* Transiciones suaves */
}

.poster[data-format="posteo"] .logo-svg-inline {
    height: 62px;
    transform: translate(-3px, 9px);
}

.poster[data-format="historia"] .logo-svg-inline,
.poster[data-format="reels"] .logo-svg-inline {
    height: 45px;
    transform: translate(-2px, 6px);
}

/* Escala para DNE Isotipo */
.poster[data-format="posteo"] .logo-container.logo-iso .logo-svg-inline {
    height: 62px;
}

.poster[data-format="historia"] .logo-container.logo-iso .logo-svg-inline,
.poster[data-format="reels"] .logo-container.logo-iso .logo-svg-inline {
    height: 45px;
}

/* Text Container */
.text-container {
    position: absolute;
    z-index: 40;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #DDFF9D;  /* Color inicial amarillo - evita flash negro */
    transition: color 0.15s ease;  /* Transición rápida y suave */
}

/* Posteo (5:4) - Ajustado según medidas de Figma (86px @ 1080px = 28px @ 346px preview) */
.poster[data-format="posteo"] .text-container {
    left: 28px;
    right: 28px;
    bottom: 60px;
    gap: 8px;
}

/* Historia (9:16): bloque bajado 112px @1080 (25.2px preview): 84 - 25.2 = 58.8px */
.poster[data-format="historia"] .text-container {
    left: 17px;
    right: 17px;
    bottom: 58.8px;
    gap: 5px;
}

/* Reels (9:16): posición original */
.poster[data-format="reels"] .text-container {
    left: 17px;
    right: 17px;
    bottom: 84px;
    gap: 5px;
}

/* Tipografía base */
.etiqueta,
.subtitle {
    font-family: 'Sora', sans-serif;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
}

.etiqueta {
    text-transform: none;   /* respeta mayúsculas/minúsculas escritas */
}

.subtitle {
    line-height: 1.1;
}

.title {
    font-family: 'Sora', sans-serif;
    font-weight: 300;
    line-height: 0.95;
    white-space: pre-line;
    letter-spacing: -0.05em;
}

/* Tamaños de texto para Posteo (5:4) - reducidos 20% para dar espacio a logos */
.poster[data-format="posteo"] .etiqueta,
.poster[data-format="posteo"] .subtitle {
    font-size: 12px;
}

.poster[data-format="posteo"] .title {
    font-size: 24px;
}

/* Tamaños de texto para Historia / Reels (9:16) - reducido 10% */
.poster[data-format="historia"] .etiqueta,
.poster[data-format="historia"] .subtitle,
.poster[data-format="reels"] .etiqueta,
.poster[data-format="reels"] .subtitle {
    font-size: 9px;
}

.poster[data-format="historia"] .title,
.poster[data-format="reels"] .title {
    font-size: 17px;
}

/* ═══════════════════════════════════════════════
   YOUTUBE THUMBNAIL (16:9 — 512×288 preview)
   ═══════════════════════════════════════════════ */
.poster[data-format="youtube"] .logo-container {
    left: 68px;
    bottom: 28px;
}
.poster[data-format="youtube"] .logo-image {
    height: 92px;
}
.poster[data-format="youtube"] .logo-svg-inline {
    height: 124px;
    transform: translate(-6px, 18px);
}
.poster[data-format="youtube"] .logo-container.logo-iso .logo-svg-inline {
    height: 124px;
}
.poster[data-format="youtube"] .text-container {
    left: 68px;
    right: 68px;
    bottom: 124px;
    gap: 20px;
}
.poster[data-format="youtube"] .etiqueta,
.poster[data-format="youtube"] .subtitle {
    font-size: 30px;
}
.poster[data-format="youtube"] .title {
    font-size: 68px;
}

/* Logos ocultos en miniaturas (por el momento) */
.poster[data-format="youtube"] .logo-container {
    display: none;
}

/* ── Versiones de miniatura ──
   Un único factor (--yt-scale) controla el tamaño de TODAS las versiones.
   Cada font-size/line-height se calcula con los valores del diseño (1920px)
   por ese factor, así se conserva la relación exacta entre versiones.
   Ajustá solo --yt-scale para agrandar/achicar todo proporcionalmente. */
#ytFormatsContainer {
    --yt-scale: 0.41;   /* acompaña displayWidth 1000 (miniatura a tamaño cómodo) */
}

.poster[data-format="youtube"] .title {
    font-family: 'Sora', sans-serif;
    letter-spacing: -0.03em;
    white-space: pre-line;
}

/* Versión: 7 días de avances — Bold, centrado H+V (diseño: 208 / 188) */
#ytFormatsContainer.yt-ver-avances .poster[data-format="youtube"] .text-container {
    left: 0; right: 0; top: 0; bottom: 0;
    justify-content: center;
    align-items: center;
}
#ytFormatsContainer.yt-ver-avances .poster[data-format="youtube"] .title {
    font-weight: 700;
    font-size: calc(208px * var(--yt-scale));
    line-height: calc(188px * var(--yt-scale));
    text-align: center;
}

/* Versión: Tres palabras clave — SemiBold, arriba-izquierda (diseño: 185 / 180) */
#ytFormatsContainer.yt-ver-clave .poster[data-format="youtube"] .text-container {
    left: 33px; right: 33px; top: 47px; bottom: auto;
    justify-content: flex-start;
    align-items: flex-start;
}
#ytFormatsContainer.yt-ver-clave .poster[data-format="youtube"] .title {
    font-weight: 700;
    font-size: calc(185px * var(--yt-scale));
    line-height: calc(180px * var(--yt-scale));
    text-align: left;
}

/* Versión: Conferencia de prensa — Bold, abajo-izquierda (diseño: 200 / 207) */
#ytFormatsContainer.yt-ver-conferencia .poster[data-format="youtube"] .text-container {
    left: 36px; right: 36px; top: auto; bottom: 34px;
    justify-content: flex-end;
    align-items: flex-start;
}
#ytFormatsContainer.yt-ver-conferencia .poster[data-format="youtube"] .title {
    font-weight: 700;
    font-size: calc(200px * var(--yt-scale));
    line-height: calc(207px * var(--yt-scale));
    text-align: left;
}

.bold-part {
    font-weight: 800 !important;
}

/* ── Baseline 0 System ──
   baseline 0 = subtitle baseline (referencia).
   Cuando subtitle está vacío, el título baja para que
   su baseline coincida con baseline 0.
   ──────────────────────────────────────────────── */
.etiqueta:empty,
.title:empty,
.subtitle:empty {
    display: none;
}

/* ═══════════════════════════════════════════════
   BADGE CONTROLS - Size & Position
   ═══════════════════════════════════════════════ */
.badge-size-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.size-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.size-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-left: 4px;
}

.size-input {
    text-align: center;
    font-weight: 600;
    height: 40px;
    padding: 0 8px;
}

.position-controls {
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-ui);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.position-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-mute);
    min-width: 80px;
}

.position-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    outline: none;
    transition: var(--transition-smooth);
}

.position-slider:hover {
    background: rgba(0, 0, 0, 0.1);
}

.position-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 4px;
    height: 22px;
    background: #1d1d1f;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.position-slider::-webkit-slider-thumb:hover {
    transform: scaleY(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.position-slider::-moz-range-thumb {
    width: 4px;
    height: 22px;
    background: #1d1d1f;
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

.position-slider::-moz-range-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    border: none;
}

/* ═══════════════════════════════════════════════
   BADGE SHEET CANVAS
   ═══════════════════════════════════════════════ */
.badge-sheet-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
    padding-top: 24px;
}

.badge-sheet {
    /* A4 Landscape at screen scale - will be updated dynamically */
    width: 1123px;
    height: 794px;
    background: #FFFFFF;
    position: relative;
    border-radius: 4px;
    border: 1px solid #F0F0F0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.06);
    transform-origin: center center;

    /* Grid - gafetes pegados sin gaps */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    padding: 0;  /* Sin padding - márgenes controlados por layout */
    gap: 0;  /* Sin gap - gafetes pegados */
    justify-content: center;
    align-content: center;
}

body.dark .badge-sheet {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Badge Slot - pegados sin gaps para eficiencia de corte */
.badge-slot {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Línea de corte — outline interior para no alterar dimensiones */
.badge-sheet.show-stroke .badge-slot {
    outline: 0.5px solid rgba(0, 0, 0, 0.10);
    outline-offset: -0.5px;
}

/* ── Badge Stroke Toggle (iOS switch) ── */
.badge-stroke-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    user-select: none;
}

.badge-stroke-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 42px;
    height: 26px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.badge-stroke-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-stroke-toggle input[type="checkbox"]:checked {
    background: #34C759;
}

.badge-stroke-toggle input[type="checkbox"]:checked::after {
    transform: translateX(16px);
}

.badge-stroke-label {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.badge-inner {
    /* Actual badge card - dimensions set dynamically */
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px 20px;
}

/* Badge text container - allows positioning */
.badge-text-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin: 0;
    padding: 0;
    transition: transform 0.2s ease;
}

/* Badge nombre y apellido — cada uno en su línea, Sora SemiBold 16pt */
.badge-nombre,
.badge-apellido {
    font-family: 'Sora', sans-serif;
    font-size: 16pt;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
    text-wrap: pretty;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.badge-pais {
    font-family: 'Sora', sans-serif;
    font-size: 11pt;
    font-weight: 400;
    color: #1C1C1E;
    letter-spacing: 0.01em;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
    text-wrap: pretty;
    margin: 6px 0 0 0;
    padding: 0;
}

.badge-logo {
    position: absolute;
    bottom: 16px;
    left: 24px;
    width: 32px;
    height: auto;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   RIGHT SIDEBARS
   ═══════════════════════════════════════════════ */
.sidebar-right {
    padding: 24px 8px;
    max-height: 0;
    opacity: 0;
    transition: var(--transition-smooth);
    overflow-y: auto;
    scrollbar-width: none;
    visibility: hidden;
    position: absolute;
}

.sidebar-right::-webkit-scrollbar {
    display: none;
}

.sidebar-right.active {
    max-height: 88vh;
    opacity: 1;
    visibility: visible;
}

#rightSidebar.active {
    height: auto;
    max-height: 95vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#rightSidebar .linea-nav {
    flex-shrink: 0;
}

#rightSidebar .linea-slide.active {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

#rightSidebar .linea-slide.active::-webkit-scrollbar {
    display: none;
}

.sidebar-right-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    padding: 10px 8px;
    border-bottom: 2px solid var(--accent-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-right-title--tips {
    border-bottom-color: var(--accent-tips);
}

.sidebar-right-body {
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Info Cards */
.info-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-main);
}

.info-card h4 {
    font-size: 11px;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 4px;
    letter-spacing: 0.03em;
}

.info-card p + p {
    margin-top: 4px;
}

.info-card--danger {
    border-left: 4px solid var(--accent-danger);
}

.narrative-badge {
    background: #fff9e6;
    color: #b08700;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    display: inline-block;
    margin-bottom: 5px;
}

/* Tip Table */
.tip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 5px;
}

.tip-table th {
    text-align: left;
    color: var(--text-mute);
    padding: 4px;
    font-weight: 700;
}

.tip-table td {
    padding: 8px 4px;
    border-top: 1px solid var(--input-border);
}

/* Checklist */
.checklist-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 16px;
    padding: 0 8px;
}

.check-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.check-btn:hover {
    transform: translateX(5px);
    background: rgba(0, 151, 181, 0.02);
}

.check-btn.checked {
    background: #E8F5E9;
    border-color: var(--accent-success);
}

body.dark .check-btn.checked {
    background: rgba(39, 174, 96, 0.15);
}

.dot {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.checked .dot {
    background: var(--accent-success);
    border-color: var(--accent-success);
}

.checked .dot::after {
    content: '✓';
}

.check-btn span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* ── Checklist celebration ── */
.checklist-celebration {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 2px;
    padding: 12px;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1px solid rgba(39, 174, 96, 0.22);
    border-left: 3px solid var(--accent-success);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
}

.checklist-celebration.cel-visible {
    animation: celebReveal 0.4s cubic-bezier(0.28, 0.11, 0.32, 1) forwards;
}

@keyframes celebReveal {
    0%   { opacity: 0; max-height: 0; transform: translateY(4px); }
    100% { opacity: 1; max-height: 80px; transform: translateY(0); }
}

.cel-icon {
    font-size: 14px;
    color: var(--accent-success);
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1.4;
}

.checklist-celebration p {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-mute);
    margin: 0;
}

.checklist-celebration p strong {
    font-weight: 600;
    color: #2E7D32;
}

body.dark .checklist-celebration p strong {
    color: #81C784;
}

/* ── Líneas Transversales Navigator ── */
.linea-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 12px;
    margin-bottom: 10px;
}

.linea-nav-indicator {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.03em;
}

.linea-nav-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.linea-nav-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.linea-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}


/* Todos los slides en la misma celda grid → el contenedor siempre tiene la altura del más alto */
.linea-slides-container {
    display: grid;
}

.linea-slide {
    grid-area: 1 / 1;
    visibility: hidden;
    pointer-events: none;
}

.linea-slide.active {
    visibility: visible;
    pointer-events: auto;
}

.comunicar-list {
    margin: 4px 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comunicar-list li {
    font-size: 13px;
    color: var(--text-main);
}

.idea-fuerza {
    font-size: 13px;
    font-style: italic;
    color: var(--text-mute);
    margin-top: 4px;
}

.tono-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.tono-tag {
    background: rgba(0, 151, 181, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 151, 181, 0.2);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    letter-spacing: 0.02em;
}

body.dark .tono-tag {
    background: rgba(0, 151, 181, 0.15);
    border-color: rgba(0, 151, 181, 0.3);
}

.linea-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--text-mute);
}

.linea-placeholder p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.linea-placeholder span {
    font-size: 12px;
    opacity: 0.7;
}

/* ── Línea Elite Components ── */
.linea-comm-badge {
    margin: 0 8px 10px;
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.35);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #1a7a3a;
}

body.dark .linea-comm-badge {
    background: rgba(52, 199, 89, 0.15);
    color: #5ddb7e;
}

.linea-tip {
    margin-top: 8px;
    background: rgba(255, 204, 0, 0.1);
    border-left: 3px solid #ffcc00;
    border-radius: 0 6px 6px 0;
    padding: 6px 8px;
    font-size: 12px;
    color: var(--text-mute);
}

.tono-desc-list {
    margin: 4px 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tono-desc-list li {
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.4;
}

.tono-desc-list li strong {
    color: var(--accent-primary);
}

.feedback-list {
    margin: 4px 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feedback-list li {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 6px;
}

.feedback-warn {
    background: rgba(255, 149, 0, 0.1);
    color: #b85c00;
}

.feedback-tip {
    background: rgba(0, 151, 181, 0.08);
    color: var(--accent-primary);
}

.feedback-ok {
    background: rgba(52, 199, 89, 0.1);
    color: #1a7a3a;
}

body.dark .feedback-warn { background: rgba(255,149,0,0.15); color: #ffaa55; }
body.dark .feedback-tip  { background: rgba(0,151,181,0.15);  color: #4dd0e8; }
body.dark .feedback-ok   { background: rgba(52,199,89,0.15);  color: #5ddb7e; }

.checklist-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-mute);
    margin: 0 0 4px 2px;
}

.linea-cierre {
    margin: 12px 8px 4px;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.5;
}

.linea-cierre p {
    margin: 0;
}

.linea-cierre p + p {
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   BOTTOM NAVIGATION BAR
   ═══════════════════════════════════════════════ */
/* ── Bottom Nav Container ── */
/* ── Top Navigation Bar ── */
/* ═══════════════════════════════════════════════
   SIDE NAV — vertical, colapsable
   ═══════════════════════════════════════════════ */
:root {
    --sidenav-open: 290px;
    --sidenav-closed: 70px;
}

.side-nav {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidenav-open);
    background: transparent;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 8px;
    gap: 2px;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.side-nav.collapsed {
    width: var(--sidenav-closed);
    padding: 12px 3px;
    align-items: center;
}

/* Header */
.side-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 10px;
    flex-shrink: 0;
    background: var(--pill-bg);
    border-radius: 999px;
    border: 1px solid var(--pill-border);
    box-shadow: var(--pill-shadow);
}

.side-nav-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.6;
    filter: brightness(0);
    transition: filter 0.3s ease;
}

body.dark .side-nav-logo {
    filter: brightness(0) invert(1);
}

.side-nav-title {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--pill-text);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.15s ease;
    flex: 1;
}

.side-nav.collapsed .side-nav-title {
    opacity: 0;
    pointer-events: none;
}

.side-nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pill-text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.22s ease;
    margin-left: auto;
}

.side-nav-toggle:hover {
    background: var(--pill-hover);
    color: var(--pill-text);
}

.side-nav.collapsed .side-nav-toggle {
    transform: rotate(180deg);
    margin-left: 0;
}

/* Divider — solo espaciado entre pills */
.side-nav-divider {
    height: 6px;
    flex-shrink: 0;
}

/* Section — solo contenedor flex, sin visual */
.side-nav-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 24px;
    border-radius: 0;
}

/* Icon */
.side-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.55;
    color: inherit;
}

.nav-item.active .side-nav-icon,
.nav-toggle-btn.on .side-nav-icon,
.nav-toggle-btn.tips-on .side-nav-icon {
    opacity: 0.85;
}

/* Nav Slider (unused) */
.nav-slider { display: none; }
.nav-group  { display: contents; }

/* ── Nav menu toggle button — absolute top-left ── */
.nav-menu-toggle {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    box-shadow: var(--pill-shadow);
    border-radius: 16px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.25);
    transition: background 0.15s ease;
}

.nav-menu-toggle:hover {
    background: var(--pill-hover);
}
body.dark .nav-menu-toggle {
    color: rgba(255, 255, 255, 0.25);
}

.nav-toggle-panel {
    transform-box: fill-box;
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-menu-toggle--closed .nav-toggle-panel {
    transform: scaleX(0.18);
}

/* ── Nav menu content — slide in/out from left ── */
.nav-menu-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 104px;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.nav-menu-content.nav-menu--hidden {
    transform: translateX(calc(-100% - 40px));
    opacity: 0;
    pointer-events: none;
}

#navGroup {
    margin-top: 8px;
}

#navGroup + .side-nav-divider {
    height: 18px;
}

/* ── Nav Items ── */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 54px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--pill-text);
    background: var(--pill-bg);
    border: none;
    box-shadow: none;
    cursor: pointer;
    border-radius: 999px;
    white-space: nowrap;
    user-select: none;
    /* Overshoot elástico sutil al pasar el cursor */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.15s ease, color 0.15s ease;
    will-change: transform;
}

.nav-item:hover:not(.active) {
    /* Tono sobre tono: tinte suave del color de paleta activo */
    background: color-mix(in srgb, var(--active-color, #DDFF9D) 40%, transparent);
}

.nav-item:hover {
    transform: scale(1.025);
}

.nav-item.active {
    background: var(--pill-active);
    color: var(--text-main);
    font-weight: 600;
}

/* Separadores ocultos — cada item es su propia pill */
.side-nav-item-sep {
    display: none;
}

/* ── Toggle Buttons ── */
.nav-toggle-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    height: 54px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--pill-text);
    background: var(--pill-bg);
    border: none;
    box-shadow: none;
    cursor: pointer;
    border-radius: 999px;
    white-space: nowrap;
    user-select: none;
    /* Overshoot elástico sutil al pasar el cursor */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.15s ease, color 0.15s ease;
    will-change: transform;
}

.nav-toggle-btn:hover {
    /* Tono sobre tono: tinte suave del color de paleta activo */
    background: color-mix(in srgb, var(--active-color, #DDFF9D) 40%, transparent);
    color: var(--text-main);
    transform: scale(1.025);
}

.nav-toggle-btn.on,
.nav-toggle-btn.tips-on {
    background: var(--pill-active);
    color: var(--text-main);
    font-weight: 600;
}

/* Labels hidden when collapsed */
.side-nav.collapsed .side-nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}


/* Collapsed: items se centran como círculos */
.side-nav.collapsed .side-nav-section {
    align-items: center;
    width: 54px;
}

.side-nav.collapsed .nav-item,
.side-nav.collapsed .nav-toggle-btn {
    width: 54px;
    height: 54px;
    justify-content: center;
    padding: 0;
}

/* Collapsed: header pill narrows to toggle only */
.side-nav.collapsed .side-nav-header {
    width: 54px;
    padding: 5px;
    justify-content: center;
    gap: 0;
}

.side-nav.collapsed .side-nav-logo {
    display: none;
}

.side-nav.collapsed .side-nav-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 0;
}

.side-nav-label {
    opacity: 1;
    transition: opacity 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATIONS — Sileo-inspired
   Pill shape, badge icon, spring physics
   ═══════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes toast-spring-in {
    0%   { transform: translateY(-16px) scale(0.92); opacity: 0; }
    40%  { transform: translateY(4px) scale(1.02); opacity: 1; }
    65%  { transform: translateY(-2px) scale(0.995); }
    82%  { transform: translateY(1px) scale(1.002); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes toast-spring-out {
    0%   { transform: translateY(0) scale(1); opacity: 1; }
    40%  { transform: translateY(4px) scale(1.02); opacity: 0.8; }
    100% { transform: translateY(-24px) scale(0.9); opacity: 0; }
}

@keyframes badge-pop {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.18); }
    75%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}

/* ── Container ── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

/* ── Toast Pill ── */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 8px;
    border-radius: 999px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
    background: rgba(28, 28, 30, 0.92);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    pointer-events: auto;
    transform: translateY(-16px) scale(0.92);
    opacity: 0;
    will-change: transform, opacity;
}

.toast.visible {
    animation: toast-spring-in 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.dismissing {
    animation: toast-spring-out 350ms cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* ── Badge (colored circle with icon) ── */
.toast-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
}

.toast.visible .toast-badge {
    animation: badge-pop 450ms 100ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-badge--success {
    background: #34C759;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.4);
}

.toast-badge--error {
    background: #FF3B30;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
}

.toast-badge--info {
    background: #007AFF;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4);
}

/* ── Toast Message ── */
.toast-msg {
    flex: 1;
    line-height: 1;
    padding-right: 2px;
}

/* ── Type-specific pill glow ── */
.toast--success {
    box-shadow:
        0 4px 24px rgba(52, 199, 89, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
}

.toast--error {
    box-shadow:
        0 4px 24px rgba(255, 59, 48, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
}

.toast--info {
    box-shadow:
        0 4px 24px rgba(0, 122, 255, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
}

/* ── Dark mode adjustment ── */
body.dark .toast {
    background: rgba(44, 44, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .toast.visible { animation: none; transform: translateY(0) scale(1); opacity: 1; }
    .toast.dismissing { animation: none; opacity: 0; transition: opacity 0.2s ease; }
    .toast.visible .toast-badge { animation: none; transform: scale(1); }
}

/* ═══════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1400px) {
    .badge-sheet {
        transform: scale(0.5);
    }
}

@media (max-width: 1024px) {
    body {
        flex-direction: column;
        overflow-y: auto;
    }

    .side-column {
        width: 100%;
        height: auto;
        padding: 16px;
    }

    .sidebar-base {
        width: 100%;
        max-width: 480px;
    }

    .canvas-area {
        padding: 16px;
    }

    .poster {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .badge-sheet {
        transform: scale(0.35);
    }

    .side-column--right {
        display: none;
    }

    /* Tablet/iPad: el menú lateral se comporta como "collapsed"
       (íconos centrados, sin labels) para que no se corten. */
    .side-nav {
        width: var(--sidenav-closed);
        padding: 12px 3px;
        align-items: center;
    }

    .side-nav-title,
    .side-nav-label {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }

    .side-nav-section {
        align-items: center;
        width: 54px;
        padding: 0;
    }

    .side-nav .nav-item,
    .side-nav .nav-toggle-btn {
        width: 54px;
        height: 54px;
        justify-content: center;
        padding: 0;
    }

    .side-nav-header {
        width: 54px;
        padding: 5px;
        justify-content: center;
        gap: 0;
    }

    .side-nav-logo {
        display: none;
    }

    .side-nav-toggle {
        margin-left: 0;
    }

    /* Botón de menú alineado con los círculos del nav: mismo tamaño (54px)
       y mismo eje vertical (centro x=35px del riel colapsado de 70px). */
    .nav-menu-toggle {
        width: 54px;
        height: 54px;
        left: 8px;
        top: 20px;
        border-radius: 16px;
    }

    /* Padding SIMÉTRICO (antes solo se cambiaba el izquierdo y el derecho
       quedaba en 290px → todo el contenido se corría a la izquierda y se
       angostaba). Con ambos en el ancho cerrado, el contenido se centra. */
    body {
        padding-left: var(--sidenav-closed);
        padding-right: var(--sidenav-closed);
    }
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.poster-wrap,
.badge-sheet-wrap {
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════
   PLATAFORMA AVE
   ═══════════════════════════════════════════════ */

body.tab-ave .hide-for-ave {
    display: none;
}

body.tab-logos #sidebarLeft {
    display: none;
}

.ave-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: visible;
    padding: 24px 0;
    gap: 0;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ave-scale-wrapper {
    position: relative;
    transform-origin: top center;
    flex-shrink: 0;
    background: #ffffff;
}

.ave-canvas {
    width: 1500px;
    height: 540px;
    position: relative;
    overflow: hidden;
    background: transparent;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
}

body.dark .ave-canvas {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.ave-canvas--360 {
    height: 360px;
}

.ave-bg-wrapper {
    position: absolute;
    inset: 0;
    cursor: move;
}

.ave-bg-preview {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    object-fit: cover;
    transform-origin: center center;
    pointer-events: none;
}

.ave-shadow-overlay {
    position: absolute;
    top: -24px;
    left: 0;
    right: 0;
    width: 100%;
    height: 200%;
    object-fit: cover;
    object-position: bottom;
    pointer-events: none;
    z-index: 1;
    display: none;
}

.ave-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 52px 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    cursor: move;
}

.ave-logo-img {
    display: none;
}

.ave-text-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ave-title {
    font-family: 'Sora', sans-serif;
    font-size: 72px;
    font-weight: 600;
    line-height: 75px;
    letter-spacing: -0.06em;
    color: var(--active-color, #DDFF9D);
    white-space: pre-wrap;
}

.ave-subtitle {
    font-family: 'Sora', sans-serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 47px;
    letter-spacing: -0.03em;
    color: var(--active-color, #DDFF9D);
    white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════
   LOGOTIPOS
   ═══════════════════════════════════════════════ */

.logos-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 32px;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logos-section-title {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--text-main, #1d1d1f);
    margin: 0 0 16px 4px;
    letter-spacing: -0.02em;
}

.logos-list {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.logo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    gap: 16px;
    /* Overshoot elástico sutil: leve "rebote" al entrar el cursor */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.logo-card:hover {
    transform: scale(1.025);
}

@media (prefers-reduced-motion: reduce) {
    .logo-card, .nav-item, .nav-toggle-btn { transition: none; }
    .logo-card:hover, .nav-item:hover, .nav-toggle-btn:hover { transform: none; }
}

.logo-card-name {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main, #1d1d1f);
}

.logo-card-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: #1d1d1f;
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.logo-card-btn:hover {
    opacity: 0.7;
}

body.dark .logo-card-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.logos-sidebar-hint {
    font-size: 13px;
    color: var(--text-secondary, #888);
    line-height: 1.5;
    margin: 0;
}

/* ═══════════════════════════════════════════════
   DESIGN FULLSCREEN — vista a pantalla completa del diseño
   ═══════════════════════════════════════════════ */
.design-fs-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(62% 62% at 50% 42%, #16161b, #08080a 82%);
    opacity: 0;
    transition: opacity 0.28s ease;
    cursor: zoom-out;
    overflow: hidden;
}
.design-fs-overlay.visible { opacity: 1; }

.design-fs-stage {
    transform-origin: center center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 40px 90px rgba(0, 0, 0, 0.55));
}

.design-fs-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.55);
    padding: 9px 17px;
    border-radius: 99rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    animation: fsHintIn 0.5s ease 0.25s forwards;
}
@keyframes fsHintIn { to { opacity: 1; } }

/* ═══════════════════════════════════════════════
   PROPUESTA — landing oscuro contemporáneo (Fourmula.ai)
   Superficie inmersiva #020108, acento naranja, tipografía grande.
   ═══════════════════════════════════════════════ */
/* El lienzo del body está centrado (align-items:center); en Propuesta
   lo estiramos a alto completo para que el contenedor pueda scrollear. */
/* La pantalla de acceso vive inline en index.html (a prueba de cache). */

body.tab-propuesta .canvas-area {
    align-self: stretch;
    background: transparent;
}

/* ── InView: estado inicial + revelado al entrar al viewport ──
   Cualquier elemento con [data-inview] aparece con un fade/slide suave;
   admite escalonado con --inview-delay. */
[data-inview] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--inview-delay, 0s);
    will-change: opacity, transform;
}
[data-inview].is-inview {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    [data-inview] { opacity: 1; transform: none; transition: none; }
}

/* En Propuesta no hay panel lateral derecho: lo ocultamos para que el lienzo
   (y por ende el área scrolleable) ocupe todo el ancho disponible. */
body.tab-propuesta .side-column--right { display: none; }

/* El contenedor de scroll cubre TODA la ventana (no sólo el lienzo central),
   debajo del menú (z 200), para poder scrollear desde cualquier parte. */
body.tab-propuesta .propuesta-wrap {
    position: fixed;
    inset: 8px;
    border-radius: 24px;
    z-index: 100;
}

.propuesta-wrap {
    --prop-bg: #ffffff;
    --prop-bg-2: #ffffff;
    --prop-line: rgba(0, 0, 0, 0.10);
    --prop-accent: #fd7b03;
    --prop-accent-2: #f94a00;
    --prop-fg: #0a0a0a;
    --prop-fg-64: #6b6b70;
    --prop-fg-50: #8a8a90;
    --prop-fg-30: #aeaeb3;
    position: absolute;
    inset: 0;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 92px 40px 150px;
    /* Blanco de base: el aura de la cabecera (.prop-aura) se desvanece
       hacia este blanco a medida que se scrollea. */
    background: #ffffff;
    color: var(--prop-fg-64);
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Aura azul VIVA de la cabecera (misma del chip y de la pantalla de
   codigo; reusa los keyframes auraDrift del bloque inline). Scrollea con
   el contenido y se funde a blanco hacia abajo. ── */
.prop-aura {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 135vh;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(120% 92% at 50% 0%, #e3e9ff 0%, #eef2ff 52%, rgba(255,255,255,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.prop-aura::before,
.prop-aura::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}
.prop-aura::before {
    width: 95vmax; height: 95vmax;
    left: -30vmax; top: -38vmax;
    background: radial-gradient(closest-side, rgba(96, 132, 255, 0.42), transparent 70%);
    animation: auraDrift1 26s ease-in-out infinite alternate;
}
.prop-aura::after {
    width: 85vmax; height: 85vmax;
    right: -30vmax; top: -8vmax;
    background: radial-gradient(closest-side, rgba(150, 176, 255, 0.38), transparent 70%);
    animation: auraDrift2 34s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
    .prop-aura::before, .prop-aura::after { animation: none; }
}

.propuesta-doc {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1140px;
    /* Zoom por defecto al 80% (−20%) de toda la plataforma de Propuesta. */
    zoom: 0.8;
}

/* Reveal al hacer scroll */
.prop-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.prop-reveal.in-view {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .prop-reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════════
   PROPUESTA v2 — pricing page institucional sobria
   Paleta neutra, cards de borde fino, mucho aire, sin gradientes.
   ═══════════════════════════════════════════════ */
.propuesta-doc { color: #1a1a1c; }

/* 1 · HERO / encabezado de pricing */
.pp-hero { text-align: center; max-width: 760px; margin: 0 auto 160px; }
.pp-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #6b6b70;
    padding: 6px 14px;
    border: 1px solid #e2e2e6;
    border-radius: 99rem;
    background: #ffffff;
    margin-bottom: 24px;
}
.pp-title {
    font-weight: 600;
    font-size: clamp(30px, 3.6vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #15151a;
    margin: 0 auto 16px;
    max-width: 18ch;
}
.pp-lead {
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: #5f5f66;
    margin: 0 auto;
    max-width: 54ch;
}
.pp-hero-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 36px;
}
.pp-hero-figure { display: flex; align-items: baseline; gap: 8px; }
.pp-price {
    font-weight: 600;
    font-size: clamp(40px, 5vw, 56px);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #15151a;
}
.pp-price-cur { font-size: 16px; font-weight: 600; letter-spacing: 0.02em; color: #8a8a90; }
.pp-price-note { font-size: 14.5px; color: #6b6b70; margin: 13px 0 0; }
.pp-pill {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #5f5f66;
    padding: 7px 15px;
    border: 1px solid #e2e2e6;
    border-radius: 99rem;
    background: #ffffff;
}

/* 2 · Pricing cards */
.pp-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 184px;
}
.pp-plan {
    display: flex;
    flex-direction: column;
    padding: 34px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0 2px 40px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.pp-plan--primary { border-color: rgba(0, 0, 0, 0.12); }
.pp-plan--secondary { background: #fbfbfc; }
.pp-plan-head { margin-bottom: 20px; }
.pp-plan-title { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: #15151a; margin: 0; }
.pp-plan-sub { font-size: 14px; color: #8a8a90; margin: 3px 0 0; }
.pp-plan-price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 16px; }
.pp-plan-amount {
    font-weight: 600;
    font-size: clamp(34px, 3.4vw, 44px);
    line-height: 1;
    letter-spacing: -0.035em;
    color: #15151a;
}
.pp-plan-amount--quote { font-size: clamp(26px, 2.6vw, 32px); color: #5f5f66; }
.pp-plan-cur { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: #9a9aa0; }
.pp-plan-desc { font-size: 15px; line-height: 1.5; color: #5f5f66; margin: 0 0 22px; }

.pp-list { list-style: none; margin: 0; padding: 0; }
.pp-list li {
    position: relative;
    padding: 10px 0 10px 24px;
    font-size: 14.5px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #3a3a3e;
    border-top: 1px solid #efeff1;
}
.pp-list li:first-child { border-top: 0; }
.pp-list li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 17px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1a1a1c;
}
.pp-list--muted li { color: #6b6b70; }
.pp-list--muted li::before { background: #b4b4b9; }
.pp-plan-foot { margin: 22px 0 0; font-size: 13px; line-height: 1.45; color: #8a8a90; }

.pp-callout {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 12px;
    background: #f2f2f4;
    border: 1px solid #e6e6ea;
}
.pp-callout-title { display: block; font-weight: 600; font-size: 14px; letter-spacing: -0.01em; color: #15151a; margin-bottom: 6px; }
.pp-callout-text { font-size: 13.5px; line-height: 1.45; color: #5f5f66; margin: 0; }

/* 3 · Beneficios — título centrado + cards con ícono (ref. OpenAI) */
.pp-benefits-section { margin-bottom: 192px; }
.pp-benefits-head { text-align: center; max-width: 640px; margin: 0 auto 38px; }
.pp-benefits-title {
    font-weight: 600;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #15151a;
    margin: 0 0 12px;
}
.pp-benefits-sub { font-size: 16px; line-height: 1.5; color: #5f5f66; margin: 0; }
.pp-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pp-benefit {
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 36px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0 2px 40px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.04);
}
.pp-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    color: #15151a;
    margin-bottom: 54px;
}
.pp-benefit-icon svg { width: 26px; height: 26px; }
.pp-benefit-title { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; color: #15151a; margin: 0 0 12px; }
.pp-benefit-text { font-size: 14.5px; line-height: 1.5; color: #5f5f66; margin: 0; }
.pp-benefit-link {
    margin-top: auto;
    padding-top: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #15151a;
    text-decoration: none;
    border-bottom: 1px solid #15151a;
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}
.pp-benefit-link:hover { opacity: 0.6; }
.pp-link-arrow { font-size: 13px; }

/* Encabezado de sección centrado (estilo referencia OpenAI) */
.pp-section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.pp-section-title {
    font-weight: 600;
    font-size: clamp(26px, 2.9vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #15151a;
    margin: 0 0 14px;
}
.pp-section-sub { font-size: 16px; line-height: 1.5; color: #5f5f66; margin: 0; }
.pp-section-sub + .pp-section-sub { margin-top: 14px; }
.pp-section-foot { margin: 40px auto 0; max-width: 680px; text-align: center; font-size: 15px; line-height: 1.5; color: #6b6b70; }

/* Reusables */
.pp-h2 {
    font-weight: 600;
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #15151a;
    margin: 0 0 16px;
}
.pp-body { font-size: 16px; line-height: 1.55; color: #5f5f66; margin: 0 0 14px; max-width: 66ch; }
.pp-body:last-child { margin-bottom: 0; }

/* 4 · Statement — centrado */
.pp-statement { margin: 0 0 192px; }
.pp-statement-highlight {
    text-align: center;
    font-weight: 500;
    font-size: clamp(19px, 2vw, 26px);
    line-height: 1.28;
    letter-spacing: -0.025em;
    color: #15151a;
    margin: 0 auto;
    max-width: 30ch;
}

/* 5 · Módulo de miniaturas — sección demostrativa de producto */
.pp-mm { margin-bottom: 192px; }
.pp-mm-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.25fr);
    gap: 48px;
    align-items: center;
}
.pp-mm-title { text-align: left; margin: 0 0 16px; }
.pp-mm-lead {
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: #15151a;
    margin: 0 0 16px;
}
.pp-mm-sell { font-size: 16px; line-height: 1.55; color: #5f5f66; margin: 0; }
.pp-mm-block { margin-top: 28px; }
.pp-mm-block-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: #15151a; margin: 0 0 5px; }
.pp-mm-block-text { font-size: 14px; line-height: 1.45; color: #6b6b70; margin: 0 0 14px; }
.pp-mm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-mm-chip {
    padding: 8px 14px;
    border: 1px solid #e2e2e6;
    border-radius: 99rem;
    background: #ffffff;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13.5px;
    letter-spacing: -0.01em;
    color: #5f5f66;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.pp-mm-chip:hover { border-color: #c6c6ca; color: #15151a; }
.pp-mm-chip.active { background: #15151a; border-color: #15151a; color: #ffffff; }

.pp-mm-foot {
    margin: 48px auto 0;
    max-width: 720px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: #6b6b70;
}

/* Demo aislada del toolbar — réplica 1:1 de la barra real */
/* min-width:0 en toda la cadena del grid item para que Safari NO agrande la
   columna al ancho de la barra (820px). Así la barra desborda y se recorta. */
.pp-mm-right { min-width: 0; max-width: 100%; }
.mm-demo { width: 100%; min-width: 0; max-width: 100%; }
.mm-stage {
    /* La barra va en position:absolute (regla de abajo), por eso NO afecta el
       ancho de la columna. El stage queda de su ancho normal y overflow:hidden
       recorta la barra de verdad — también en Safari/Mac. */
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: clamp(280px, 30vw, 330px);
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(72% 80% at 20% 16%, rgba(96, 132, 255, 0.50), transparent 62%),
        radial-gradient(66% 76% at 84% 82%, rgba(150, 176, 255, 0.45), transparent 62%),
        radial-gradient(140% 140% at 50% 50%, #eef2ff 0%, #e3e9ff 100%);
}
/* Barra a tamaño real, posicionada absoluta: sangra fuera del rectángulo
   (vista parcial, "Descargar" off-frame) sin afectar el tamaño de la columna. */
.mm-realbar {
    position: absolute;
    top: 50%;
    left: clamp(22px, 2.4vw, 34px);
    transform: translateY(-50%);
    width: 820px;
}
.mm-realbar .poster-prompt-bar { width: 100%; }
.mm-realbar .prompt-row--bottom { flex-wrap: nowrap; }
.mm-realbar .text-bar-input { cursor: default; }
.mm-realbar .prompt-format-trigger { cursor: pointer; }
/* Como el stage ahora recorta con overflow:hidden, los desplegables de la demo
   se limitan en altura para entrar dentro del recorte (scroll si hace falta). */
.mm-realbar .prompt-format-panel {
    max-height: 148px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.mm-realbar .prompt-format-panel::-webkit-scrollbar { width: 6px; }
.mm-realbar .prompt-format-panel::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); border-radius: 3px; }

/* Selector de composición con ancho fijo (no cambia al alternar el nombre) */
#ytVersionTriggerLabel,
#mmSelectLabel {
    display: inline-block;
    min-width: 140px;
}
/* Selector de categoría con ancho fijo (cabe la opción más larga) */
#ytCategoryTriggerLabel,
#mmCatLabel {
    display: inline-block;
    min-width: 162px;
}

/* ── Etiqueta (YouTube): el toggle y el campo editable quedan ocultos.
   La etiqueta se controla desde el selector de Categoría. ── */
.yt-text-row .yt-etq-toggle,
.yt-text-row .yt-etiqueta-field,
.yt-text-row .yt-etiqueta-field + .text-bar-sep {
    display: none;
}
.yt-text-row .yt-etiqueta-field {
    flex: 0 0 auto;
    width: 232px;          /* cabe "Conferencia de prensa" */
    transition: opacity 0.2s ease;
}
.yt-text-row .yt-etiqueta-field.is-off { opacity: 0.4; }

.yt-etq-toggle {
    flex-shrink: 0;
    align-self: center;
    margin-left: 8px;
    width: 38px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--bar-sep, rgba(0,0,0,0.15));
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
}
.yt-etq-toggle .yt-etq-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.yt-etq-toggle.on {
    background: var(--bar-text, #1d1d1f);
}
.yt-etq-toggle.on .yt-etq-knob {
    transform: translateX(16px);
}

/* Cláusula: la etiqueta NUNCA se imprime sobre la pantalla de diseño de YouTube.
   Solo se gestiona el color (vía categorías/swatches). */
#ytFormatsContainer .poster[data-format="youtube"] .etiqueta {
    display: none !important;
}

.mm-demo-note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: -0.005em;
    color: #8a8a90;
}

@media (max-width: 900px) {
    .pp-mm-grid { grid-template-columns: 1fr; gap: 36px; }
    .pp-mm-foot { margin-top: 36px; }
}

/* ═══ 5b · Múltiples pantallas (demo interactiva) — composición invertida ═══ */
/* Oculta (se puede reactivar quitando este display:none). */
.pp-screens { display: none; margin-bottom: 192px; }
.pp-screens-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);  /* demo izq · texto der */
    gap: 56px;
    align-items: center;
}

/* — Demo: stage con aura suave (menos protagonista que mm-stage) — */
.proposal-screen-demo-stage {
    border-radius: 28px;
    padding: clamp(40px, 5vw, 78px) clamp(26px, 4vw, 54px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background:
        radial-gradient(120% 90% at 28% 12%, rgba(120, 170, 225, 0.16), transparent 60%),
        radial-gradient(100% 80% at 88% 92%, rgba(150, 190, 235, 0.11), transparent 65%),
        #f4f7fb;
}
.proposal-screens-nav {
    display: flex;
    flex-wrap: wrap;            /* hasta 5 chips + agregar → envuelven sin overflow */
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

/* — Chip: card blanca, borde fino, radio alto, sombra suave — */
/* — Chips IDÉNTICOS al navegador real: se reutilizan las clases
   .yt-screen-chip / .yt-chip-thumb / .yt-chip-title / .yt-chip-del / .yt-screen-add
   (sus variables --bar-* / --active-* son globales). Solo definimos el estado "máximo". — */
.proposal-screens-nav .yt-screen-add.is-max {
    cursor: default;
    opacity: 0.4;
    border-style: solid;
}
.proposal-screens-nav .yt-screen-add.is-max:hover {
    background: transparent;
    color: var(--bar-text-mute);
    border-color: var(--bar-sep);
    transform: none;
}

/* — Contador discreto — */
.proposal-screen-count {
    margin: 0;
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--prop-fg-64, #6b6b70);
}

/* — Texto de la sección — */
.pp-screens-text { max-width: 520px; }
.pp-screens-lead {
    margin: 14px 0 18px;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.5;
    color: var(--prop-fg, #0a0a0a);
}
.pp-screens-body,
.pp-screens-value {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--prop-fg-64, #6b6b70);
}
.pp-screens-bullets {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 9px;
}
.pp-screens-bullets li {
    position: relative;
    padding-left: 23px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--prop-fg, #0a0a0a);
}
.pp-screens-bullets li::before {
    content: "";
    position: absolute;
    left: 2px; top: 7px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(43, 134, 184, 0.62);
}
.pp-screens-closing {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--prop-fg, #0a0a0a);
}

@media (max-width: 900px) {
    .pp-screens-grid { grid-template-columns: 1fr; gap: 32px; }
    .pp-screens-text { order: 1; max-width: 100%; }    /* texto primero en mobile */
    .proposal-screens-demo { order: 2; }
}

/* 6 · FAQ — acordeones con líneas finas */
.pp-faq { margin-bottom: 192px; }
.pp-faq-list { margin-top: 26px; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.pp-faq-item { border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.pp-faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 2px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #15151a;
}
.pp-faq-item summary::-webkit-details-marker { display: none; }
.pp-faq-icon { position: relative; flex-shrink: 0; width: 16px; height: 16px; }
.pp-faq-icon::before,
.pp-faq-icon::after { content: ""; position: absolute; background: #1a1a1c; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.pp-faq-icon::before { top: 7.25px; left: 0; width: 16px; height: 1.5px; }
.pp-faq-icon::after { top: 0; left: 7.25px; width: 1.5px; height: 16px; }
.pp-faq-item[open] .pp-faq-icon::after { transform: scaleY(0); }
.pp-faq-body { padding: 2px 2px 26px; font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; color: #5f5f66; max-width: 76ch; }

/* 7 · Cierre */
.pp-close { margin-bottom: 56px; }
.pp-final {
    font-weight: 500;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #15151a;
    margin: 20px 0 0;
    max-width: 46ch;
}

/* 8 · CTA final (panel centrado, estilo referencia) */
.pp-cta { margin: 0; }
.pp-cta-inner {
    text-align: center;
    padding: clamp(64px, 9vw, 116px) 32px;
    background: transparent;
}
.pp-cta-title {
    font-weight: 600;
    font-size: clamp(28px, 3.6vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #15151a;
    margin: 0 auto 30px;
    max-width: 18ch;
}
.pp-cta-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    cursor: pointer;
    padding: 12px 21px;
    border-radius: 99rem;
    background: #e2e2e6;
    color: #15151a;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: background 0.2s ease;
}
.pp-cta-btn:hover { background: #d6d6db; }
.pp-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    color: #15151a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: opacity 0.2s ease;
}
.pp-cta-link:hover { opacity: 0.6; }

@media (max-width: 820px) {
    .pp-plans,
    .pp-benefits,
    .pp-cards { grid-template-columns: 1fr; }
    .pp-benefits { gap: 22px; }
}

/* Scroll funcional pero sin barra visible */
.propuesta-wrap {
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
}
.propuesta-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Kicker — pill tag contemporáneo con índice naranja */
.prop-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px 7px 13px;
    border: 1px solid var(--prop-line);
    border-radius: 99rem;
    background: rgba(0, 0, 0, 0.03);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--prop-fg-64);
    margin: 0 0 26px;
}
.prop-kicker i {
    font-style: normal;
    font-weight: 600;
    color: var(--prop-accent);
}

/* Hero */
.prop-hero { margin-bottom: 18px; }
.prop-title {
    font-weight: 600;
    font-size: clamp(40px, 6vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--prop-fg);
    margin: 0 0 30px;
    max-width: 18ch;
}
.prop-lead {
    font-weight: 400;
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--prop-fg-64);
    margin: 0;
    max-width: 46ch;
}

/* Secciones */
.prop-section {
    margin-top: 88px;
    padding-top: 60px;
    border-top: 1px solid var(--prop-line);
}
.prop-h2 {
    font-weight: 600;
    font-size: clamp(30px, 3.8vw, 50px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--prop-fg);
    margin: 0 0 28px;
    max-width: 22ch;
}
.prop-body {
    font-weight: 400;
    font-size: 18px;
    line-height: 1.55;
    letter-spacing: -0.015em;
    color: var(--prop-fg-64);
    margin: 0 0 18px;
    max-width: 62ch;
}
.prop-body:last-child { margin-bottom: 0; }

/* Tarjetas — grid de cards redondeadas (Fourmula) */
.prop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 36px;
}
.prop-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 168px;
    padding: 24px;
    border: 1px solid var(--prop-line);
    border-radius: 20px;
    background: #fafafa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.prop-card:hover {
    transform: translateY(-3px);
    border-color: rgba(253, 123, 3, 0.45);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.prop-card-idx {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--prop-accent);
}
.prop-card-text {
    margin: 30px 0 0;
    font-size: 16.5px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--prop-fg);
}
.prop-card--wide { grid-column: 1 / -1; }

/* Subtítulo dentro de una sección (variantes / categorías) */
.prop-subhead {
    margin: 40px 0 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--prop-fg);
}
.prop-subhead + .prop-grid,
.prop-subhead + .prop-tags { margin-top: 16px; }

/* Tags / categorías de contenido */
.prop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.prop-tag {
    padding: 9px 16px;
    border: 1px solid var(--prop-line);
    border-radius: 99rem;
    background: #ffffff;
    font-size: 14px;
    letter-spacing: -0.01em;
    color: var(--prop-fg-64);
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.prop-tag:hover {
    border-color: rgba(253, 123, 3, 0.55);
    color: var(--prop-fg);
    background: rgba(253, 123, 3, 0.06);
}

/* Statement — frase fuerte del enfoque */
.prop-statement {
    font-weight: 600;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: var(--prop-fg);
    margin: 30px 0 0;
    max-width: 26ch;
}

/* Inversión — pricing card CLARO (contrasta con la sección oscura).
   Redefine las variables de color sólo en este card → los hijos heredan tema claro. */
.prop-invest {
    --prop-line: rgba(0, 0, 0, 0.10);
    --prop-fg: #1d1d1f;
    --prop-fg-64: #5b5b60;
    --prop-fg-50: #76767b;
    --prop-fg-30: rgba(0, 0, 0, 0.40);
    position: relative;
    overflow: hidden;
    margin: 36px 0 0;
    padding: 48px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    background:
        radial-gradient(85% 120% at 0% 0%, rgba(253, 123, 3, 0.08), transparent 52%),
        #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 24px 60px rgba(0, 0, 0, 0.10);
}
/* Patrón de puntos sutil, desvanecido hacia la esquina */
.prop-invest::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(120% 120% at 100% 100%, #000, transparent 70%);
    mask-image: radial-gradient(120% 120% at 100% 100%, #000, transparent 70%);
    pointer-events: none;
}
.prop-invest > * { position: relative; z-index: 1; }

.prop-invest-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}
.prop-invest-label {
    font-size: 14px;
    letter-spacing: -0.01em;
    color: var(--prop-fg-64);
    max-width: 44ch;
}
.prop-invest-badge {
    flex-shrink: 0;
    padding: 7px 14px;
    border: 1px solid rgba(253, 123, 3, 0.4);
    border-radius: 99rem;
    background: rgba(253, 123, 3, 0.08);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--prop-accent);
}
.prop-invest-figure {
    display: flex;
    align-items: baseline;
    gap: 16px;
}
.prop-invest-amount {
    font-weight: 600;
    font-size: clamp(68px, 10vw, 128px);
    line-height: 0.84;
    letter-spacing: -0.05em;
    background: linear-gradient(120deg, var(--prop-accent-2), var(--prop-accent) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.prop-invest-cur {
    align-self: center;
    padding: 6px 13px;
    border: 1px solid var(--prop-line);
    border-radius: 99rem;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--prop-fg-64);
}
.prop-invest-divider {
    height: 1px;
    background: var(--prop-line);
    margin: 34px 0 26px;
}
.prop-invest-includes {
    margin: 0 0 4px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--prop-fg-30);
}
.prop-invest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 44px;
}
.prop-invest-list li {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 0;
    border-top: 1px solid var(--prop-line);
    font-size: 15.5px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--prop-fg-64);
}
.prop-invest-list li::before {
    content: "";
    flex-shrink: 0;
    margin-top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--prop-accent);
}

/* ═══════════════════════════════════════════════
   INVERSIÓN — panel claro estilo pricing (OpenAI)
   ═══════════════════════════════════════════════ */
.prop-pricing {
    margin-top: 8px;
    padding: 44px;
    border-radius: 28px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 44px rgba(0, 0, 0, 0.07);
    color: #1d1d1f;
    font-family: 'Inter', -apple-system, sans-serif;
}
.pricing-head { max-width: 42ch; }
.pricing-title {
    font-weight: 600;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: #0a0a0a;
    margin: 0 0 12px;
}
.pricing-sub {
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: #6b6b70;
    margin: 0;
}

/* Toggle segmentado */
.pricing-toggle {
    display: inline-flex;
    gap: 3px;
    margin: 26px 0 0;
    padding: 4px;
    border-radius: 99rem;
    background: #ececec;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.pricing-toggle-thumb { display: none; }
.pricing-toggle-btn {
    border: 0;
    background: transparent;
    padding: 10px 20px;
    border-radius: 99rem;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #6b6b70;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.pricing-toggle-btn.active {
    color: #0a0a0a;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Pricing card */
.pricing-card {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    margin-top: 22px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
}
.pricing-main { padding: 34px; }
.pricing-aside {
    padding: 34px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    background: #fcfcfc;
}
.pricing-badge {
    display: inline-block;
    padding: 6px 13px;
    border-radius: 99rem;
    border: 1px solid rgba(253, 123, 3, 0.35);
    background: rgba(253, 123, 3, 0.10);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c2590a;
}
.pricing-badge--soft {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.04);
    color: #6b6b70;
}
.pricing-amount {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 20px 0 14px;
}
.pricing-amount-num {
    font-weight: 600;
    font-size: clamp(50px, 6.5vw, 82px);
    line-height: 0.92;
    letter-spacing: -0.045em;
    color: #0a0a0a;
}
.pricing-amount-num--quote {
    font-size: clamp(34px, 4vw, 52px);
    color: #3a3a3e;
}
.pricing-amount-cur {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a8a90;
}
.pricing-plan-desc {
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: #6b6b70;
    margin: 0;
    max-width: 38ch;
}
.pricing-aside-label {
    margin: 0 0 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a9aa0;
}
.pricing-aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pricing-aside-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #3a3a3e;
}
.pricing-aside-list li:first-child { border-top: 0; }
.pricing-aside-list li::before {
    content: "";
    flex-shrink: 0;
    margin-top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fd7b03;
}

/* Beneficios */
.pricing-benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 22px;
}
.benefit-card {
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #ffffff;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.benefit-card:hover {
    transform: translateY(-2px);
    border-color: rgba(253, 123, 3, 0.4);
}
.benefit-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: #0a0a0a;
    margin-bottom: 6px;
}
.benefit-desc {
    font-size: 13.5px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #6b6b70;
    margin: 0;
}

/* Acordeones (FAQ) */
.pricing-faq {
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.10);
}
.faq-item { border-bottom: 1px solid rgba(0, 0, 0, 0.10); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 21px 4px;
    font-weight: 500;
    font-size: 16.5px;
    letter-spacing: -0.02em;
    color: #0a0a0a;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
    position: relative;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}
.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    background: #0a0a0a;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-icon::before { top: 6px; left: 0; width: 14px; height: 2px; }
.faq-icon::after { top: 0; left: 6px; width: 2px; height: 14px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-body {
    padding: 0 4px 22px;
    font-size: 15.5px;
    line-height: 1.55;
    letter-spacing: -0.015em;
    color: #5b5b60;
    max-width: 70ch;
}

@media (max-width: 760px) {
    .prop-pricing { padding: 26px 20px; }
    .pricing-card { grid-template-columns: 1fr; }
    .pricing-aside { border-left: 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
    .pricing-benefits { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
    .pricing-benefits { grid-template-columns: 1fr; }
}

/* Cierre */
.prop-closing {
    font-weight: 600;
    font-size: clamp(28px, 3.6vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--prop-fg);
    margin: 0 0 24px;
    max-width: 26ch;
}
.prop-section--last { padding-bottom: 40px; }

@media (max-width: 820px) {
    .prop-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .prop-grid { grid-template-columns: 1fr; }
    .prop-card--wide { grid-column: auto; }
    .prop-invest { padding: 28px 22px; }
    .prop-invest-top { flex-direction: column; align-items: flex-start; }
    .prop-invest-list { grid-template-columns: 1fr; column-gap: 0; }
}

/* ═══════════════════════════════════════════════
   CERTIFICADOS
   ═══════════════════════════════════════════════ */

/* hide shared controls when on cert tab */
body.tab-cert .hide-for-cert {
    display: none;
}

/* cert-textarea overrides ui-card height */
.cert-textarea {
    height: auto !important;
    min-height: 60px;
    padding: 12px 16px !important;
    resize: none;
    line-height: 1.5;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    display: block !important;
}

.cert-textarea--tall {
    min-height: 96px;
}

/* ── Canvas wrapper ── */
.cert-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: visible;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* .cert-scale-wrapper — zoom applied via JS */

/* ── The A4 landscape canvas ── */
.cert-canvas {
    width: 1123px;
    height: 794px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.10);
}

body.dark .cert-canvas {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.40);
}

/* ── Trama background texture ── */
.cert-bg-trama {
    position: absolute;
    inset: 0;
    background-image: url('Root/assets/trama%20fondo%20certificados.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

/* ── Content layer ── */
.cert-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 106px 100px 160px;
}

/* ── Logo header ── */
.cert-header {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 50px;
}

.cert-logo {
    height: 88px;
    max-width: 520px;
    object-fit: contain;
}

/* ── Body (title + name + details) ── */
.cert-body {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    width: 100%;
    max-width: 860px;
}

.cert-title {
    font-family: 'Sora', sans-serif;
    font-size: 33px;
    font-weight: 300;
    line-height: 0.97;
    letter-spacing: -0.01em;
    color: #1d1d1f;
    word-break: break-word;
    text-wrap: balance;
    padding: 12px;
    transition: width 0.15s ease;
}

.cert-title--wide {
    width: 115%;
}

.cert-name-display {
    font-family: 'Sora', sans-serif;
    font-size: 20px;           /* 15pt @ 96dpi */
    font-weight: 600;
    margin-top: 30px;
    line-height: 1.2;
    color: #1d1d1f;
}

.cert-details-display {
    font-family: 'Sora', sans-serif;
    font-size: 10pt;
    font-weight: 400;
    line-height: 1.54;
    letter-spacing: -0.01em;
    color: #1d1d1f;
    max-width: 700px;
    text-align: center;
}

/* ── Footer (signatures) ── */
.cert-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 120px;
    flex-shrink: 0;
    align-items: flex-start;
    margin-top: 154px;
}

.cert-footer--single {
    gap: 0;
}

.cert-responsible {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 180px;
    max-width: 220px;
}

.cert-responsible-line {
    width: 100%;
    height: 0.5px;
    background: #1d1d1f;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* ── Botones agregar / quitar responsable ── */
.cert-resp-btn-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.cert-add-resp-btn,
.cert-remove-resp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    height: 40px;
    border-radius: var(--radius-ui);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.cert-add-resp-btn {
    background: rgba(0, 151, 181, 0.07);
    color: var(--accent-primary);
    border: 1px dashed rgba(0, 151, 181, 0.35);
}

.cert-add-resp-btn:hover {
    background: rgba(0, 151, 181, 0.13);
    border-color: rgba(0, 151, 181, 0.6);
}

.cert-remove-resp-btn {
    background: rgba(231, 76, 60, 0.06);
    color: var(--accent-danger);
    border: 1px dashed rgba(231, 76, 60, 0.3);
}

.cert-remove-resp-btn:hover {
    background: rgba(231, 76, 60, 0.13);
    border-color: rgba(231, 76, 60, 0.6);
}

/* ── Firma digital (flota sobre la línea, fuera del flujo) ── */
.cert-responsible {
    position: relative;
}

.cert-sig-image {
    position: absolute;
    width: 140px;
    height: 70px;          /* 110:55 → 140:70, proporción 2:1 */
    object-fit: contain;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 12px);   /* borde inferior 12px sobre la línea */
    display: none;
}

.cert-sig-image.loaded {
    display: block;
}

/* ── Upload row en sidebar ── */
.cert-sig-upload-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cert-sig-upload-row .file-label {
    flex: 1;
    font-size: 12px;
}

.cert-sig-clear-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-ui);
    background: rgba(231, 76, 60, 0.08);
    color: var(--accent-danger);
    border: 1px solid rgba(231, 76, 60, 0.15);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.cert-sig-clear-btn:hover {
    background: rgba(231, 76, 60, 0.16);
}

.cert-sig-clear-btn.hidden {
    display: none;
}

.cert-sig-name {
    font-family: 'Sora', sans-serif;
    font-size: 12px;           /* 9pt */
    font-weight: 700;
    line-height: 1.4;
    color: #1d1d1f;
}

.cert-sig-role,
.cert-sig-inst {
    font-family: 'Sora', sans-serif;
    font-size: 12px;           /* 9pt */
    font-weight: 400;
    line-height: 1.4;
    color: #1d1d1f;
}

/* ═══════════════════════════════════════════════
   ZOOM PANEL
   ═══════════════════════════════════════════════ */

.zoom-panel {
    position: absolute;
    left: 28px;
    bottom: 28px;
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

body.tab-poster  .zoom-panel,
body.tab-youtube .zoom-panel,
body.tab-cert    .zoom-panel,
body.tab-ave     .zoom-panel,
body.tab-badge   .zoom-panel {
    display: flex;
}

/* Pill group */
.zoom-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--pill-bg);
    border-radius: 999px;
    padding: 5px;
    gap: 0;
    border: 1px solid var(--pill-border);
    box-shadow: var(--pill-shadow);
    backdrop-filter: var(--pill-backdrop);
    -webkit-backdrop-filter: var(--pill-backdrop);
}

/* Botones circulares */
.zoom-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--pill-text);
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.zoom-btn:hover {
    background: var(--pill-hover);
    color: var(--text-main);
}

.zoom-btn:active {
    transform: scale(0.9);
}

.zoom-btn:disabled {
    opacity: 0.22;
    cursor: not-allowed;
    transform: none;
}

/* Separador interno entre botones del mismo grupo */
.zoom-inner-sep {
    width: 22px;
    height: 1px;
    background: var(--pill-sep);
}

/* ════════════════════════════════════════════
   AI COPY GENERATOR
   ════════════════════════════════════════════ */

.ai-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--input-border);
}

/* API Key row */
.ai-key-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ai-key-input {
    flex: 1;
    font-size: 11px !important;
    padding: 7px 10px !important;
}

.ai-key-save-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-mute);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
}

.ai-key-save-btn:hover {
    color: #DDFF9D;
    border-color: #DDFF9D;
}

/* Brief textarea */
.ai-brief-input {
    resize: vertical;
    min-height: 64px;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 10px !important;
    font-family: 'Inter', sans-serif;
}

/* Tone selector */
.ai-tone-row {
    display: flex;
    gap: 6px;
}

.ai-tone-btn {
    flex: 1;
    padding: 5px 4px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-mute);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.ai-tone-btn.active {
    background: rgba(221, 255, 157, 0.12);
    border-color: #DDFF9D;
    color: #DDFF9D;
}

.ai-tone-btn:hover:not(.active) {
    border-color: var(--text-mute);
    color: var(--text-main);
}

/* Generate button */
.ai-generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    background: rgba(221, 255, 157, 0.1);
    border: 1px solid #DDFF9D;
    border-radius: 10px;
    color: #DDFF9D;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.ai-generate-btn:hover {
    background: rgba(221, 255, 157, 0.2);
}

.ai-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results */
.ai-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-results.hidden {
    display: none;
}

/* Variation card */
.ai-variation-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-variation-card:hover {
    border-color: rgba(221, 255, 157, 0.4);
    background: rgba(221, 255, 157, 0.04);
}

.ai-variation-card.ai-card--active {
    border-color: #DDFF9D;
    background: rgba(221, 255, 157, 0.08);
}

.ai-card-tone {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 2px;
}

.ai-card--active .ai-card-tone {
    color: #DDFF9D;
}

.ai-card-etiqueta {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.ai-card-titulo {
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: var(--text-main);
    line-height: 1.2;
}

.ai-card-titulo strong {
    font-weight: 600;
}

.ai-card-subtitulo {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-mute);
    line-height: 1.3;
}

.ai-card-apply {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-mute);
    text-align: right;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.ai-variation-card:hover .ai-card-apply,
.ai-variation-card.ai-card--active .ai-card-apply {
    opacity: 1;
    color: #DDFF9D;
}

/* Error state */
.ai-error {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #ff6b6b;
    padding: 10px 12px;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.25);
    border-radius: 8px;
}

/* Input error flash */
.ai-input--error {
    border-color: #ff6b6b !important;
    animation: inputShake 0.3s ease;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ═══════════════════════════════════════════════
   POSTER BARS STACK — contenedor fijo ambas barras
   ═══════════════════════════════════════════════ */
.poster-bars-stack {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 8px;
    max-width: 1280px;
    width: calc(100% - 2 * var(--sidenav-open) - 20px);
    z-index: 150;
}

body.tab-poster .poster-bars-stack {
    display: flex;
}

/* ═══════════════════════════════════════════════
   YOUTUBE BARS STACK — contenedor fijo ambas barras
   ═══════════════════════════════════════════════ */
.youtube-bars-stack {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 8px;
    max-width: 1280px;
    width: calc(100% - 2 * var(--sidenav-open) - 20px);
    z-index: 150;
}

body.tab-youtube .youtube-bars-stack {
    display: flex;
}

/* Laptops (MacBook Pro y similares): la barra no entra en una sola línea de
   controles al 100% → la mostramos al 80%. El zoom ensancha su layout (su ancho
   es % del viewport) para que los controles entren en UNA línea, y la deja más
   compacta. La barra no se exporta, así que no afecta el Full HD.
   Centrado por margin-auto (más predecible con zoom que left:50%+translate). */
@media (max-width: 1680px) {
    .youtube-bars-stack {
        zoom: 0.8;
        left: 0;
        right: 0;
        transform: none;
        margin-inline: auto;
    }
}

/* ═══════════════════════════════════════════════
   YOUTUBE SCREENS NAVIGATOR — múltiples miniaturas
   Estilo glass, flotante arriba-centro (solo tab YouTube)
   ═══════════════════════════════════════════════ */
.yt-screens-nav {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    max-width: calc(100% - 48px);
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 22px;
    box-shadow: var(--bar-shadow);
    z-index: 150;
    scrollbar-width: none;
}
.yt-screens-nav::-webkit-scrollbar { display: none; }

body.tab-youtube .yt-screens-nav {
    display: flex;
}

/* En YouTube, centrar la miniatura en la franja libre entre el navegador
   (arriba) y la barra de controles (abajo), sin solaparse con ninguno. */
body.tab-youtube .canvas-area {
    padding-top: 64px;
    padding-bottom: 178px;
}

/* Chip de pantalla — mini preview 16:9 */
.yt-screen-chip {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.yt-screen-chip:hover {
    transform: scale(1.05);
}

.yt-chip-thumb {
    position: relative;
    width: 90px;
    height: 51px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #e9edf1 0%, #aebac6 100%);
    outline: 2.5px solid transparent;
    outline-offset: 1px;
    transition: outline-color 0.2s ease;
}
body.dark .yt-chip-thumb {
    background: linear-gradient(160deg, #3a4450 0%, #1f262e 100%);
}
.yt-screen-chip.active .yt-chip-thumb {
    outline-color: var(--active-accent, #9E9D24);
}

.yt-chip-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-chip-title {
    position: relative;
    z-index: 1;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 9px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-align: center;
    white-space: pre-line;
    color: var(--active-color, #DDFF9D);
    padding: 3px 5px;
    overflow: hidden;
    max-height: 100%;
}

/* Composición reflejada en el chip (igual que la pantalla principal) */
.yt-chip-thumb.yt-chip--avances { align-items: center; justify-content: center; }
.yt-chip-thumb.yt-chip--clave { align-items: flex-start; justify-content: flex-start; }
.yt-chip-thumb.yt-chip--conferencia { align-items: flex-end; justify-content: flex-start; }
.yt-chip-thumb.yt-chip--clave .yt-chip-title,
.yt-chip-thumb.yt-chip--conferencia .yt-chip-title {
    text-align: left;
    padding: 5px 6px;
}

/* Botón eliminar — aparece al hover del chip */
.yt-chip-del {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #1d1d1f;
    color: #fff;
    border: 2px solid var(--bar-bg);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}
.yt-screen-chip:hover .yt-chip-del {
    display: flex;
}
.yt-chip-del:hover {
    background: var(--accent-danger, #e5484d);
}

/* Botón agregar pantalla */
.yt-screen-add {
    flex-shrink: 0;
    width: 51px;
    height: 51px;
    border-radius: 10px;
    border: 1.5px dashed var(--bar-sep);
    background: transparent;
    color: var(--bar-text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.yt-screen-add:hover {
    background: color-mix(in srgb, var(--active-color, #DDFF9D) 30%, transparent);
    color: var(--bar-text);
    border-color: transparent;
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .yt-screen-chip, .yt-screen-add { transition: none; }
    .yt-screen-chip:hover, .yt-screen-add:hover { transform: none; }
}

/* Barra única YouTube: fila de texto integrada arriba de los controles */
.yt-text-row {
    align-items: stretch;
    padding: 0 4px;
}

.yt-text-row .text-bar-field {
    padding: 6px 16px;
}

.yt-text-row .text-bar-input {
    font-size: 15px;
}

.yt-bar-divider {
    height: 1px;
    background: var(--bar-sep);
    margin: 2px 4px;
}

/* ═══════════════════════════════════════════════
   AVE BARS STACK — contenedor fijo controles AVE
   ═══════════════════════════════════════════════ */
.ave-bars-stack {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 8px;
    max-width: 960px;
    width: calc(100% - 2 * var(--sidenav-open) - 60px);
    z-index: 150;
}

body.tab-ave .ave-bars-stack {
    display: flex;
}

/* ═══════════════════════════════════════════════
   CERT BARS STACK — barra única con 3 filas
   ═══════════════════════════════════════════════ */
.cert-bars-stack {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    max-width: 1080px;
    width: calc(100% - 2 * var(--sidenav-open) - 60px);
    z-index: 150;
}

body.tab-cert .cert-bars-stack {
    display: block;
}

/* Card única */
.cert-bar {
    display: flex;
    flex-direction: column;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 18px;
    box-shadow: var(--bar-shadow);
}

/* Separador inset entre filas */
.cert-row-sep {
    height: 1px;
    background: var(--bar-sep);
    margin: 0 16px;
    flex-shrink: 0;
}

/* Base de fila */
.cert-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
}

/* Fila 1: Título + Participante */
.cert-row--text {
    height: 46px;
    gap: 0;
}

/* Fila 2: Detalles (textarea auto-height) */
.cert-row--details {
    align-items: flex-start;
    padding: 10px 16px 9px;
    gap: 10px;
}

.cert-detail-label {
    padding-top: 2px;
    flex-shrink: 0;
}

.cert-details-input {
    flex: 1;
    min-height: 34px;
    max-height: 64px;
    resize: none;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    font-size: 12.5px;
    line-height: 1.55;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    opacity: 0.8;
    caret-color: var(--active-color, #DDFF9D);
    transition: opacity 0.15s;
}

.cert-details-input::-webkit-scrollbar { display: none; }
.cert-details-input::placeholder { color: var(--bar-placeholder); }
.cert-details-input:focus { opacity: 1; outline: none; }

/* Fila 3: Controles — min-height crece cuando se agregan responsables */
.cert-row--controls {
    min-height: 46px;
    height: auto;
    padding: 5px 16px;
    gap: 0;
    align-items: center;
}

/* Participante field ancho fijo */
.cert-name-field {
    max-width: 230px;
    flex-shrink: 0;
}

/* Page nav inline */
.cert-data-preview {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cert-row-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--bar-text-mute);
    white-space: nowrap;
    padding: 0 4px;
}

/* ── Responsables: ocupa todo el espacio entre dividers ── */
.cert-resp-group {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    border-radius: 0;
    padding: 2px 4px;
    margin: 0;
}

/* Cada fila de responsable */
.cert-resp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

/* Separador micro entre R2 / R3 cuando son visibles */
#certRespSection2:not(.hidden),
#certRespSection3:not(.hidden) {
    border-top: 1px solid var(--bar-sep);
    margin-top: 2px;
    padding-top: 5px;
}

/* Inputs que escalan con el espacio disponible */
.cert-resp-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--bar-sep);
    outline: none;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 12.5px;
    padding: 2px 0 3px;
    caret-color: var(--active-color, #DDFF9D);
    transition: border-color 0.15s;
}

.cert-resp-input::placeholder {
    color: var(--bar-text-mute);
    opacity: 0.4;
}

.cert-resp-input:focus {
    border-bottom-color: var(--active-color, #DDFF9D);
    outline: none;
}

/* Firma — pill sutil */
.cert-sig-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    height: 24px;
    background: var(--pill-hover);
    border: none;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: var(--bar-text-mute);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}

.cert-sig-btn:hover {
    background: var(--pill-active);
    color: var(--bar-text);
}

/* × quitar firma */
.cert-sig-clear-sm {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
    padding: 0;
    background: transparent;
    border: 1px solid var(--bar-sep);
    color: var(--bar-text-mute);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}

.cert-sig-clear-sm:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    color: var(--accent-danger);
}

/* + / − column outside the rows (keeps row widths identical) */
.cert-resp-ctrl {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 6px;
    flex-shrink: 0;
}

.cert-resp-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    background: transparent;
    border: 1px solid var(--bar-sep);
    color: var(--bar-text-mute);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.cert-resp-icon-btn:hover {
    background: rgba(100, 210, 110, 0.12);
    border-color: rgba(100, 210, 110, 0.45);
    color: #6dd97a;
}

.cert-resp-icon-btn--remove:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    color: var(--accent-danger, #e74c3c);
}

/* Descargar al final */
.cert-row--controls .prompt-download-btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   BADGE BARS STACK (Gafetes only)
   ═══════════════════════════════════════════════ */
.badge-bars-stack {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    max-width: 1080px;
    width: calc(100% - 2 * var(--sidenav-open) - 60px);
    z-index: 150;
}

body.tab-badge .badge-bars-stack {
    display: block;
}

.badge-bar {
    display: flex;
    flex-direction: column;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 18px;
    box-shadow: var(--bar-shadow);
}

.badge-row-sep {
    height: 1px;
    background: var(--bar-sep);
    margin: 0 16px;
    flex-shrink: 0;
}

.badge-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 46px;
    gap: 6px;
}

.badge-row--settings {
    height: 42px;
    gap: 4px;
}

/* Number inputs for W/H dimensions */
.badge-dim-input {
    width: 44px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--bar-sep);
    outline: none;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    text-align: center;
    padding: 2px 2px 3px;
    caret-color: var(--active-color, #DDFF9D);
    -moz-appearance: textfield;
}

.badge-dim-input::-webkit-outer-spin-button,
.badge-dim-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.badge-dim-input:focus {
    border-bottom-color: var(--active-color, #DDFF9D);
    outline: none;
}

/* Color picker circle */
.badge-color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.badge-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

.badge-color-picker::-webkit-color-swatch {
    border-radius: 50%;
    border: 1.5px solid rgba(128, 128, 128, 0.25);
}

.badge-color-picker::-moz-color-swatch {
    border-radius: 50%;
    border: 1.5px solid rgba(128, 128, 128, 0.25);
}

/* Cut-line toggle pill */
.badge-bar-stroke {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    height: 28px;
    background: var(--pill-hover);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--bar-text-mute);
    transition: background 0.12s, color 0.12s;
}

.badge-bar-stroke:has(input:checked) {
    background: var(--pill-active);
    color: var(--bar-text);
}

/* Hex text companion to color picker */
.badge-hex-text {
    width: 52px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--bar-sep);
    outline: none;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11.5px;
    padding: 2px 0 3px;
    caret-color: var(--active-color, #DDFF9D);
    transition: border-color 0.15s;
}

.badge-hex-text:focus {
    border-bottom-color: var(--active-color, #DDFF9D);
    outline: none;
}

.badge-hex-text::placeholder {
    color: var(--bar-text-mute);
    opacity: 0.35;
}

/* Position value display */
.badge-pos-val {
    min-width: 26px;
    text-align: center;
}

/* ── Barra de texto (Etiqueta / Título / Subtítulo) ── */
.poster-text-bar {
    display: flex;
    align-items: stretch;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 32px;
    padding: 0 12px;
    box-shadow: var(--bar-shadow);
}

.text-bar-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding: 22px 24px;
}

.text-bar-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bar-text-mute);
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.text-bar-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    min-width: 0;
    caret-color: #DDFF9D;
}

.text-bar-input::placeholder {
    color: var(--bar-placeholder);
}

.text-bar-sep {
    width: 1px;
    height: 28px;
    background: var(--bar-sep);
    flex-shrink: 0;
    align-self: center;
}

/* ── Barra IA prompt ── */
.poster-prompt-bar {
    display: flex;
    flex-direction: column;
    background: var(--bar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bar-border);
    border-radius: 32px;
    padding: 20px 20px 16px;
    box-shadow: var(--bar-shadow);
    gap: 12px;
}

/* ── Filas ── */
.prompt-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.prompt-row--top {
    padding: 0 4px;
}

.prompt-row--bottom {
    gap: 2px;
    padding: 0 4px;
}
/* En pantallas angostas (ej. MacBook) la fila de controles de YouTube no entra:
   en vez de desbordar (colores/Descargar afuera), envuelve a una 2ª línea. */
.youtube-bars-stack .prompt-row--bottom {
    flex-wrap: wrap;
    row-gap: 10px;
}

/* Fila variaciones */
.prompt-row--variation {
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    border-top: 1px solid var(--bar-sep);
    padding-top: 6px;
}

.prompt-var-nav {
    background: transparent;
    border: none;
    color: var(--bar-text-mute);
    font-size: 18px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.prompt-var-nav:hover {
    background: var(--pill-hover);
    color: var(--text-main);
}

.prompt-var-display {
    flex: 1;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 12.5px;
    color: var(--bar-text-mute);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.prompt-var-display strong {
    color: var(--bar-text);
    font-weight: 600;
}

.prompt-var-counter {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    color: var(--bar-text-mute);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Brief textarea — fila 1, crece hacia arriba */
.prompt-brief-input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    padding: 8px 14px;
    resize: none;
    min-height: 50px;
    max-height: 180px;
    overflow-y: auto;
    box-sizing: border-box;
}

.prompt-brief-input::placeholder {
    color: var(--bar-placeholder);
}

/* Color dots en prompt bar */
.prompt-color-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    flex-shrink: 0;
}

.prompt-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}

.prompt-color-dot:hover {
    transform: scale(1.15);
}

.prompt-color-dot.active {
    border-color: var(--dot-active-border);
}

/* Miniaturas de YouTube: swatches con el mismo estilo que la barra de la demo
   (activo = solo borde, sin escalado ni doble anillo). */
.youtube-bars-stack .color-dot.active {
    transform: none;
    box-shadow: none;
}

/* Divider */
.prompt-divider {
    width: 1px;
    height: 22px;
    background: var(--bar-sep);
    margin: 0 6px;
    flex-shrink: 0;
}

/* Foto button — M3 tonal pill */
.prompt-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 20px 20px;
    color: var(--bar-text);
    cursor: pointer;
    border-radius: 999px;
    background: var(--pill-hover);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: color 0.2s ease, background 0.2s ease;
}

.prompt-photo-btn:hover {
    color: var(--bar-text);
    filter: brightness(0.94);
}

/* Foto scale +/- — M3 icon button */
.prompt-scale-btn {
    background: var(--pill-hover);
    border: none;
    color: var(--bar-text);
    font-size: 20px;
    font-weight: 300;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.prompt-scale-btn:hover {
    filter: brightness(0.92);
    color: var(--text-main);
}

.prompt-photo-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tono group */
.prompt-tone-group {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    padding: 0 4px;
}

.prompt-tone-group .ai-tone-btn {
    padding: 0 10px;
    height: 28px;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    font-family: 'Inter', -apple-system, sans-serif;
}

.prompt-tone-group .ai-tone-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.prompt-tone-group .ai-tone-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 500;
}

/* Native select — hidden, replaced by custom UI */
.custom-select-trigger {
    display: none !important;
}

/* Custom select wrapper */
.custom-select {
    position: relative;
    flex-shrink: 0;
    margin: 0 2px;
}

.custom-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 20px 20px;
    background: var(--pill-hover);
    border: none;
    border-radius: 999px;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, filter 0.15s;
    outline: none;
}

.custom-select-btn:hover {
    filter: brightness(0.93);
}

.custom-select-btn svg {
    opacity: 0.5;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-btn svg {
    transform: rotate(180deg);
}

/* Dropdown panel — Apple style */
.custom-select-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: var(--card-bg);
    border: 1px solid var(--pill-border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    z-index: 500;
    padding: 5px;
}

.custom-select.open .custom-select-panel {
    display: block;
    animation: selectFadeIn 0.15s ease;
}

@keyframes selectFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.custom-select-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 9px;
    text-align: left;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}

.custom-select-option:hover {
    background: var(--pill-hover);
}

.custom-select-option.selected {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Formato group */
.prompt-format-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 0 4px;
}

.prompt-format-group .format-toggle-btn {
    padding: 20px 20px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    gap: 5px;
    color: var(--bar-text);
    opacity: 1;
    background: var(--pill-hover);
    white-space: nowrap;
    flex: none;
    transition: background 0.15s, color 0.15s, filter 0.15s;
}

.prompt-format-group .format-toggle-btn:hover {
    filter: brightness(0.93);
}

.prompt-format-group .format-toggle-btn.active {
    background: var(--text-main);
    opacity: 1;
}

/* Spacer — empuja solo "Descargar" a la derecha (poster bar) */
.poster-bars-stack .prompt-row--bottom .prompt-download-btn,
.youtube-bars-stack .prompt-row--bottom .prompt-download-btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── YouTube: controles de la tarjeta transparentes, hover #EFEDEF ──
   (el botón "Descargar" queda excluido: sigue negro sólido) */
.youtube-bars-stack .prompt-photo-btn,
.youtube-bars-stack .prompt-scale-btn,
.youtube-bars-stack .prompt-format-trigger,
.mm-realbar .prompt-photo-btn,
.mm-realbar .prompt-scale-btn,
.mm-realbar .prompt-format-trigger {
    background: transparent;
    color: var(--bar-text);
    transition: background 0.18s ease, color 0.18s ease;
}
.youtube-bars-stack .prompt-photo-btn:hover,
.youtube-bars-stack .prompt-scale-btn:hover,
.youtube-bars-stack .prompt-format-trigger:hover,
.mm-realbar .prompt-photo-btn:hover,
.mm-realbar .prompt-scale-btn:hover,
.mm-realbar .prompt-format-trigger:hover {
    background: #EFEDEF;
    color: var(--bar-text);
}

/* ── Format dropdown — M3 style ── */
.prompt-format-dropdown {
    position: relative;
    flex-shrink: 0;
}

.prompt-format-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 20px 20px;
    background: var(--pill-hover);
    border: none;
    border-radius: 999px;
    color: var(--bar-text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.15s;
    outline: none;
}

.prompt-format-trigger:hover {
    filter: brightness(0.93);
}

.prompt-format-chevron {
    opacity: 0.6;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* Ícono representativo del trigger — oculto en desktop, visible al colapsar
   (≤1024px) cuando el trigger pasa a modo solo-ícono. */
.prompt-format-icon {
    display: none;
    flex-shrink: 0;
}

.prompt-format-dropdown.open .prompt-format-chevron {
    transform: rotate(180deg);
}

/* Panel */
.prompt-format-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 176px;
    background: var(--card-bg);
    border: 1px solid var(--pill-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
    z-index: 500;
    padding: 6px;
}

.prompt-format-dropdown.open .prompt-format-panel {
    display: block;
    animation: formatPanelIn 0.15s ease;
}

@keyframes formatPanelIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Option rows */
.prompt-format-panel .format-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: background 0.1s;
    text-align: left;
}

.prompt-format-panel .format-toggle-btn:hover {
    background: var(--pill-hover);
    filter: none;
}

.format-opt-check {
    color: var(--accent-primary, #1a1a1a);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.prompt-format-panel .format-toggle-btn.active .format-opt-check {
    opacity: 1;
}

.format-opt-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--bar-text);
    flex: 1;
}

.format-opt-ratio {
    font-size: 12px;
    color: var(--bar-text-mute);
    font-weight: 400;
}

/* Generate button — M3 filled tonal */
.prompt-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    background: #DDFF9D;
    color: #1a1a1a;
    border: none;
    border-radius: 999px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.15s ease, transform 0.12s ease;
    white-space: nowrap;
}

.prompt-generate-btn:hover {
    filter: brightness(0.93);
}

.prompt-generate-btn:active {
    transform: scale(0.97);
}

.prompt-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Botón descargar — M3 filled */
.prompt-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    background: var(--bar-text);
    color: var(--bar-bg);
    border: none;
    border-radius: 999px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.15s ease, transform 0.12s ease;
    white-space: nowrap;
}

/* Download always right-anchored */
.ave-bars-stack .prompt-download-btn,
.badge-bars-stack .prompt-download-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.prompt-download-btn:hover {
    filter: brightness(0.88);
}

.prompt-download-btn:active {
    transform: scale(0.97);
}

/* ═══════════════════════════════════════════════
   BARRA DE EDICIÓN COMPACTA (≤1360px)
   La fila completa de controles (labels + paleta + Descargar) necesita
   ~1045px CSS; con el zoom 0.8 y la reserva del sidenav solo entra en una
   línea desde ~1360px de viewport (verificado empíricamente). Debajo de eso la barra se reorganiza
   tipo "bottom-nav" de app: Composición y Categoría colapsan a un ícono
   (se oculta la palabra) y la paleta de color se esconde (cada categoría
   ya aplica su propio color). Una sola línea SIEMPRE — Foto, Composición,
   Categoría y Descargar nunca se desalinean.
   Aplica SOLO a la barra real de YouTube; el demo de Propuesta
   (.mm-realbar) conserva su diseño original sangrante a todo ancho.
   ═══════════════════════════════════════════════ */
@media (max-width: 1360px) {
    /* La barra real recupera su tamaño natural (sin zoom) y se ensancha. */
    .youtube-bars-stack {
        zoom: 1;
        width: calc(100% - 28px);
        max-width: 620px;
    }

    /* Composición / Categoría → solo ícono (cuadrado).
       NOTA: el demo de Propuesta (.mm-realbar) queda EXCLUIDO a propósito:
       conserva su diseño original a todo ancho — barra a tamaño real (820px)
       sangrando "por la mitad" del stage, con labels completos para que los
       chips de la izquierda reflejen el cambio en la barra. */
    .youtube-bars-stack .prompt-format-trigger {
        padding: 13px;
        gap: 0;
    }
    /* Los labels se ocultan POR ID: la regla base #ytVersionTriggerLabel
       {display:inline-block; min-width} usa selector de ID (mayor
       especificidad) y le ganaría a una regla por clase. Acá igualamos esa
       especificidad (ID) y, al estar más abajo en el archivo, gana. */
    #ytVersionTriggerLabel,
    #ytCategoryTriggerLabel,
    .youtube-bars-stack .prompt-format-chevron {
        display: none;
    }
    .youtube-bars-stack .prompt-format-icon {
        display: block;
    }

    /* Paleta de color oculta + su divisor inmediato previo. */
    .youtube-bars-stack .prompt-color-group {
        display: none;
    }
    .youtube-bars-stack .prompt-divider:has(+ .prompt-color-group) {
        display: none;
    }

    /* La fila de controles entra en una sola línea (sin wrap). */
    .youtube-bars-stack .prompt-row--bottom {
        flex-wrap: nowrap;
    }

    /* ── Miniatura de YouTube: SIEMPRE 16:9 (no heredar el 4:5 social) ──
       La regla genérica .poster{max-width:400px} de ≤1024px recortaba el
       ancho (inline 1000px) dejando un 4:5 vertical. La liberamos y dejamos
       la miniatura a su tamaño nativo 16:9, escalada con zoom responsive
       (var seteada por JS) para que entre completa sin romper proporciones
       del texto (que usa px absolutos calibrados a 1000px). */
    body.tab-youtube .poster {
        max-width: none;
    }
}

/* El panel de zoom (deshacer/rehacer/ajustar/zoom) se solapaba con el
   borde izquierdo de la barra (que se centra en el viewport) en tablet.
   Oculto a ≤1024 igual que a ≤640; la barra y el auto-fit cubren lo esencial. */
@media (max-width: 1024px) {
    body.tab-youtube .zoom-panel { display: none; }
}

/* El zoom responsive por var solo en tablet (641–1024). A ≤640 la miniatura
   la ajusta YoutubeGenerator.updateScale() (transform), así que NO debemos
   pisarlo acá (si no, el zoom por defecto desbordaba en mobile). */
@media (min-width: 641px) and (max-width: 1024px) {
    body.tab-youtube #ytStackFrame {
        transform: none !important;
        zoom: var(--yt-tablet-zoom, 0.58);
        transform-origin: center center;
    }
}

/* ═══════════════════════════════════════════════════════
   AURORA BACKGROUND
   ═══════════════════════════════════════════════════════ */

.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
}

.aurora-orb--1 {
    width: 55vw;
    height: 55vw;
    top: -15%;
    left: -5%;
    background: radial-gradient(circle, rgba(80, 200, 240, 0.35) 0%, transparent 65%);
    filter: blur(72px);
    animation: auroraFloat1 22s infinite alternate ease-in-out;
}

.aurora-orb--2 {
    width: 50vw;
    height: 50vw;
    bottom: -15%;
    right: -5%;
    background: radial-gradient(circle, rgba(100, 140, 255, 0.28) 0%, transparent 65%);
    filter: blur(80px);
    animation: auroraFloat2 28s infinite alternate ease-in-out;
}

.aurora-orb--3 {
    width: 42vw;
    height: 42vw;
    top: 35%;
    left: 35%;
    background: radial-gradient(circle, rgba(80, 220, 190, 0.22) 0%, transparent 65%);
    filter: blur(90px);
    animation: auroraFloat3 20s infinite alternate ease-in-out;
}

@keyframes auroraFloat1 {
    0%   { transform: translate(0,    0)    scale(1);    }
    50%  { transform: translate(8vw,  6vh)  scale(1.12); }
    100% { transform: translate(4vw, -9vh)  scale(0.94); }
}

@keyframes auroraFloat2 {
    0%   { transform: translate(0,     0)    scale(1);    }
    50%  { transform: translate(-9vw, -7vh)  scale(1.15); }
    100% { transform: translate(-4vw,  9vh)  scale(0.92); }
}

@keyframes auroraFloat3 {
    0%   { transform: translate(0,    0)    scale(1);    }
    50%  { transform: translate(7vw,  10vh) scale(1.18); }
    100% { transform: translate(-7vw, -6vh) scale(0.96); }
}

/* La UI mobile fue eliminada: la app es desktop-only en esta etapa.
 El bloqueo para dispositivos moviles vive inline en index.html (#mobileBlock). */

