:root {
            --bg: #0f0e0d;
            --card-bg: #1a1917;
            --accent: #f97316;
            --accent2: #fbbf24;
            --muted: #6b6560;
            --text: #f5f0eb;
            --subtext: #a89f98;
            --red: #e63946;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'DM Sans', sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            overflow-x: hidden;
            padding: 2rem 1rem;
        }

        .blob { position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: 0.12; z-index: 0; }
        .blob-1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -100px; }
        .blob-2 { width: 500px; height: 500px; background: var(--accent2); bottom: -150px; left: -100px; }

        .wrapper {
            position: relative;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;
            width: 100%;
            max-width: 440px;
        }

        .title-block { text-align: center; }

        h1 {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 80px;
            letter-spacing: 5px;
            color: var(--text);
            line-height: 1;
        }

        .subtitle {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 4px;
            color: var(--muted);
            margin-top: 4px;
        }

        /* ── Card deck ── */
        .deck-area {
            position: relative;
            width: 240px;
            height: 336px;
        }

        .stack-shadow {
            position: absolute;
            width: 240px;
            height: 336px;
            background: #222120;
            border-radius: 18px;
            border: 1px solid rgba(255,255,255,0.05);
        }
        .stack-shadow:nth-child(1) { top: 9px; left: 6px; }
        .stack-shadow:nth-child(2) { top: 4px; left: 3px; }

        .flip-wrapper {
            width: 240px;
            height: 336px;
            perspective: 900px;
            position: absolute;
            top: 0; left: 0;
        }

        .flip-inner {
            width: 100%; height: 100%;
            position: relative;
            transform-style: preserve-3d;
            transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
        }

        .flip-inner.flipped { transform: rotateY(180deg); }

        .flip-front, .flip-back {
            position: absolute;
            width: 100%; height: 100%;
            backface-visibility: hidden;
            border-radius: 18px;
            overflow: hidden;
        }

        .flip-front { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.08); }
        .flip-back { transform: rotateY(180deg); background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,0.75); }
        .flip-back svg, .flip-front svg { width: 100%; height: 100%; display: block; }

        /* ── Info row ── */
        .info-row { display: flex; gap: 12px; width: 100%; }

        .info-box {
            flex: 1;
            background: var(--card-bg);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px;
            padding: 16px 10px;
            text-align: center;
        }

        .info-label {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--muted);
            margin-bottom: 6px;
        }

        .info-value {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 38px;
            color: var(--accent);
            line-height: 1;
        }

        /* ── Buttons ── */
        .btn-next {
            width: 100%;
            padding: 20px;
            font-family: 'Bebas Neue', sans-serif;
            font-size: 30px;
            letter-spacing: 2px;
            background: var(--accent);
            color: #fff;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            transition: transform 0.1s, background 0.15s;
            box-shadow: 0 8px 32px rgba(249,115,22,0.3);
        }
        .btn-next:hover { background: #ea6c0a; }
        .btn-next:active { transform: scale(0.98); }
        .btn-next:disabled { background: var(--muted); cursor: not-allowed; box-shadow: none; }

        .btn-shuffle {
            background: transparent;
            border: 1px solid rgba(255,255,255,0.12);
            color: var(--subtext);
            padding: 12px 28px;
            border-radius: 50px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 1px;
            text-transform: uppercase;
            transition: all 0.15s;
        }
        .btn-shuffle:hover { border-color: var(--accent); color: var(--accent); }

        /* ── Done ── */
        .done-msg { display: none; text-align: center; }
        .done-msg.show { display: block; }
        .done-msg h2 { font-family: 'Bebas Neue', sans-serif; font-size: 48px; color: var(--accent2); letter-spacing: 2px; }
        .done-msg p { color: var(--subtext); margin-top: 6px; font-size: 14px; }

        /* ── BAK POPUP ── */
        .overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.75);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 999;
            padding: 1rem;
        }

        .popup {
            background: #111;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 28px;
            padding: 0;
            max-width: 340px;
            width: 100%;
            overflow: hidden;
            box-shadow: 0 40px 120px rgba(0,0,0,0.95);
            animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
        }

        @keyframes popIn {
            from { transform: scale(0.75) translateY(30px); opacity: 0; }
            to   { transform: scale(1) translateY(0); opacity: 1; }
        }

        .popup-photo {
            width: 100%;
            height: 340px;
            object-fit: cover;
            object-position: center 15%;
            display: block;
        }

        .popup-body {
            padding: 24px 28px 28px;
            text-align: center;
            background: var(--red);
        }

        .popup-title {
            font-family: 'Bebas Neue', sans-serif;
            font-size: 44px;
            letter-spacing: 2px;
            color: #fff;
            line-height: 1;
        }

        .popup-sub {
            font-size: 13px;
            color: rgba(255,255,255,0.8);
            letter-spacing: 2px;
            text-transform: uppercase;
            margin-top: 6px;
            margin-bottom: 20px;
        }

        .popup-btn {
            padding: 12px 36px;
            background: #fff;
            color: var(--red);
            border: none;
            border-radius: 50px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 1px;
            text-transform: uppercase;
            transition: all 0.15s;
        }

        .popup-btn:hover { background: rgba(255,255,255,0.85); }
