        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            padding-top: 60px;
            margin-left: -240px;
            font-family: 'Inter', system-ui, sans-serif;
            font-weight: 600;
            font-size: 16px;
            background-color: #ecfdf5;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            max-width: 480px;
            margin: 0 auto;
            box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
            overflow-y: auto;
        }

        .logo-font {
            font-family: 'Space Grotesk', sans-serif;
        }

        .hidden {
            display: none !important;
        }

        /* ── HEADER ─────────────────────────────────────────── */
        .header {
            background-color: #ffffff;
            border-bottom: 1px solid #d1fae5;
            padding: 1rem 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            /*position: sticky;*/
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 50;
        }

        .header-brand {
            display: flex;
            align-items: center;
            column-gap: 0.75rem;
        }

        .header-logo {
            flex-shrink: 0;
        }

        .header-title {
            font-size: 1.5rem;
            font-weight: 600;
            letter-spacing: -1px;
            color: #022c22;
        }

        .header-tagline {
            font-size: 10px;
            font-weight: 500;
            color: #059669;
            margin-top: -0.25rem;
        }

        /* ── APP CONTAINER ──────────────────────────────────── */
        #app {
            flex: 1;
            padding: 2rem 1.5rem 3rem;
            overflow-y: auto;
        }

        /* ── SCREENS ────────────────────────────────────────── */
        .screen {
            animation: fadeIn 0.5s ease forwards;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* ── PANTALLA 1: DNI ────────────────────────────────── */
        .welcome-header {
            text-align: center;
            margin-bottom: 2.5rem;
        }

        .welcome-title {
            font-size: 1.875rem;
            font-weight: 600;
            color: #022c22;
            margin-bottom: 0.5rem;
        }

        .welcome-badge {
            display: inline-flex;
            align-items: center;
            column-gap: 0.5rem;
            background-color: #d1fae5;
            color: #047857;
            padding: 0.5rem 1.25rem;
            border-radius: 9999px;
            margin-top: 1.5rem;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .welcome-badge-icon {
            font-size: 1.25rem;
        }

        .form-wrapper {
            max-width: 384px;
            margin: 0 auto;
        }

        .form-label {
            display: block;
            color: #047857;
            font-size: 0.875rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
            padding-left: 0.25rem;
        }

        .form-label-optional {
            color: #34d399;
            font-weight: 400;
        }

        .input-wrapper {
            position: relative;
        }

        .input-base {
            width: 100%;
            background-color: #ffffff;
            border: 2px solid #a7f3d0;
            border-radius: 9999px;
            padding: 1.25rem 1.5rem;
            font-size: 1.5rem;
            font-family: 'Inter', system-ui, sans-serif;
            font-weight: 500;
            text-align: center;
            outline: none;
            box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        }

        .input-base:focus {
            border-color: #10b981;
        }

        .input-dni {
            letter-spacing: 0.1em;
        }

        .input-icon {
            position: absolute;
            right: 1.5rem;
            top: 50%;
            transform: translateY(-50%);
            color: #34d399;
            font-size: 1.5rem;
        }

        .input-hint {
            color: #10b981;
            font-size: 0.75rem;
            margin-top: 0.75rem;
            text-align: center;
        }

        .btn-primary {
            margin-top: 2.5rem;
            width: 100%;
            background-color: #059669;
            color: #ffffff;
            font-family: 'Inter', system-ui, sans-serif;
            font-weight: 600;
            font-size: 1.25rem;
            padding: 1.5rem;
            border-radius: 9999px;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            column-gap: 0.75rem;
            box-shadow: 0 10px 15px -3px rgb(16 185 129 / 0.3);
            cursor: pointer;
        }

        .btn-primary:hover {
            background-color: #047857;
        }

        .btn-primary:active {
            transform: scale(0.97);
        }

        .btn-arrow {
            font-size: 1.875rem;
        }

        .form-note {
            text-align: center;
            color: #34d399;
            font-size: 0.75rem;
            margin-top: 2rem;
        }

        /* ── PANTALLA 2: CELULAR ────────────────────────────── */
        .phone-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .phone-icon-box {
            width: 5rem;
            height: 5rem;
            background-color: #d1fae5;
            border-radius: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            margin: 0 auto 1rem;
        }

        .phone-title {
            font-size: 1.875rem;
            font-weight: 600;
            color: #022c22;
        }

        .phone-subtitle {
            color: #059669;
            margin-top: 0.5rem;
        }

        .btn-skip {
            margin-top: 1rem;
            width: 100%;
            background: none;
            border: none;
            color: #10b981;
            font-family: 'Inter', system-ui, sans-serif;
            font-weight: 500;
            padding: 1rem;
            font-size: 0.875rem;
            cursor: pointer;
        }

        .btn-skip:hover {
            color: #059669;
        }

        /* ── PANTALLA 3: TARJETA ────────────────────────────── */
        .card {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            box-shadow: 0 25px 50px -12px rgb(16 185 129 / 0.5);
            color: #ffffff;
            border-radius: 1.5rem;
            padding: 2rem;
            margin-bottom: 2rem;
            position: relative;
            overflow: hidden;
        }

        .card-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1.5rem;
        }

        .card-badge {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            background-color: rgba(255,255,255,0.2);
            backdrop-filter: blur(12px);
            border-radius: 9999px;
            font-size: 0.75rem;
            color: rgba(255,255,255,0.9);
            font-weight: 500;
        }

        .card-title {
            font-size: 2.25rem;
            font-weight: 600;
            letter-spacing: -1px;
            margin-top: 0.25rem;
        }

        .card-user {
            color: rgba(255,255,255,0.8);
            font-size: 1.125rem;
            margin-top: 0.25rem;
            font-weight: 500;
        }

        .card-right {
            text-align: right;
        }

        .card-brand-label {
            font-size: 0.75rem;
            opacity: 0.75;
        }

        #visit-count-badge {
            margin-top: 0.75rem;
            margin-left: auto;
            background-color: rgba(255,255,255,0.2);
            color: #ffffff;
            font-size: 1.875rem;
            font-weight: 700;
            width: 3.5rem;
            height: 3.5rem;
            border-radius: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.1);
        }

        /* ── SELLOS ─────────────────────────────────────────── */
        .stamps-section {
            margin-bottom: 1.5rem;
        }

        .stamps-header {
            display: flex;
            justify-content: space-between;
            font-size: 0.875rem;
            margin-bottom: 0.75rem;
            font-weight: 500;
        }

        .stamps-label {
            color: rgba(255,255,255,0.9);
        }

        #stamps-counter {
            font-family: monospace;
            font-size: 1.125rem;
        }

        .counter-total {
            color: rgba(255,255,255,0.6);
        }

        #stamps-grid {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 0.75rem;
        }

        .stamp {
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            width: 100%;
            aspect-ratio: 1;
            border-radius: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        .stamp-filled {
            background-color: rgba(255,255,255,0.3);
            border: 2px solid rgba(255,255,255,0.5);
            box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.1);
            animation: stampPop 0.6s ease forwards;
        }

        .stamp-empty {
            background-color: rgba(255,255,255,0.1);
            border: 2px solid rgba(255,255,255,0.2);
        }

        @keyframes stampPop {
            0%   { transform: scale(0.8); }
            50%  { transform: scale(1.3); }
            100% { transform: scale(1); }
        }

        /* ── PREMIO ─────────────────────────────────────────── */
        .reward-box {
            background-color: rgba(255,255,255,0.1);
            backdrop-filter: blur(12px);
            border-radius: 1.5rem;
            padding: 1rem;
            font-size: 0.875rem;
        }

        .reward-inner {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .reward-label {
            color: rgba(255,255,255,0.8);
        }

        #next-reward {
            display: block;
            font-size: 1.5rem;
            font-weight: 600;
        }

        .reward-right {
            text-align: right;
        }

        .reward-emoji {
            color: #6ee7b7;
            font-size: 0.75rem;
        }

        .reward-name {
            color: #ffffff;
            font-weight: 500;
        }

        .card-deco {
            position: absolute;
            bottom: -1.5rem;
            right: -1.5rem;
            font-size: 120px;
            opacity: 0.1;
            pointer-events: none;
        }

        /* ── BANNER ÉXITO ───────────────────────────────────── */
        #success-banner {
            background-color: #d1fae5;
            color: #065f46;
            border-radius: 1.5rem;
            padding: 1rem 1.25rem;
            text-align: center;
            font-weight: 500;
            display: flex;
            align-items: center;
            column-gap: 0.75rem;
            margin-bottom: 1.5rem;
        }

        .banner-emoji {
            font-size: 1.875rem;
        }

        .banner-sub {
            color: #059669;
            font-size: 0.875rem;
        }

        /* ── QR HINT ────────────────────────────────────────── */
        .qr-hint {
            text-align: center;
            color: #10b981;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            column-gap: 0.25rem;
        }

        .qr-line {
            display: inline-block;
            width: 0.75rem;
            height: 1px;
            background-color: #6ee7b7;
        }

        /* ── FOOTER ─────────────────────────────────────────── */
        .footer {
            padding: 0.7rem 1.5rem;
            font-size: 10px;
            color: #9ca3af;
            display: flex;
            justify-content: center;
            align-items: center;
            border-top: 1px solid #d1fae5;
            background-color: #ffffff;
            text-align: center;
            width: 100%;
            position: fixed;
            bottom: 0;
            left: 0;
        }

        /* ── CLASES USADAS EN JS ────────────────────────────── */
        .dni-mono {
            font-family: monospace;
            font-size: 1.5rem;
        }

        .nuevo-badge {
            margin-left: 0.75rem;
            font-size: 0.75rem;
            background-color: rgba(255,255,255,0.3);
            padding: 1px 0.75rem;
            border-radius: 9999px;
        }

        .premio-listo {
            color: #6ee7b7;
        }

        .remaining-mono {
            font-family: monospace;
        }