/* Source of truth: unchanged main stylesheet extracted from index.html. */

        :root {
            --bg-color: #f8fafc;
            --text-main: #0f172a;
            --text-muted: #64748b;
            --glass-bg: rgba(255, 255, 255, 0.7);
            --glass-border: rgba(0, 0, 0, 0.05);
            --panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
        }
        .dark {
            --bg-color: #030712;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --glass-bg: rgba(255, 255, 255, 0.02);
            --glass-border: rgba(255, 255, 255, 0.05);
            --panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        }
        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            transition: background-color 0.5s, color 0.5s;
            overflow-x: hidden;
        }
        /* ==== Liquid glass hemat GPU ====
           Efek kaca dibuat dari gradient + highlight statis, bukan blur realtime,
           sehingga GPU tidak dipaksa merender ulang tiap frame. */
        .ambient-light {
            position: fixed;
            border-radius: 50%;
            z-index: -1;
            opacity: 1;
            pointer-events: none;
            transition: opacity 0.5s;
        }
        .light-1 { top: -18%; left: -12%; width: 60vw; height: 60vw;
            background: radial-gradient(circle at 50% 50%, rgba(59,130,246,.40), rgba(59,130,246,.16) 42%, rgba(59,130,246,0) 70%); }
        .light-2 { bottom: -18%; right: -12%; width: 52vw; height: 52vw;
            background: radial-gradient(circle at 50% 50%, rgba(139,92,246,.36), rgba(139,92,246,.14) 42%, rgba(139,92,246,0) 70%); }
        .dark .light-1 { background: radial-gradient(circle at 50% 50%, rgba(59,130,246,.22), rgba(59,130,246,.07) 45%, rgba(59,130,246,0) 70%); }
        .dark .light-2 { background: radial-gradient(circle at 50% 50%, rgba(139,92,246,.20), rgba(139,92,246,.06) 45%, rgba(139,92,246,0) 70%); }
        .glass-panel {
            position: relative;
            background:
                linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.52)),
                var(--glass-bg);
            border: 1px solid var(--glass-border);
            box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255,255,255,.7);
        }
        .dark .glass-panel {
            background:
                linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.022)),
                rgba(9, 14, 26, .74);
            box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255,255,255,.10);
        }
        /* Blur asli hanya dipakai di sedikit elemen kunci (navbar, sidebar, overlay) */
        .glass-blur { backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
        /* Mode hemat GPU: semua blur realtime & animasi berulang dimatikan */
        html.perf-lite .glass-blur,
        html.perf-lite #app-dialog-backdrop,
        html.perf-lite #cart-overlay { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
        html.perf-lite #app-dialog-backdrop { background: rgba(2, 6, 23, .74); }
        html.perf-lite .ambient-light { display: none; }
        html.perf-lite *,
        html.perf-lite *::before,
        html.perf-lite *::after { animation-iteration-count: 1 !important; }
        /* Hentikan animasi saat tab tidak aktif supaya GPU idle */
        html.anim-paused *,
        html.anim-paused *::before,
        html.anim-paused *::after { animation-play-state: paused !important; }
        .product-card { content-visibility: auto; contain-intrinsic-size: 340px; }
        .glass-input {
            background: rgba(15, 23, 42, 0.05);
            border: 1px solid var(--glass-border);
            color: var(--text-main);
        }
        .dark .glass-input { background: rgba(255, 255, 255, 0.03); }
        .glass-input:focus { outline: none; border-color: #3b82f6; }
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }
        .hide-scroll::-webkit-scrollbar { display: none; }
        .hidden-view { display: none !important; }
        .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
        .status-undetected { background-color: #10b981; box-shadow: 0 0 10px #10b981; }
        .tab-content-fade { animation: fadeIn 0.2s ease-out; }
        .language-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            padding: 1rem;
            border-radius: 1rem;
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.05);
            transition: background 0.2s, border-color 0.2s, transform 0.2s;
        }
        .language-option:hover { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.45); transform: translateY(-1px); }
        @media (max-width: 768px) {
            .glass-panel {
                backdrop-filter: none;
                -webkit-backdrop-filter: none;
                background: rgba(255, 255, 255, 0.92) !important;
                border: 1px solid rgba(0, 0, 0, 0.06);
            }
            .dark .glass-panel {
                background: rgba(3, 7, 18, 0.92) !important;
                border: 1px solid rgba(255, 255, 255, 0.05);
            }
            .ambient-light { display: none; }
        }
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.001ms !important;
                transition-duration: 0.001ms !important;
            }
        }
        /* ==== Modern notification system ==== */
        :root {
            --notif-surface: #ffffff;
            --notif-border: rgba(15, 23, 42, 0.14);
            --notif-shadow: 0 2px 6px rgba(15,23,42,.10), 0 22px 60px rgba(15, 23, 42, .25);
            --notif-title: #0f172a;
            --notif-text: #334155;
        }
        .dark {
            --notif-surface: #1b2438;
            --notif-border: rgba(255, 255, 255, 0.18);
            --notif-shadow: 0 2px 8px rgba(0,0,0,.5), 0 24px 70px rgba(0, 0, 0, .75);
            --notif-title: #ffffff;
            --notif-text: #d7deeb;
        }
        #toast-stack {
            position: fixed;
            top: max(1rem, env(safe-area-inset-top));
            right: 1rem;
            z-index: 300;
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            width: min(380px, calc(100vw - 2rem));
            pointer-events: none;
        }
        .toast {
            position: relative;
            overflow: hidden;
            pointer-events: auto;
            display: flex;
            align-items: flex-start;
            gap: 0.8rem;
            padding: 1rem 1.05rem 1rem 1.2rem;
            border-radius: 14px;
            background: var(--notif-surface);
            border: 1px solid var(--notif-border);
            box-shadow: var(--notif-shadow);
            opacity: 0;
            transform: translateY(-10px) scale(0.98);
            transition: opacity .25s ease, transform .3s cubic-bezier(.16,1,.3,1);
        }
        /* Garis aksen warna di sisi kiri supaya notifikasi tidak menyatu dengan background */
        .toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--toast-accent, #3b82f6); }
        .toast.t-info    { --toast-accent: #3b82f6; border-color: rgba(59,130,246,.45); }
        .toast.t-success { --toast-accent: #10b981; border-color: rgba(16,185,129,.45); }
        .toast.t-warning { --toast-accent: #f59e0b; border-color: rgba(245,158,11,.5); }
        .toast.t-error   { --toast-accent: #ef4444; border-color: rgba(239,68,68,.5); }
        .toast.toast-in { opacity: 1; transform: translateY(0) scale(1); }
        .toast.toast-out { opacity: 0; transform: translateY(-8px) scale(.98); }
        .toast-icon {
            flex-shrink: 0;
            width: 36px; height: 36px;
            border-radius: 11px;
            display: flex; align-items: center; justify-content: center;
            font-size: 15px;
        }
        .toast-title { font-size: 15px; font-weight: 800; line-height: 1.35; color: var(--notif-title); letter-spacing: -0.005em; }
        .toast-body { font-size: 13.5px; line-height: 1.55; color: var(--notif-text); margin-top: 3px; }
        .toast-close {
            flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            color: var(--notif-text); font-size: 12px; background: rgba(127,127,127,.12);
            transition: background .2s, color .2s;
        }
        .toast-close:hover { background: rgba(127,127,127,.24); color: var(--notif-title); }
        .toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 999px; }
        .tone-info    { background: rgba(59,130,246,.20); color: #60a5fa; }
        .tone-success { background: rgba(16,185,129,.20); color: #34d399; }
        .tone-warning { background: rgba(245,158,11,.22); color: #fbbf24; }
        .tone-error   { background: rgba(239,68,68,.20); color: #f87171; }
        :root .tone-info { color: #2563eb; }
        :root .tone-success { color: #059669; }
        :root .tone-warning { color: #b45309; }
        :root .tone-error { color: #dc2626; }
        .dark .tone-info { color: #60a5fa; }
        .dark .tone-success { color: #34d399; }
        .dark .tone-warning { color: #fbbf24; }
        .dark .tone-error { color: #f87171; }
        /* Dialog */
        #app-dialog { position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; padding: 1rem; }
        #app-dialog[hidden] { display: none; }
        #app-dialog-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
        #app-dialog.dialog-in #app-dialog-backdrop { opacity: 1; }
        .dialog-card {
            position: relative;
            width: min(440px, 100%);
            max-height: calc(100dvh - 2rem);
            overflow-y: auto;
            overscroll-behavior: contain;
            border-radius: 20px;
            background: var(--notif-surface);
            border: 1px solid var(--notif-border);
            box-shadow: var(--notif-shadow);
            padding: 1.5rem;
            opacity: 0; transform: translateY(12px) scale(.97);
            transition: opacity .25s ease, transform .3s cubic-bezier(.16,1,.3,1);
        }
        #app-dialog.dialog-in .dialog-card { opacity: 1; transform: translateY(0) scale(1); }
        .dialog-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
        .dialog-title { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--notif-title); }
        .dialog-body { font-size: 14.5px; line-height: 1.6; color: var(--notif-text); }
        .dialog-code {
            display: flex; align-items: center; justify-content: space-between; gap: .75rem;
            padding: .75rem .9rem; border-radius: 12px;
            background: rgba(127,127,127,.08); border: 1px solid var(--notif-border);
        }
        .dialog-code span { font-family: Menlo, Consolas, monospace; font-size: 13px; color: var(--text-main); word-break: break-all; }
        .dialog-meta { display: grid; gap: 10px; padding: 0; border: 0; background: transparent; }
        .dialog-meta-row { display: grid; grid-template-columns: 34px 1fr; gap: .75rem; align-items: start; padding: .85rem .95rem; border-radius: 14px; background: rgba(127,127,127,.08); border: 1px solid var(--notif-border); }
        .dialog-meta-row.is-total { background: linear-gradient(135deg, rgba(59,130,246,.18), rgba(34,197,94,.10)); border-color: rgba(96,165,250,.45); }
        .dialog-meta-row.is-payment { background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.28); }
        .dialog-meta-row.is-fee { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.30); }
        .dialog-meta-row.is-fee .dialog-meta-icon { color: #fbbf24; }
        .dialog-meta-row.is-product { background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.25); }
        .dialog-meta-icon { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); color: #60a5fa; }
        .dialog-meta-label { display: block; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 700; margin-bottom: 3px; }
        .dialog-meta-value { display: block; font-size: 13px; color: var(--notif-title); line-height: 1.35; text-align: left; word-break: break-word; }
        .dialog-meta-value.is-money { font-size: 18px; font-weight: 800; color: #34d399; }
        .dialog-meta-value a { color: #60a5fa; text-decoration: underline; text-underline-offset: 3px; }
        .dialog-items { display: grid; gap: 6px; }
        .dialog-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(127,127,127,.16); }
        .dialog-item:last-child { border-bottom: 0; padding-bottom: 0; }
        .dialog-item-name { font-weight: 700; color: var(--notif-title); }
        .dialog-item-sub { color: var(--text-muted); font-size: 11px; margin-top: 1px; }
        .dialog-item-price { font-weight: 800; white-space: nowrap; color: var(--notif-title); }
        .store-category-tabs { display: grid; gap: 10px; max-width: 620px; margin: 0 auto; }
        .store-category-btn { position: relative; overflow: hidden; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.06); text-align: left; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
        .store-category-btn:hover { transform: translateY(-2px); border-color: rgba(96,165,250,.55); background: rgba(59,130,246,.10); }
        .store-category-btn.is-active { min-height: 74px; border-color: rgba(96,165,250,.70); background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(99,102,241,.12)); box-shadow: 0 10px 30px rgba(37,99,235,.18); }
        .store-leaks { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
        .store-category-btn.is-disabled { width: auto; min-height: 0; padding: 7px 10px; border-radius: 999px; opacity: .56; cursor: pointer; filter: grayscale(.1); display: inline-flex; align-items: center; gap: 6px; }
        .store-category-icon { width: 34px; height: 34px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; background: rgba(59,130,246,.16); color: #60a5fa; }
        .store-category-btn.is-disabled .store-category-icon { width: 18px; height: 18px; border-radius: 7px; margin-bottom: 0; font-size: 10px; opacity: .78; }
        .store-category-title { display: block; font-weight: 800; color: var(--text-main); font-size: 14px; }
        .store-category-btn.is-disabled .store-category-title { font-size: 11px; white-space: nowrap; }
        .store-category-desc { display: block; color: var(--text-muted); font-size: 11px; margin-top: 2px; }
        .store-category-btn.is-disabled .store-category-desc { display: none; }
        .coming-soon-badge { font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 5px; border-radius: 999px; background: rgba(245,158,11,.12); color: #fbbf24; border: 1px solid rgba(245,158,11,.22); }
        .store-category-btn.is-disabled .coming-soon-badge { position: static; order: 3; }
        .store-category-btn.is-new { width: auto; min-height: 0; padding: 7px 10px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); }
        .store-category-btn.is-new:hover { border-color: rgba(16,185,129,.6); background: rgba(16,185,129,.14); transform: translateY(-2px); }
        .store-category-btn.is-new .store-category-icon { width: 18px; height: 18px; border-radius: 7px; margin-bottom: 0; font-size: 10px; }
        .store-category-btn.is-new .store-category-title { font-size: 11px; white-space: nowrap; }
        .store-category-btn.is-new .store-category-desc { display: none; }
        .store-category-btn.is-new .coming-soon-badge { position: static; order: 3; }
        .coming-soon-badge.is-new-badge { background: rgba(16,185,129,.14); color: #34d399; border-color: rgba(16,185,129,.28); }
        @media (max-width: 640px) { .store-category-tabs { max-width: 100%; } .store-leaks { justify-content: flex-start; } }

        .dialog-actions { display: grid; grid-template-columns: 1fr; gap: .6rem; }
        .dialog-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
        .dialog-actions-grid .dialog-btn-main { grid-column: 1 / -1; }
        .dialog-btn {
            min-height: 44px; padding: 0 1rem; border-radius: 14px; font-size: 14px; font-weight: 700;
            display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: 100%;
            transition: background .2s, border-color .2s, transform .15s, opacity .2s, box-shadow .2s;
            white-space: nowrap;
        }
        .dialog-btn:active { transform: scale(.98); }
        .dialog-btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.20); }
        .dialog-btn-primary:hover { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
        .dialog-btn-soft { background: rgba(59,130,246,.14); border: 1px solid rgba(96,165,250,.30); color: #dbeafe; box-shadow: none; }
        .dialog-btn-soft:hover { background: rgba(59,130,246,.22); }
        .dialog-btn-ghost { background: transparent; border: 1px solid var(--notif-border); color: var(--text-main); }
        .dialog-btn-ghost:hover { background: rgba(127,127,127,.1); }
        .dialog-btn:focus-visible, .toast-close:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

        /* Dialog layout polish: prevent copy/action overflow */
        .dialog-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; }
        .dialog-code #app-dialog-code { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; line-height: 1.6; }
        .dialog-code #app-dialog-copy { width: auto; min-width: 112px; white-space: nowrap; flex: 0 0 auto; }
        .dialog-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .dialog-actions-grid .dialog-btn-main { grid-column: 1 / -1; }
        .dialog-actions .dialog-btn { min-width: 0; padding-left: .75rem; padding-right: .75rem; }
        .dialog-actions .dialog-btn span { overflow: hidden; text-overflow: ellipsis; }
        @media (max-width: 520px) {
            .dialog-code { grid-template-columns: 1fr; }
            .dialog-code #app-dialog-copy { width: 100%; }
            .dialog-actions-grid { grid-template-columns: 1fr; }
        }
        @media (max-width: 640px) {
            #toast-stack { left: 1rem; right: 1rem; width: auto; }
        }


        /* Animated payment drawer */
        .payment-drawer {
            transition: border-color .25s ease, background .25s ease;
        }
        .payment-drawer summary {
            list-style: none;
        }
        .payment-drawer summary::-webkit-details-marker {
            display: none;
        }
        .payment-drawer .drawer-icon {
            transition: transform .3s ease;
        }
        .payment-drawer[open] .drawer-icon {
            transform: rotate(180deg);
        }
        .payment-drawer .drawer-content {
            display: grid;
            grid-template-rows: 0fr;
            transition: grid-template-rows .35s ease, opacity .25s ease;
            opacity: 0;
        }
        .payment-drawer[open] .drawer-content {
            grid-template-rows: 1fr;
            opacity: 1;
        }
        .payment-drawer .drawer-inner {
            overflow: hidden;
        }

        /* Compact checkout */
        .checkout-compact .glass-panel { padding: 1rem !important; }
        .checkout-compact .gap-8 { gap: 0.75rem !important; }
        .checkout-compact .space-y-6 > * + * { margin-top: 0.75rem !important; }

        /* Responsive scroll dock: shared by desktop, tablet, and phone. */
        body { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
        #contact-hub > button { display: none; }
        #contact-popup { position: fixed; bottom: calc(118px + env(safe-area-inset-bottom, 0px)); right: max(24px, calc(50% - 240px)); margin: 0; max-width: calc(100vw - 32px); background-color: var(--bg-color); }
        #toast-stack { bottom: calc(122px + env(safe-area-inset-bottom, 0px)); }
            .mobile-dock {
                --dock-ease: cubic-bezier(.22, 1, .36, 1);
                display: block; position: fixed; z-index: 80;
                left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
                width: min(calc(100% - 32px), 390px); padding: 7px;
                border: 1px solid rgba(148,163,184,.25); border-radius: 36px;
                background: rgba(248,250,252,.96); color: var(--text-main);
                box-shadow: 0 10px 35px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.22);
                transform: translateX(-50%);
                transition: width .42s var(--dock-ease), padding .42s var(--dock-ease), border-radius .42s var(--dock-ease);
                animation: dock-arrive .65s var(--dock-ease) both;
            }
            .dark .mobile-dock { background: rgba(15,23,42,.96); }
            .dock-items { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 2px; }
            .dock-item {
                position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
                min-width: 0; min-height: 60px; padding: 7px 0; border: 0; border-radius: 28px;
                background: transparent; color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
                transition: min-height .42s var(--dock-ease), background .22s, color .22s, padding .42s var(--dock-ease);
            }
            .dock-item > i { font-size: 20px; line-height: 24px; transition: transform .42s var(--dock-ease); }
            .dock-label { font-size: 10px; line-height: 14px; font-weight: 600; margin-top: 4px; max-height: 14px; opacity: 1;
                transition: max-height .42s var(--dock-ease), margin .42s var(--dock-ease), opacity .2s; }
            .dock-item:is([aria-current="page"], [aria-current="location"]) { background: rgba(59,130,246,.14); color: #2563eb; }
            .dark .dock-item:is([aria-current="page"], [aria-current="location"]) { background: rgba(96,165,250,.16); color: #93c5fd; }
            .dock-item:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
            .dock-item:active > i { transform: scale(.9); }
            .dock-count { position: absolute; top: 3px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px;
                border-radius: 12px; background: #2563eb; color: white; font: 700 10px/17px system-ui,sans-serif; }
            .dock-count[hidden] { display: none; }
            .mobile-dock.is-compact { width: min(calc(100% - 64px), 304px); padding: 5px; border-radius: 30px; }
            .mobile-dock.is-compact .dock-item { min-height: 44px; padding: 4px 0; }
            .mobile-dock.is-compact .dock-label { max-height: 0; margin-top: 0; opacity: 0; overflow: hidden; }
            .mobile-dock.is-compact .dock-count { top: 0; right: 0; }
            @keyframes dock-arrive { from { opacity: 0; transform: translate(-50%, 24px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
        @media (max-width: 767px) {
            body { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
            #navbar > div { padding-left: 14px; padding-right: 14px; }
            #navbar > div > div:last-child { gap: 6px; }
            #navbar .header-cart { display: none; }
            #navbar [data-lang="brand"] { font-size: 14px; }
            #contact-hub > button { display: none; }
            #contact-popup { position: fixed; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); right: 16px; margin: 0; max-width: calc(100vw - 32px); }
            #toast-stack { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
        }

        @media (min-width: 768px) {
            .mobile-dock { width: 480px; padding: 8px; bottom: 24px; border-radius: 42px; }
            .dock-items { gap: 4px; }
            .dock-item { min-height: 66px; padding: 8px 0; border-radius: 32px; }
            .dock-item > i { font-size: 22px; line-height: 26px; }
            .dock-label { font-size: 13px; line-height: 18px; max-height: 18px; }
            .mobile-dock.is-compact { width: 320px; padding: 7px; border-radius: 34px; }
            .mobile-dock.is-compact .dock-item { min-height: 44px; }
            .dock-count { top: 4px; right: 13px; }
        }
        @media (hover: hover) and (pointer: fine) {
            .dock-item:hover { color: #2563eb; background: rgba(59,130,246,.1); }
            .dark .dock-item:hover { color: #93c5fd; background: rgba(96,165,250,.15); }
        }
        @media (prefers-reduced-motion: reduce) {
            .mobile-dock, .mobile-dock * { animation: none !important; transition: none !important; }
        }

        /* Frosted-glass Dynamic Island: theme-aware tint, no blur animation. */
        #navbar {
            --island-ink: #0f172a; --island-muted: #25364c;
            --island-tint: rgba(255,255,255,.66); --island-fallback: rgba(248,250,252,.93);
            --island-edge: rgba(255,255,255,.72); --island-highlight: rgba(255,255,255,.50);
            --island-control: rgba(255,255,255,.24); --island-control-edge: rgba(15,23,42,.12);
            --island-hover: rgba(255,255,255,.58); --island-discord: #4338ca;
        }
        .dark #navbar {
            --island-ink: #f8fafc; --island-muted: #e2e8f0;
            --island-tint: rgba(8,15,28,.60); --island-fallback: rgba(13,20,34,.93);
            --island-edge: rgba(255,255,255,.24); --island-highlight: rgba(255,255,255,.15);
            --island-control: rgba(255,255,255,.07); --island-control-edge: rgba(255,255,255,.16);
            --island-hover: rgba(255,255,255,.16); --island-discord: #c7d2fe;
        }
        #navbar { --island-ease: cubic-bezier(.22,1,.36,1); position: fixed; z-index: 50;
            top: max(16px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
            width: min(calc(100% - 32px), 1060px); padding: 0;
            transition: width .48s var(--island-ease); }
        #navbar .island-shell { display: flex; align-items: center; gap: 12px; width: 100%;
            padding: 8px 12px; border: 1px solid var(--island-edge); border-radius: 40px;
            background: linear-gradient(135deg,var(--island-highlight),transparent 55%), var(--island-tint);
            color: var(--island-ink);
            -webkit-backdrop-filter: blur(22px) saturate(155%);
            backdrop-filter: blur(22px) saturate(155%);
            box-shadow: 0 8px 28px rgba(2,6,23,.13), inset 0 1px 0 var(--island-highlight), inset 0 -1px 0 rgba(255,255,255,.04);
            transition: padding .48s var(--island-ease), gap .48s var(--island-ease); }
        #navbar .island-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; flex-shrink: 0;
            padding: 0 4px; background: transparent; border: 0; color: var(--island-ink); cursor: pointer; }
        #navbar .island-logo { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
            width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
            background: linear-gradient(135deg,#3b82f6,#172554); color: #fff; font-size: 14px; font-weight: 700;
            transition: width .48s var(--island-ease), height .48s var(--island-ease); }
        #navbar .island-logo img { width: 100%; height: 100%; object-fit: cover; }
        #navbar .island-logo [hidden] { display: none; }
        #navbar .island-name { font-size: 14px; font-weight: 650; letter-spacing: -.025em; white-space: nowrap; }
        #navbar .island-links { display: flex; align-items: center; justify-content: center; gap: 24px; flex: 1;
            overflow: hidden; opacity: 1; max-width: 520px; max-height: 44px;
            transition: max-width .48s var(--island-ease), opacity .18s; }
        #navbar .island-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--island-muted); font-size: 14px; white-space: nowrap; }
        #navbar .island-links a:hover { color: var(--island-ink); }
        #navbar .island-links .fa-discord { color: var(--island-discord); }
        #navbar .island-controls { display: flex; align-items: center; justify-content: center; gap: 8px;
            max-width: 220px; max-height: 44px; opacity: 1; overflow: hidden; margin-left: auto;
            transition: max-width .48s var(--island-ease), max-height .48s var(--island-ease), opacity .18s; }
        #navbar .island-controls button, #navbar .island-toggle { position: relative; display: flex; align-items: center;
            justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
            background: var(--island-control); border: 1px solid var(--island-control-edge); color: var(--island-ink); font-size: 14px; cursor: pointer;
            transition: background .2s, color .2s; }
        #navbar .island-controls button:hover, #navbar .island-toggle:hover { background: var(--island-hover); }
        #navbar .island-toggle { background: transparent; color: var(--island-muted); }
        #navbar .island-toggle i { transition: transform .48s var(--island-ease); }
        #navbar .island-cart-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; border-radius: 10px;
            padding: 0 3px; background: #2563eb; color: #fff; font: 700 10px/16px system-ui,sans-serif; }
        #navbar button:focus-visible, #navbar a:focus-visible { outline: 2px solid #93c5fd; outline-offset: -2px; }
        #navbar.is-compact { width: 260px; }
        #navbar.is-compact .island-shell { padding: 4px 8px; gap: 0; }
        #navbar.is-compact .island-logo { width: 28px; height: 28px; }
        #navbar.is-compact .island-brand { flex: 1; }
        #navbar.is-compact .island-links, #navbar.is-compact .island-controls { max-width: 0; max-height: 0; opacity: 0; pointer-events: none; margin: 0; }
        #navbar.is-compact .island-toggle i { transform: rotate(180deg); }
        #games, #faq { scroll-margin-top: 110px; }
        @media (min-width: 768px) and (max-width: 1099px) {
            #navbar .island-shell { flex-wrap: wrap; }
            #navbar .island-links { order: 4; flex: 1 0 100%; max-width: 100%; }
            #navbar.is-compact .island-shell { flex-wrap: nowrap; }
            #navbar.is-compact .island-links { flex: 0 0 0; }
        }
        /* Phone island expands horizontally, never to a second row. */
        @media (max-width: 767px) {
            #navbar { top: max(12px, env(safe-area-inset-top, 0px)); width: min(calc(100% - 32px), 480px); }
            #navbar .island-shell { flex-wrap: nowrap; gap: 6px; padding: 8px; border-radius: 40px; }
            #navbar .island-brand { flex: 0 0 auto; min-width: 44px; gap: 0; }
            #navbar .island-name { max-width: 0; opacity: 0; overflow: hidden; transition: max-width .48s var(--island-ease), opacity .18s; }
            #navbar .island-links { display: none; }
            #navbar .island-controls { order: 0; flex: 1 1 0; min-width: 0; max-width: 220px; max-height: 44px; margin-left: auto; gap: 4px; }
            #navbar .island-toggle { order: 0; }
            #navbar.is-compact .island-shell { flex-wrap: nowrap; gap: 0; }
            #navbar.is-compact .island-brand { flex: 1; gap: 8px; }
            #navbar.is-compact .island-name { max-width: 110px; opacity: 1; }
            #navbar.is-compact .island-controls { flex: 0 0 0; margin: 0; gap: 0; }
            #navbar .header-cart { display: flex; }
            #app-container { padding-top: 112px; }
        }
        @media (min-width: 460px) and (max-width: 767px) {
            #navbar .island-brand { gap: 8px; }
            #navbar .island-name { max-width: 110px; opacity: 1; }
        }
        @media (max-width: 359px) {
            /* The cart remains available in the bottom dock on very narrow phones. */
            #navbar .island-controls .header-cart { display: none; }
        }
        @media (prefers-reduced-motion: reduce) {
            #navbar, #navbar * { transition: none !important; animation: none !important; }
        }

        /* Readable, low-cost fallback for unsupported browsers and GPU saver. */
        @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
            #navbar .island-shell { background-color: var(--island-fallback); }
        }
        html.perf-lite #navbar .island-shell {
            backdrop-filter: none; -webkit-backdrop-filter: none;
            background-color: var(--island-fallback);
        }
        @media (prefers-reduced-transparency: reduce) {
            #navbar .island-shell { backdrop-filter: none; -webkit-backdrop-filter: none; background-color: var(--island-fallback); }
        }

        /* Contextual checkout shortcuts; never trigger order/payment actions. */
        #mobile-dock .dock-items[hidden] { display: none !important; }
        #checkout-customer-section, #checkout-payment-section, #checkout-summary-section { scroll-margin-top: 148px; }
        #checkout-customer-section:focus-visible, #checkout-payment-section:focus-visible, #checkout-summary-section:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }
        #checkout-dock-items .dock-label { white-space: nowrap; }
        #navbar { --checkout-scroll-height: 62px; }
        @media (min-width: 768px) and (max-width: 1099px) { #navbar { --checkout-scroll-height: 118px; } }
        @media (max-width: 767px) { #navbar { --checkout-scroll-height: 62px; } }
        #checkout-summary-section #discount-input { min-width: 0; width: 0; }
        #checkout-items > div > span:first-child { min-width: 0; overflow-wrap: anywhere; }

        /* Portrait QRIS: keep the original file, full aspect ratio, and quiet zone. */
        .qris-artwork { width: min(100%, 360px); margin: 12px auto 20px; }
        .qris-preview { display: block; width: 100%; padding: 0; border: 1px solid var(--glass-border); border-radius: 12px;
            background: #fff; cursor: zoom-in; overflow: hidden; }
        #qris-image { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; }
        .qris-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
        .qris-actions > * { flex: 1; }
        .qris-action, .qris-icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
            border: 1px solid var(--glass-border); border-radius: 12px; background: var(--bg-color); color: var(--text-main);
            padding: 10px 16px; font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; white-space: nowrap; }
        .qris-icon-button { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
        .qris-action:hover, .qris-icon-button:hover { background: rgba(127,127,127,.12); }
        .qris-action-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
        .qris-action-primary:hover { background: #1d4ed8; }
        .qris-note { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
        .qris-note[hidden] { display: none; }
        .qris-note a { color: #2563eb; text-decoration: underline; text-underline-offset: 3px; }
        .dark .qris-note a { color: #93c5fd; }
        #qris-viewer { width: min(calc(100vw - 32px), 980px); height: min(calc(100vh - 32px), 1000px); height: min(calc(100dvh - 32px), 1000px);
            max-width: none; max-height: none; padding: 0; margin: auto; border: 1px solid var(--glass-border); border-radius: 20px;
            background: var(--bg-color); color: var(--text-main); overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
        #qris-viewer::backdrop { background: rgba(2,6,23,.78); }
        .qris-viewer-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; }
        .qris-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--glass-border); }
        .qris-viewer-header h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
        .qris-viewer-header p { margin: 3px 0 0; font-size: 14px; color: var(--text-muted); }
        .qris-viewer-stage { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; background: rgba(127,127,127,.06); }
        .qris-viewer-canvas { display: grid; place-items: center; min-width: 100%; min-height: 100%; }
        #qris-viewer-image { display: block; max-width: none; height: auto; flex-shrink: 0; background: #fff; }
        .qris-viewer-footer { padding: 12px 20px 16px; border-top: 1px solid var(--glass-border); }
        .qris-viewer-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
        .qris-zoom-controls { display: flex; align-items: center; gap: 4px; }
        #qris-zoom-level { display: inline-block; width: 44px; text-align: center; font: 600 14px system-ui,sans-serif; }
        .qris-icon-button:disabled { opacity: .4; cursor: default; }
        .qris-preview:focus-visible, .qris-action:focus-visible, .qris-icon-button:focus-visible, .qris-viewer-stage:focus-visible { outline: 2px solid #60a5fa; outline-offset: -3px; }
        @media (max-width: 540px) {
            #qris-viewer { width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 16px; }
            .qris-viewer-header { padding: 12px; gap: 8px; }
            .qris-viewer-footer { padding: 12px; }
            .qris-viewer-tools { justify-content: center; gap: 8px; }
            .qris-viewer-tools > .qris-action-primary { width: 100%; }
        }

        .status-discontinued { background: #94a3b8; box-shadow: none; }
        .catalog-status { min-width: 0; max-width: calc(100% - 40px); align-items: flex-start; line-height: 1.5; }
        .catalog-status .status-dot { flex-shrink: 0; margin-top: 4px; }
        .product-lifecycle-notice { grid-column: 1 / -1; padding: 16px; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(127,127,127,.07); }
        .product-lifecycle-notice strong { display: block; margin-bottom: 8px; font-size: 14px; }
        .product-lifecycle-notice p { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
        .product-lifecycle-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
        .product-lifecycle-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: rgba(59,130,246,.14); color: #2563eb; font-size: 14px; font-weight: 600; }
        .dark .product-lifecycle-links a { color: #93c5fd; }
        .provider-checkout-notice p { margin-top: 8px; font-size: 14px; line-height: 1.5; }
        .provider-fee-label { font-size: 12px; line-height: 1.45; margin-top: 4px; }
        .provider-fee-note { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid rgba(59,130,246,.25); background: rgba(59,130,246,.08); font-size: 14px; line-height: 1.5; }
        #view-product-modal .max-w-4xl { min-height: 0; }
        #view-product-modal #add-to-cart-btn { white-space: normal; }
        @media (max-width: 540px) {
            #view-product-modal #modal-tiers { grid-template-columns: minmax(0, 1fr); }
            #view-product-modal #modal-tiers button > span { white-space: nowrap; overflow-wrap: normal; }
            #view-product-modal #modal-title { font-size: 24px; }
            #view-product-modal #modal-tiers button { gap: 8px; text-align: left; }
            #view-product-modal #modal-tiers button > span { overflow-wrap: anywhere; }
            #view-product-modal #modal-status { overflow-wrap: anywhere; }
            #view-product-modal #modal-tab-buttons { gap: 16px; }
            #pay-button { white-space: normal; }
        }
        .hosted-payment-guide summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 600; color: var(--notif-title); }
        .hosted-payment-guide summary:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }
        .hosted-payment-guide ol { list-style: decimal; margin: 4px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
        .hosted-payment-guide li + li { margin-top: 8px; }

        /* Ryo live wallpaper: local assets, no external video dependency. */
        body { position: relative; isolation: isolate; }
        #store-wallpaper { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; background: #070b24; }
        #store-wallpaper img, #store-wallpaper video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
        #store-wallpaper video { opacity: 0; transition: opacity .4s ease; }
        #store-wallpaper.is-playing video { opacity: 1; }
        #store-wallpaper::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(248,250,252,.88), rgba(248,250,252,.84) 45%, rgba(248,250,252,.94)); }
        .dark #store-wallpaper::after { background: linear-gradient(180deg, rgba(3,7,18,.60), rgba(3,7,18,.57) 42%, rgba(3,7,18,.78)); }
        body:has(#store-wallpaper) .ambient-light { display: none; }
        body[data-store-view="checkout"] #store-wallpaper { visibility: hidden; }
        html.perf-lite #store-wallpaper video { display: none; }
        @media (max-width: 767px) { #store-wallpaper img, #store-wallpaper video { object-position: 50% 40%; } }
        @media (prefers-reduced-motion: reduce) { #store-wallpaper video { display: none; transition: none; } }

        /* Clear-glass navigation: shared material on the top island and bottom dock.
           Keep text fully opaque; only the glass surface is translucent. */
        :root {
            --clear-glass-fill: rgba(255,255,255,.12);
            --clear-glass-shine: rgba(255,255,255,.24);
            --clear-glass-edge: rgba(255,255,255,.48);
            --clear-glass-top: rgba(255,255,255,.70);
            --clear-glass-bottom: rgba(100,116,139,.13);
            --clear-glass-ink: #162238;
            --clear-glass-muted: #334155;
            --clear-glass-selected: rgba(255,255,255,.36);
            --clear-glass-control: rgba(255,255,255,.09);
            --clear-glass-shadow: rgba(15,23,42,.10);
        }
        :root.dark {
            --clear-glass-fill: rgba(8,12,22,.10);
            --clear-glass-shine: rgba(255,255,255,.075);
            --clear-glass-edge: rgba(255,255,255,.22);
            --clear-glass-top: rgba(255,255,255,.43);
            --clear-glass-bottom: rgba(255,255,255,.12);
            --clear-glass-ink: #f8fafc;
            --clear-glass-muted: #e2e8f0;
            --clear-glass-selected: rgba(255,255,255,.14);
            --clear-glass-control: rgba(255,255,255,.035);
            --clear-glass-shadow: rgba(0,0,0,.18);
        }
        #navbar, .dark #navbar {
            --island-ink: var(--clear-glass-ink);
            --island-muted: var(--clear-glass-muted);
            --island-control: var(--clear-glass-control);
            --island-control-edge: rgba(148,163,184,.12);
            --island-hover: var(--clear-glass-selected);
        }
        #navbar .island-shell, #mobile-dock, .dark #mobile-dock {
            background: linear-gradient(115deg, var(--clear-glass-shine), transparent 42%, rgba(255,255,255,.025) 78%, var(--clear-glass-shine)), var(--clear-glass-fill);
            border: 1px solid var(--clear-glass-edge);
            border-top-color: var(--clear-glass-top);
            border-bottom-color: var(--clear-glass-bottom);
            color: var(--clear-glass-ink);
            -webkit-backdrop-filter: blur(8px) saturate(150%);
            backdrop-filter: blur(8px) saturate(150%);
            box-shadow: 0 8px 24px var(--clear-glass-shadow), inset 0 1px 0 rgba(255,255,255,.20), inset 1px 0 0 rgba(255,255,255,.10), inset -1px 0 0 rgba(255,255,255,.07), inset 0 -1px 0 rgba(255,255,255,.08);
        }
        #mobile-dock .dock-item { color: var(--clear-glass-muted); text-shadow: 0 1px 4px rgba(0,0,0,.04); }
        #mobile-dock .dock-item:is([aria-current="page"], [aria-current="location"]) {
            color: var(--clear-glass-ink);
            background: var(--clear-glass-selected);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.17), 0 2px 8px rgba(0,0,0,.04);
        }
        #navbar .island-controls button, #navbar .island-toggle { box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
        #navbar .island-brand, #navbar .island-links, #navbar .island-controls, #mobile-dock .dock-items { position: relative; }
        @media (hover: hover) and (pointer: fine) {
            #mobile-dock .dock-item:hover { color: var(--clear-glass-ink); background: var(--clear-glass-selected); }
        }
        /* Without blur, add tint to separate navigation from text scrolling behind it. */
        html.perf-lite #navbar .island-shell, html.perf-lite #mobile-dock { --clear-glass-fill: rgba(248,250,252,.70); }
        html.dark.perf-lite #navbar .island-shell, html.dark.perf-lite #mobile-dock { --clear-glass-fill: rgba(8,12,22,.70); }
        html.perf-lite #navbar .island-shell, html.perf-lite #mobile-dock {
            -webkit-backdrop-filter: none; backdrop-filter: none;
            background: linear-gradient(115deg, var(--clear-glass-shine), transparent 48%, var(--clear-glass-shine)), var(--clear-glass-fill);
        }
        @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
            #navbar .island-shell, #mobile-dock { --clear-glass-fill: rgba(248,250,252,.70); }
            .dark #navbar .island-shell, .dark #mobile-dock { --clear-glass-fill: rgba(8,12,22,.70); }
            #navbar .island-shell, #mobile-dock { background: linear-gradient(115deg, var(--clear-glass-shine), transparent 48%, var(--clear-glass-shine)), var(--clear-glass-fill); }
        }
        @media (prefers-reduced-motion: reduce) {
            #navbar .island-shell, #mobile-dock { --clear-glass-fill: rgba(248,250,252,.70); }
            .dark #navbar .island-shell, .dark #mobile-dock { --clear-glass-fill: rgba(8,12,22,.70); }
            #navbar .island-shell, #mobile-dock { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(115deg, var(--clear-glass-shine), transparent 48%, var(--clear-glass-shine)), var(--clear-glass-fill); }
        }
    