
        .hidden {
            display: none !important;
        }

        @font-face {
            font-family: 'Luxurious Script';
            src: url('/fonts/LuxuriousScript-Regular.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: 'Aref Ruqaa';
            src: url('/fonts/ArefRuqaa-Regular.ttf') format('truetype');
            font-weight: 400;
        }

        @font-face {
            font-family: 'Aref Ruqaa';
            src: url('/fonts/ArefRuqaa-Bold.ttf') format('truetype');
            font-weight: 700;
        }

        :root {
            --accent: #c5a059;
            --gold-gradient: linear-gradient(135deg, #c5a059 0%, #d4af37 50%, #b38b4d 100%);
            --frame: rgba(22, 18, 15, 0.4);
            --bg-dark: #1a120b;
            --text-main: #f8fafc;
            --text-gold: #c5a059;
            --title-color: #F0E5C7;
            --subtitle-color: #F0E5C7;
        }

        /* PREMIUM BUTTONS (LUMEA STYLE) */
        .btn-primary,
        .btn-start {
            position: relative;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 12px 40px !important;
            background: #e7e5d8 !important;
            color: #1a0f0a !important;
            border: none !important;
            border-radius: 50px !important;
            font-weight: 700 !important;
            font-size: min(2.5vh, 20px) !important;
            text-transform: uppercase !important;
            cursor: pointer !important;
            transition: all 0.3s ease !important;
            text-decoration: none !important;
            font-family: 'Aref Ruqaa', serif !important;
            letter-spacing: 1px !important;
        }

        .btn-primary::after,
        .btn-start::after,
        .btn-outline::after,
        .btn-record-circle::after {
            content: '';
            position: absolute;
            top: -6px;
            left: -6px;
            right: -6px;
            bottom: -6px;
            border: 1px solid #e7e5d8;
            border-radius: 60px;
            pointer-events: none;
            transition: all 0.3s ease;
        }

        .btn-primary:hover::after,
        .btn-start:hover::after,
        .btn-outline:hover::after,
        .btn-record-circle:hover::after {
            transform: scale(1.02);
            border-color: #F0E5C7;
        }

        .btn-primary:hover,
        .btn-start:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 5px 15px rgba(231, 229, 216, 0.2) !important;
        }

        #countdown-val, #countdown-val-photo {
            color: inherit !important;
        }

        .btn-outline {
            position: relative;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 10px !important;
            padding: 12px 32px !important;
            background: transparent !important;
            color: inherit !important;
            border: 1px solid #e7e5d8 !important;
            border-radius: 50px !important;
            font-weight: 700 !important;
            font-size: min(2.5vh, 20px) !important;
            cursor: pointer !important;
            transition: all 0.2s !important;
            text-transform: uppercase !important;
            font-family: 'Aref Ruqaa', serif !important;
            letter-spacing: 1px !important;
        }

        .btn-outline:hover {
            background: rgba(231, 229, 216, 0.1) !important;
            transform: translateY(-2px) !important;
            border-color: #F0E5C7 !important;
        }

        /* CIRCLE RECORD BUTTON */
        .btn-record-circle {
            position: relative;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: min(10vh, 80px) !important;
            height: min(10vh, 80px) !important;
            background: #e7e5d8 !important;
            border: none !important;
            border-radius: 50% !important;
            cursor: pointer !important;
            transition: all 0.3s ease !important;
        }

        .btn-record-circle::after {
            border-radius: 50%;
        }

        .btn-record-circle:hover {
            transform: scale(1.05) !important;
            box-shadow: 0 0 15px rgba(231, 229, 216, 0.5) !important;
        }

        /* DYNAMIC BUTTON BACKGROUNDS PER STATE */
        #state-idle .btn-start { background: var(--start-btn-bg, #e7e5d8) !important; }
        #state-form .btn-start { background: var(--form-submit-btn-bg, #e7e5d8) !important; }
        #state-ready .btn-record-circle { background: var(--ready-record-btn-bg, #e7e5d8) !important; }
        
        #state-ready .btn-outline { background: var(--ready-back-btn-bg, transparent) !important; }
        #state-review-video .btn-outline { background: var(--review-retake-btn-bg, transparent) !important; }
        #state-review-final .btn-outline[onclick="retakeVideo()"] { background: var(--final-retake-all-btn-bg, transparent) !important; }
        #state-review-final .btn-outline[onclick="retakePhotoOnly()"] { background: var(--final-retake-photo-btn-bg, transparent) !important; }

        #state-review-video .btn-primary { background: var(--review-photo-btn-bg, #e7e5d8) !important; }
        #state-ready-photo .btn-record-circle { background: var(--photo-record-btn-bg, #e7e5d8) !important; }
        #state-ready-photo .btn-outline { background: var(--photo-back-btn-bg, transparent) !important; }
        #state-review-final .btn-primary { background: var(--final-upload-btn-bg, #e7e5d8) !important; }
        #state-processing .btn-primary { background: var(--success-done-btn-bg, #e7e5d8) !important; }

        /* IOS KEYBOARD */
        .keyboard-wrapper {
            position: fixed !important;
            bottom: 30px !important;
            left: 50% !important;
            transform: translateX(-50%) translateY(120%) !important;
            width: 95% !important;
            max-width: 900px !important;
            background: rgba(26, 18, 11, 0.75) !important;
            backdrop-filter: blur(30px) !important;
            border: 1px solid rgba(197, 160, 89, 0.4) !important;
            padding: 15px !important;
            border-radius: 30px !important;
            z-index: 9999 !important;
            opacity: 0 !important;
            visibility: hidden !important;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }

        .keyboard-wrapper.show {
            transform: translateX(-50%) translateY(0) !important;
            opacity: 1 !important;
            visibility: visible !important;
        }

        /* Shift ONLY the state-form up when keyboard is active to keep the header logo 100% stationary */
        .center-panel.keyboard-active #state-form {
            transform: translateY(-13vh);
        }

        #state-form {
            transition: transform 0.5s ease;
        }

        * {
            box-sizing: border-box;
        }

        body {
            font-family: 'Aref Ruqaa', serif;
            background-color: #1a0f0a;
            /* Dark base matching the wedding theme */
            color: var(--text-main);
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            margin: 0;
            padding: 0;
            width: 100vw;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background-attachment: scroll;
            /* Scroll is usually safer for 'full' feel on all browsers */
        }

        .main-wrapper {
            display: flex;
            width: 100%;
            height: 100vh;
            background: transparent;
            padding: 30px;
            gap: 30px;
            align-items: stretch;
            transition: 0.5s ease;
            overflow: hidden;
        }

        .side-panel {
            height: 85vh;
            aspect-ratio: 9 / 16;
            background: rgba(0, 0, 0, 0.05);
            padding: 0;
            border: none;
            border-radius: 1.72vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }

        .side-panel::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: var(--frame-image, url('/frame_gold.png'));
            background-size: 100% 100%;
            background-repeat: no-repeat;
            pointer-events: none;
            z-index: 5;
        }

        .side-panel.hidden-panel {
            flex: 0;
            width: 0 !important;
            max-width: 0;
            padding: 0;
            margin: 0;
            opacity: 0;
            overflow: hidden;
            pointer-events: none;
            visibility: hidden;
        }

        .no-transition {
            transition: none !important;
        }

        .side-panel .video-container {
            width: 100%;
            height: 100%;
            background: #000;
            border-radius: 1.72vh;
            overflow: hidden;
            border: none;
            position: absolute;
            top: 0;
            left: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
        }

        .side-panel .panel-footer {
            position: absolute;
            bottom: 2.5vh;
            width: 100%;
            text-align: center;
            margin: 0 !important;
            font-weight: 400;
            font-size: min(1.8vh, 18px) !important;
            color: #fff;
            letter-spacing: 0.5px;
            font-family: 'Aref Ruqaa', serif;
            z-index: 10;
        }

        .center-panel {
            flex: 1;
            background: transparent;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2vh 20px;
            text-align: center;
            transition: 0.5s ease;
            overflow: hidden;
            min-height: 0;
            box-shadow: none;
        }

        /* TYPOGRAPHY */
        .wedding-logo {
            max-width: 250px;
            margin-bottom: 25px;
        }

        #idle-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            transition: transform 0.5s ease;
        }

        .scribble-title {
            font-family: var(--title-font, 'Luxurious Script', cursive);
            font-size: min(10vh, 120px);
            font-weight: 400;
            color: var(--title-color, white);
            margin-bottom: 2vh;
            margin-top: 1vh;
            text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0;
            /* Gap handles ornaments distance */
        }

        .idle-branding-logo {
            max-width: 500px;
            max-height: 300px;
            object-fit: contain;
            margin-bottom: 3vh;
            margin-top: 4vh;
            display: none;
            filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.6));
        }

        .names-row {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 40px;
            margin: -10px 0;
            /* Tighten space around ornaments */
        }

        .title-ornament {
            height: min(6vh, 60px);
            /* Specific height for better control */
            width: auto;
            object-fit: contain;
            margin: 1vh 0;
        }

        .title-ornament:first-child {
            height: min(8vh, 80px);
            /* Top ornament is usually larger in these designs */
            margin-bottom: 0.5vh;
        }

        .title-ornament:last-child {
            height: min(4vh, 40px);
            /* Bottom divider is thinner */
            margin-top: 0.5vh;
        }

        .title-amp {
            font-size: 0.7em;
            /* Smaller ampersand */
            opacity: 0.9;
            color: var(--connector-color, var(--title-color, white));
        }

        .gold-ornament {
            width: 180px;
            margin-bottom: 15px;
        }

        .subtitle-premium {
            font-family: 'Aref Ruqaa', serif;
            color: #F0E5C7;
            font-size: min(3vh, 32px);
            color: var(--subtitle-color, #F0E5C7);
            max-width: 600px;
            margin-bottom: 0.5vh;
            font-weight: 500;
            line-height: 1.4;
        }

        .desc-premium {
            font-family: 'Aref Ruqaa', serif;
            font-size: min(1.8vh, 14px);
            color: var(--desc-color, #CDCDCD);
            max-width: 400px;
            margin-bottom: 2vh;
            line-height: 1.6;
            letter-spacing: 0.3px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        #ready-text, #ready-text-main, #ready-text-sub {
            color: var(--ready-text-color, #F0E5C7) !important;
        }

        


        #review-video-text, #review-text-main {
            color: var(--review-text-color, #F0E5C7) !important;
        }

        #review-text-sub {
            color: var(--review-text-color, #CDCDCD) !important;
        }

        #success-text, #success-text-main {
            color: var(--success-text-color, #F0E5C7) !important;
        }

        #success-text-sub {
            color: var(--success-text-color, #CDCDCD) !important;
        }

        .btn-start {
            color: var(--start-text-color, #1a0f0a) !important;
        }

        #form-label-name {
            color: var(--form-label-color, #F0E5C7) !important;
        }

        #form-submit-text {
            color: var(--form-submit-color, #1a0f0a) !important;
        }

        #ready-header-title {
            color: var(--ready-header-title-color, #F0E5C7) !important;
        }

        #ready-header-subtitle {
            color: var(--ready-header-subtitle-color, #F0E5C7) !important;
        }

        #ready-back-text {
            color: var(--ready-back-color, #e7e5d8) !important;
        }

        #review-retake-text {
            color: var(--review-retake-color, #e7e5d8) !important;
        }

        #review-photo-text {
            color: var(--review-photo-color, #1a0f0a) !important;
        }

        #photo-header-title {
            color: var(--photo-header-title-color, #F0E5C7) !important;
        }

        #photo-header-subtitle {
            color: var(--photo-header-subtitle-color, #F0E5C7) !important;
        }

        #ready-photo-text, #photo-instruction-main, #photo-instruction-sub {
            color: var(--photo-instruction-color, #F0E5C7) !important;
        }

        #photo-back-text {
            color: var(--photo-back-color, #e7e5d8) !important;
        }

        #final-header-title {
            color: var(--final-header-title-color, #F0E5C7) !important;
        }

        #final-retake-all-text {
            color: var(--final-retake-all-color, #e7e5d8) !important;
        }

        #final-retake-photo-text {
            color: var(--final-retake-photo-color, #e7e5d8) !important;
        }

        #final-upload-text {
            color: var(--final-upload-color, #1a0f0a) !important;
        }

        #success-footer-text {
            color: var(--success-footer-color, #CDCDCD) !important;
        }

        #success-done-text {
            color: var(--success-done-color, #1a0f0a) !important;
        }

        #auto-reset-countdown {
            color: var(--success-text-color, #a3a3a3) !important;
        }

        #label-left-overlay, #label-right-overlay {
            color: rgba(255, 255, 255, 0.3) !important;
        }

        .preview-badge {
            position: absolute;
            bottom: 10px;
            left: 10px;
            background: rgba(0, 0, 0, 0.5);
            color: #fff !important;
            padding: 2px 8px;
            border-radius: 5px;
            font-size: 10px;
            z-index: 10;
        }

        /* Dynamic colors for outline buttons border & color */
        button:has(#ready-back-text) {
            color: var(--ready-back-color, #e7e5d8) !important;
        }
        button:has(#review-retake-text) {
            color: var(--review-retake-color, #e7e5d8) !important;
        }
        button:has(#photo-back-text) {
            color: var(--photo-back-color, #e7e5d8) !important;
        }
        button:has(#final-retake-all-text) {
            color: var(--final-retake-all-color, #e7e5d8) !important;
        }
        button:has(#final-retake-photo-text) {
            color: var(--final-retake-photo-color, #e7e5d8) !important;
        }

        /* Dynamic colors for countdown area status texts under circle buttons */
        #state-ready .countdown-text,
        #state-ready #countdown-area {
            color: var(--ready-text-color, #F0E5C7) !important;
        }
        #state-ready-photo .countdown-text,
        #state-ready-photo #countdown-area-photo {
            color: var(--photo-instruction-color, #F0E5C7) !important;
        }

        /* INPUTS & FORM */
        .form-container {
            width: 100%;
            max-width: 440px;
        }

        .input-group {
            margin-bottom: 1.5vh;
            text-align: left;
        }

        .input-group label {
            font-size: min(1.5vh, 12px);
            font-weight: 700;
            color: var(--desc-color, #94a3b8);
            margin-bottom: 0.5vh;
            display: block;
            text-transform: capitalize;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            width: 100%;
        }

        .input-wrapper input {
            width: 100%;
            padding: min(1.5vh, 14px) min(2vh, 18px) min(1.5vh, 14px) 45px;
            border-radius: 10px;
            border: 1px solid rgba(197, 160, 89, 0.5);
            font-size: min(2vh, 15px);
            outline: none;
            background: rgba(40, 30, 20, 0.6);
            color: #fff;
            transition: all 0.3s ease;
        }

        .input-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--accent);
            font-size: 18px;
            z-index: 5;
            pointer-events: none;
        }

        .phone-prefix {
            display: inline-block;
            color: #CDCDCD;
        }

        .phone-input {
            border-radius: 10px !important;
            padding-left: 100px !important;
        }

        .prefix-overlay {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            align-items: center;
            gap: 8px;
            color: #fff;
            font-weight: 700;
            font-size: 14px;
            pointer-events: none;
            z-index: 5;
        }

        .phone-input {
            border-radius: 0 12px 12px 0 !important;
            height: 55px;
        }


        /* KEYBOARD PREMIUM (DARK) */

        .keyboard-row {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 8px;
        }

        .key {
            flex: 1;
            height: 54px;
            max-width: 85px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.95);
            cursor: pointer;
            transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
            user-select: none;
            font-family: 'Aref Ruqaa', serif;
        }

        .key:active {
            background: var(--accent) !important;
            transform: scale(0.92);
            color: #fff;
            box-shadow: 0 0 15px rgba(197, 160, 89, 0.5);
        }

        .key.wide {
            max-width: 130px;
            background: rgba(255, 255, 255, 0.15);
            font-size: 17px;
        }

        /* Gold Action Keys (Next / Mode) */
        .key.wide:last-child {
            background: var(--gold-gradient) !important;
            border: none;
            color: white;
            font-weight: 700;
            box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
        }

        .key.space {
            flex: 3;
            max-width: 450px;
            background: rgba(255, 255, 255, 0.05);
        }

        /* STATES (READY, REVIEW, SUCCESS) */
        /* DELIVERY SELECTOR */
        .delivery-selector {
            display: flex;
            gap: 15px;
            margin-bottom: 2vh;
            width: 100%;
            max-width: 440px;
        }

        .delivery-tab {
            flex: 1;
            padding: min(1.2vh, 12px);
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(197, 160, 89, 0.3);
            border-radius: 12px;
            color: #fff;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            font-size: min(1.8vh, 14px);
        }

        .delivery-tab.active {
            background: var(--gold-gradient);
            border-color: transparent;
            font-weight: 700;
            box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
        }

        .ui-state {
            display: none;
            flex-direction: column;
            align-items: center;
            width: 100%;
            animation: fadeIn 0.5s ease;
        }

        .ui-state.active {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(15px);
            }
        }

        /* RECORD BUTTON (FRAME 4) */
        #state-ready .btn-record-circle.recording,
        #state-ready-photo .btn-record-circle.recording,
        .btn-record-circle.recording {
            animation: pulse-ring 1.5s infinite;
            background: var(--recording-btn-bg, #e11d48) !important;
        }

        #state-ready .btn-record-circle.recording::after,
        #state-ready-photo .btn-record-circle.recording::after,
        .btn-record-circle.recording::after {
            border-color: var(--recording-btn-bg, #e11d48) !important;
        }

        @keyframes pulse-ring {
            0% {
                box-shadow: 0 0 0 0px color-mix(in srgb, var(--recording-btn-bg, #e11d48) 50%, transparent);
            }

            70% {
                box-shadow: 0 0 0 20px transparent;
            }

            100% {
                box-shadow: 0 0 0 0 transparent;
            }
        }

        .btn-row {
            display: flex;
            gap: 20px;
            width: 100%;
            max-width: 800px;
            margin-top: 40px;
            justify-content: center;
        }

        .btn-action {
            flex: 1;
            padding: 22px;
            border-radius: 15px;
            font-weight: 800;
            border: none;
            cursor: pointer;
            font-size: 22px;
            transition: 0.3s;
        }

        .btn-retake {
            background: #fff;
            color: #ef4444;
            border: 2px solid #fee2e2;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        }

        .btn-retake:hover {
            background: #fef2f2;
            border-color: #fca5a5;
        }

        .btn-upload {
            background: linear-gradient(135deg, #c5a059 0%, #d4af37 100%);
            color: white;
            box-shadow: 0 10px 25px rgba(197, 160, 89, 0.4);
        }

        .btn-upload:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 35px rgba(197, 160, 89, 0.5);
        }

        video,
        canvas {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: absolute;
            top: 0;
            left: 0;
        }

        /* Webcam: object-fit contain agar tampil sesuai OBS preview (letterbox jika landscape) */
        #webcam {
            background: #000;
            width: 100% !important;
            height: 100% !important;
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            object-fit: cover !important;
            z-index: 20 !important;
        }

        #preview {
            background: #000;
        }

        #drawing_canvas {
            pointer-events: none;
            /* No mirror for normal view */
            z-index: 10;
        }

        .hidden {
            display: none !important;
        }

        .countdown-text {
            margin-top: 15px;
            font-weight: 700;
            color: #475569;
            font-size: 24px;
        }

        /* PROGRESS BORDER ANIMATION (GOLD GLOW) */
        .timer-progress-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 100;
        }

        .progress-rect {
            fill: none;
            stroke: var(--accent, #c5a059);
            stroke-width: 4;
            stroke-linecap: round;
            filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.8));
            transition: none;
        }

        /* FLASH EFFECT */
        #flash-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: white;
            opacity: 0;
            pointer-events: none;
            z-index: 10000;
            transition: opacity 0.1s ease-out;
        }

        #flash-overlay.active {
            opacity: 1;
            transition: none;
        }

        /* RESPONSIVE DESIGN FOR SMALLER SCREENS */
        @media (max-width: 1400px) {
            .side-panel {
                height: 75vh;
                max-width: 30vw;
            }

            .scribble-title {
                font-size: min(8vh, 90px);
            }

            .btn-action {
                padding: 15px;
                font-size: 18px;
            }
        }

        @media (max-width: 1024px) {
            .main-wrapper {
                padding: 15px;
                gap: 15px;
            }

            .side-panel {
                height: 70vh;
                max-width: 32vw;
                padding: 40px 20px 30px 20px;
            }

            .scribble-title {
                font-size: min(6vh, 60px);
            }

            .subtitle-premium {
                font-size: 16px;
            }

            .keyboard-wrapper {
                width: 100% !important;
                border-radius: 20px !important;
            }

            .key {
                height: 45px;
                font-size: 16px;
            }

            .btn-primary,
            .btn-start {
                padding: 12px 24px !important;
                font-size: 16px !important;
            }

            .side-panel .panel-footer {
                font-size: 14px;
            }

            .wedding-logo {
                max-width: 150px;
            }

            #idle-header {
                margin-top: 5vh;
            }
        }

        @media (max-width: 768px) {
            .main-wrapper {
                padding: 10px;
                gap: 10px;
            }

            .side-panel {
                height: 65vh;
                max-width: 33vw;
                padding: 20px 10px 15px 10px;
            }

            .scribble-title {
                font-size: min(5vh, 40px);
            }

            .desc-premium {
                font-size: 40px;
            }

            .key {
                height: 35px;
                max-width: 50px;
                font-size: 12px;
            }

            .keyboard-row {
                gap: 4px;
            }

            .keyboard-wrapper {
                padding: 10px !important;
            }

            .side-panel .panel-footer {
                font-size: 10px;
                margin-top: 5px;
            }

            #countdown-area {
                font-size: 14px;
            }

            .btn-action {
                padding: 10px;
                font-size: 14px;
            }

            #ready-text,
            #review-video-text,
            #success-text {
                font-size: 20px !important;
            }

            #ready-text span,
            #review-video-text span,
            #success-text span {
                font-size: 14px !important;
            }
        }

        /* ========================
           STATE SPECIFIC STYLES
           ======================== */
        .state-form-active .side-panel {
            opacity: 0;
            pointer-events: none;
            flex: 0;
            width: 0;
            padding: 0;
            margin: 0;
        }

        .state-form-active .center-panel {
            justify-content: center;
        }

        .state-form-active #idle-header {
            margin-top: 4vh;
        }

        body.logo-top-left #idle-header .logo,
        body.logo-top-left #idle-header .idle-branding-logo {
            position: fixed;
            top: 45px;
            left: 30px;
            transform: scale(0.6);
            transform-origin: top left;
            margin: 0 !important;
            z-index: 100;
        }

        /* PERSISTENT BRANDING LOGO (Logo Lumea)
           Ditampilkan secara persisten di pojok kiri bawah di semua halaman */
        #bottom-left-logo {
            display: block;
            position: fixed;
            bottom: 45px;
            left: 45px;
            width: min(15vh, 180px);
            z-index: 100;
            object-fit: contain;
            pointer-events: none;
            /* Menghindari menghalangi klik */
        }

        /* RESPONSIVE FINAL REVIEW PAGE */
        .final-preview-container {
            display: flex;
            gap: min(2vw, 15px);
            width: 95%;
            max-width: 500px;
            margin-bottom: 2vh;
            justify-content: center;
            align-items: center;
        }

        .final-preview-box {
            flex: 1;
            aspect-ratio: 9 / 16;
            background: #000;
            border-radius: 15px;
            overflow: hidden;
            position: relative;
            max-height: 42vh;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(197, 160, 89, 0.3);
        }

        .final-btn-row {
            margin-top: 2vh !important;
            gap: 15px !important;
            flex-wrap: wrap;
            justify-content: center;
        }

        .final-btn-row button {
            font-size: min(2vh, 16px) !important;
            padding: 10px 24px !important;
        }

        /* VERTICAL RESPONSIVENESS (HEIGHT-BASED MEDIA QUERIES) */
        @media (max-height: 850px) {
            .center-panel.keyboard-active #state-form {
                transform: translateY(-18vh);
            }

            .center-panel.keyboard-active #state-form #idle-sub,
            .center-panel.keyboard-active #state-form #desc-premium {
                display: none !important;
            }

            .keyboard-wrapper {
                bottom: 15px !important;
                padding: 10px !important;
                border-radius: 20px !important;
            }

            .key {
                height: 40px !important;
                font-size: 15px !important;
            }

            .key.wide {
                font-size: 13px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input {
                padding: 10px 15px 10px 45px !important;
                font-size: 14px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input.phone-input {
                height: 48px !important;
                padding-left: 95px !important;
            }

            .center-panel.keyboard-active #state-form .btn-start {
                margin-top: 2vh !important;
            }

            .final-preview-box {
                max-height: 38vh !important;
            }
        }

        @media (max-height: 680px) {
            .center-panel.keyboard-active #state-form {
                transform: translateY(-22vh);
            }

            .keyboard-wrapper {
                bottom: 8px !important;
                padding: 6px !important;
                border-radius: 15px !important;
            }

            .key {
                height: 32px !important;
                font-size: 13px !important;
                border-radius: 8px !important;
            }

            .key.wide {
                font-size: 11px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input {
                padding: 8px 12px 8px 45px !important;
                font-size: 13px !important;
            }

                font-size: 40px;
            }

            .key {
                height: 35px;
                max-width: 50px;
                font-size: 12px;
            }

            .keyboard-row {
                gap: 4px;
            }

            .keyboard-wrapper {
                padding: 10px !important;
            }

            .side-panel .panel-footer {
                font-size: 10px;
                margin-top: 5px;
            }

            #countdown-area {
                font-size: 14px;
            }

            .btn-action {
                padding: 10px;
                font-size: 14px;
            }

            #ready-text,
            #review-video-text,
            #success-text {
                font-size: 20px !important;
            }

            #ready-text span,
            #review-video-text span,
            #success-text span {
                font-size: 14px !important;
            }
        }

        /* ========================
           STATE SPECIFIC STYLES
           ======================== */
        .state-form-active .side-panel {
            opacity: 0;
            pointer-events: none;
            flex: 0;
            width: 0;
            padding: 0;
            margin: 0;
        }

        .state-form-active .center-panel {
            justify-content: center;
        }

        .state-form-active #idle-header {
            margin-top: 4vh;
        }

        body.logo-top-left #idle-header .logo,
        body.logo-top-left #idle-header .idle-branding-logo {
            position: fixed;
            top: 45px;
            left: 30px;
            transform: scale(0.6);
            transform-origin: top left;
            margin: 0 !important;
            z-index: 100;
        }

        /* PERSISTENT BRANDING LOGO (Logo Lumea)
           Ditampilkan secara persisten di pojok kiri bawah di semua halaman */
        #bottom-left-logo {
            display: block;
            position: fixed;
            bottom: 45px;
            left: 45px;
            width: min(15vh, 180px);
            z-index: 100;
            object-fit: contain;
            pointer-events: none;
            /* Menghindari menghalangi klik */
        }

        /* RESPONSIVE FINAL REVIEW PAGE */
        .final-preview-container {
            display: flex;
            gap: min(2vw, 15px);
            width: 95%;
            max-width: 500px;
            margin-bottom: 2vh;
            justify-content: center;
            align-items: center;
        }

        .final-preview-box {
            flex: 1;
            aspect-ratio: 9 / 16;
            background: #000;
            border-radius: 15px;
            overflow: hidden;
            position: relative;
            max-height: 42vh;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(197, 160, 89, 0.3);
        }

        .final-btn-row {
            margin-top: 2vh !important;
            gap: 15px !important;
            flex-wrap: wrap;
            justify-content: center;
        }

        .final-btn-row button {
            font-size: min(2vh, 16px) !important;
            padding: 10px 24px !important;
        }

        /* VERTICAL RESPONSIVENESS (HEIGHT-BASED MEDIA QUERIES) */
        @media (max-height: 850px) {
            .center-panel.keyboard-active #state-form {
                transform: translateY(-18vh);
            }

            .center-panel.keyboard-active #state-form #idle-sub,
            .center-panel.keyboard-active #state-form #desc-premium {
                display: none !important;
            }

            .keyboard-wrapper {
                bottom: 15px !important;
                padding: 10px !important;
                border-radius: 20px !important;
            }

            .key {
                height: 40px !important;
                font-size: 15px !important;
            }

            .key.wide {
                font-size: 13px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input {
                padding: 10px 15px 10px 45px !important;
                font-size: 14px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input.phone-input {
                height: 48px !important;
                padding-left: 95px !important;
            }

            .center-panel.keyboard-active #state-form .btn-start {
                margin-top: 2vh !important;
            }

            .final-preview-box {
                max-height: 38vh !important;
            }
        }

        @media (max-height: 680px) {
            .center-panel.keyboard-active #state-form {
                transform: translateY(-22vh);
            }

            .keyboard-wrapper {
                bottom: 8px !important;
                padding: 6px !important;
                border-radius: 15px !important;
            }

            .key {
                height: 32px !important;
                font-size: 13px !important;
                border-radius: 8px !important;
            }

            .key.wide {
                font-size: 11px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input {
                padding: 8px 12px 8px 45px !important;
                font-size: 13px !important;
            }

            .center-panel.keyboard-active #state-form .input-wrapper input.phone-input {
                height: 40px !important;
                padding-left: 90px !important;
            }

            .center-panel.keyboard-active #state-form .btn-start {
                margin-top: 1.5vh !important;
                padding: 8px 24px !important;
                font-size: 14px !important;
            }

            .final-preview-box {
                max-height: 32vh !important;
                border-radius: 10px !important;
            }

            .final-btn-row button {
                padding: 8px 16px !important;
                font-size: min(2vh, 13px) !important;
            }
        }

/* ========================
   LANDING PAGE STYLES
   ======================== */
html.show-landing body {
    background-image: radial-gradient(circle at center, #1b120c 0%, #0d0805 100%) !important;
}

html.show-landing .main-wrapper,
html.show-landing #bottom-left-logo,
html.show-landing #idle-header {
    display: none !important;
}

#landing-page {
    display: none; /* Hidden by default when booth is active */
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    font-family: 'Outfit', sans-serif;
    color: #f8fafc;
    background: radial-gradient(circle at center, #1c130d 0%, #0a0604 100%);
    position: relative;
    overflow: hidden;
}

#landing-page::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

#landing-page::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

html.show-landing #landing-page {
    display: flex;
}

.landing-header {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
}

.landing-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(197, 160, 89, 0.15));
    transition: transform 0.4s;
}

.landing-logo:hover {
    transform: scale(1.05);
}

.landing-content {
    width: 100%;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    z-index: 5;
}

.landing-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 8vw, 68px);
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 0%, #e2d1b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.landing-subtitle {
    font-size: clamp(12px, 2.5vw, 15px);
    color: #c5a059;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 25px;
    opacity: 0.9;
}

.landing-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c5a059, transparent);
    margin-bottom: 30px;
    position: relative;
}

.landing-divider::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #c5a059;
    font-size: 8px;
    background: #140d09;
    padding: 0 6px;
}

.landing-desc {
    font-size: clamp(15px, 2.2vw, 18px);
    color: #b5ada5;
    line-height: 1.8;
    max-width: 700px;
    margin-bottom: 60px;
    font-weight: 300;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    width: 100%;
    margin-bottom: 80px;
}

.feature-card {
    background: rgba(22, 16, 12, 0.55);
    border: 1px solid rgba(197, 160, 89, 0.12);
    border-radius: 28px;
    padding: 40px 30px;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(197, 160, 89, 0.35);
    background: rgba(30, 22, 16, 0.7);
    box-shadow: 0 20px 40px rgba(197, 160, 89, 0.06);
}

.feature-icon {
    width: 65px;
    height: 65px;
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.15);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    transition: all 0.4s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(197, 160, 89, 0.15);
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.25);
}

.feature-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    font-size: 13.5px;
    color: #a39c96;
    line-height: 1.6;
}

.landing-footer {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 35px;
    color: #69625a;
    font-size: 12px;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.landing-footer p {
    margin: 0;
    letter-spacing: 0.5px;
}

.landing-footer a.admin-portal-link {
    color: rgba(197, 160, 89, 0.3);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.3s;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.landing-footer a.admin-portal-link:hover {
    color: rgba(197, 160, 89, 0.85);
}

.landing-footer .copyright {
    opacity: 0.75;
}
