        @font-face {
            font-family: 'Kittitada';
            src: url('/static/fonts/Font Kittitada/PSL244pro.otf') format('opentype');
            font-weight: 400;
            font-style: normal;
        }
        @font-face {
            font-family: 'Kittitada';
            src: url('/static/fonts/Font Kittitada/PSL244pro.otf') format('opentype');
            font-weight: 700;
            font-style: normal;
        }
        @font-face {
            font-family: 'Kittitada';
            src: url('/static/fonts/Font Kittitada/PSL244pro.otf') format('opentype');
            font-weight: 400;
            font-style: italic;
        }
        @font-face {
            font-family: 'Kittitada';
            src: url('/static/fonts/Font Kittitada/PSL244pro.otf') format('opentype');
            font-weight: 700;
            font-style: italic;
        }
        /* Chinese (Simplified) — variable font covers the full 100–900 weight range.
           size-adjust shrinks every glyph uniformly so CJK (which fills the full
           em box) matches the apparent size of the Latin/Thai display face,
           instead of rendering visibly larger at the same font-size. */
        @font-face {
            font-family: 'Noto Sans SC';
            src: url('/static/event/fonts/NotoSansSC-VariableFont_wght.ttf') format('truetype');
            font-weight: 100 900;
            font-style: normal;
            font-display: swap;
            /* 48% sizes Chinese glyphs to the average of English cap-height (0.49em)
               and Thai body-height (0.41em), so CJK reads at a similar size to both. */
            size-adjust: 48%;
        }
        /* *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; letter-spacing: 1px; } */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            /* ── Palette ──────────────────────────────────────────────────── */
            --bg:          #05091A;               /* deep navy */
            --bg2:         #0B1530;               /* panel navy */
            --panel:       rgba(85,183,233,0.07);
            --panel-hover: rgba(85,183,233,0.12);
            --border:      rgba(85,183,233,0.18);

            --blue:        #55B7E9;               /* hero / primary */
            --blue-light:  #8FD3F5;               /* highlights & labels */
            --blue-deep:   #2E9AD4;               /* gradients / hover */
            --blue-glow:   rgba(85,183,233,0.45);/* shadow */

            --lavender:    #9B82D4;               /* complement */
            --lav-deep:    #7B62B4;

            --gold:        #C9A87C;               /* warm accent */
            --gold-light:  #E0C89A;

            --text:        #EBF2F8;               /* slightly blue-white */
            --muted:       rgba(235,242,248,0.52);
            --green:       #4ade80;

            /* ── Figma palette (light pages) ──────────────────────────────── */
            --fig-blue:    #55B7E9;               /* accent */
            --fig-ink:     #111111;               /* primary text */
            --fig-gray-700:#374151;
            --fig-gray-600:#4B5563;
            --fig-gray-400:#9CA3AF;               /* muted */

            --font-h: 'Kittitada', sans-serif;
            --font-b: 'Kittitada', sans-serif;
        }

        /* Chinese: swap the Thai display face for Noto Sans SC everywhere the
           font vars are used (headings + body). Falls back to system sans. */
        :root[data-lang="zh"] {
            --font-h: 'Noto Sans SC', sans-serif;
            --font-b: 'Noto Sans SC', sans-serif;
        }

        html, body {
            height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-b); overflow: hidden;
            /* ── Cross-platform mobile hardening (iOS Safari + Android Chrome) ── */
            -webkit-text-size-adjust: 100%; text-size-adjust: 100%;   /* stop iOS auto-inflating text in landscape */
            -webkit-tap-highlight-color: transparent;                 /* remove grey tap flash */
            -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
            overscroll-behavior: none;                                /* no rubber-band chaining to the page */
        }
        /* Kill the 300ms tap delay + double-tap zoom on interactive controls */
        button, a, input, label, select, .lang-opt, .pulse-btn, [onclick] { touch-action: manipulation; }
        /* Smooth momentum scrolling + contained overscroll on every scrollable surface */
        #s-scan, #s-results, .res-scroll, .privacy-scroll, .chat-msgs {
            -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
        }

        /* ── BACKGROUND ────────────────────────────────────────────────────── */
        .bg-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
        .orb {
            position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.20;
            animation: orb-drift 14s ease-in-out infinite alternate;
        }
        /* blue top-left, lavender right, gold bottom-centre */
        .o1 { width: 720px; height: 720px; background: #3A7ABF; top: -260px; left: -220px; animation-delay: 0s; }
        .o2 { width: 460px; height: 460px; background: #9B82D4; top: 30%; right: -160px; animation-delay: -5s; }
        .o3 { width: 360px; height: 360px; background: #C9A87C; bottom: -130px; left: 35%; animation-delay: -10s; }
        @keyframes spin { to { transform: rotate(360deg); } }
        @keyframes orb-drift {
            from { transform: translate(0,0) scale(1); }
            to   { transform: translate(40px,50px) scale(1.12); }
        }

        /* Floating particles */
        .particles { position: absolute; inset: 0; }
        .particle {
            position: absolute; width: 2px; height: 2px; border-radius: 50%;
            background: var(--blue-light); opacity: 0;
            animation: particle-rise linear infinite;
        }
        @keyframes particle-rise {
            0%   { transform: translateY(0) translateX(0); opacity: 0; }
            10%  { opacity: 0.6; }
            90%  { opacity: 0.25; }
            100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
        }

        /* ── SCREENS ───────────────────────────────────────────────────────── */
        .screen {
            position: fixed; inset: 0; display: flex;
            flex-direction: column; align-items: center; justify-content: center;
            z-index: 10;
            padding: max(40px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(40px, env(safe-area-inset-left));
            transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
                        transform 0.55s cubic-bezier(0.4,0,0.2,1);
        }
        .screen.out-up   { opacity: 0; transform: translateY(-28px); pointer-events: none; }
        .screen.out-down { opacity: 0; transform: translateY(28px);  pointer-events: none; }
        .screen.hidden   { opacity: 0; transform: translateY(28px);  pointer-events: none; visibility: hidden; }

        /* ── SCREEN 1 · LANDING ────────────────────────────────────────────── */
        #s-landing { gap: 24px; text-align: center; justify-content: safe center; overflow-y: auto; }

        .logo-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }

        /* Groups the logo with the hero heading so they scale/space together
           at every viewport size instead of relying on independent offsets. */
        .hero-group { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
        #s-landing .hero-group { gap: 4px; }
        /* Centered tagline in the hero */
        .brand-tagline { display: block; text-align: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.38em; text-transform: uppercase; color: #ffffff; margin-bottom: 12px; }

        /* Floating feature bubbles around the scan orb */
        .scan-stage { position: relative; display: flex; align-items: center; justify-content: center; }

        .orb-wrap { position: relative; display: inline-flex; }
        .scan-bubble {
            position: absolute; z-index: 12;
            display: inline-flex; align-items: center; gap: 8px;
            padding: 12px 20px; border-radius: 9999px;
            background: rgba(255,255,255,0.88); backdrop-filter: blur(16px);
            border: 1px solid rgba(255,255,255,0.7);
            box-shadow: 0 8px 26px rgba(85,183,233,0.25);
            font-size: 1.2rem; font-weight: 700; color: #374151; white-space: nowrap;
        }
        [data-lang="zh"] .scan-bubble 
        { padding: 10px 18px;
          font-size: 28px;
        }
          /* size inherits English; only padding tuned for CJK */

        .scan-bubble::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #55B7E9; flex-shrink: 0; }
        .bubble-1 { top: 24%;    left: -26px;  animation: wave-1 6s ease-in-out infinite; }
        .bubble-2 { top: 46%;    right: -10px; animation: wave-2 7s ease-in-out infinite; }
        
        .bubble-3 { bottom: 32%; left: 16px;  animation: wave-3 5.5s ease-in-out infinite; }
        .bubble-3::before { background: #C084FC; }

        @keyframes wave-1 {
            0%   { transform: translate(0px, 0px)    rotate(0deg)   scale(1); }
            20%  { transform: translate(4px, -10px)  rotate(1.5deg) scale(1.03); }
            45%  { transform: translate(-3px, -16px) rotate(-1deg)  scale(1.05); }
            70%  { transform: translate(5px, -8px)   rotate(2deg)   scale(1.02); }
            100% { transform: translate(0px, 0px)    rotate(0deg)   scale(1); }
        }
        @keyframes wave-2 {
            0%   { transform: translate(0px, 0px)    rotate(0deg)    scale(1); }
            25%  { transform: translate(-5px, -12px) rotate(-2deg)   scale(1.04); }
            50%  { transform: translate(4px, -20px)  rotate(1.5deg)  scale(1.06); }
            75%  { transform: translate(-3px, -10px) rotate(-1deg)   scale(1.03); }
            100% { transform: translate(0px, 0px)    rotate(0deg)    scale(1); }
        }
        @keyframes wave-3 {
            0%   { transform: translate(0px, 0px)   rotate(0deg)   scale(1); }
            30%  { transform: translate(6px, -8px)  rotate(2deg)   scale(1.04); }
            55%  { transform: translate(-4px, -14px) rotate(-1.5deg) scale(1.06); }
            80%  { transform: translate(3px, -6px)  rotate(1deg)   scale(1.02); }
            100% { transform: translate(0px, 0px)   rotate(0deg)   scale(1); }
        }
        .logo-img  { height: 160px; object-fit: contain; mix-blend-mode: multiply;}
        .logo-tagline {
            font-size: 0.68rem; font-weight: 700; letter-spacing: 0.38em;
            text-transform: uppercase; color: var(--gold);
        }

        /* Eyebrow line above hero title */
        .hero-eyebrow {
            display: flex; align-items: center; justify-content: center; gap: 14px;
            font-size: 0.65rem; font-weight: 700; letter-spacing: 0.38em;
            text-transform: uppercase; color: var(--blue-light);
        }
        .hero-eyebrow::before, .hero-eyebrow::after {
            content: ''; width: 40px; height: 1px; background: rgba(85,183,233,0.45);
        }

        .hero-title {
            font-family: var(--font-h); font-size: clamp(6rem, 14vw, 11rem);
            font-weight: 700; line-height: 0.75; letter-spacing: -0.03em; text-transform: uppercase;
            background: linear-gradient(135deg, var(--text) 0%, var(--blue-light) 50%, var(--gold-light) 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        .hero-sub {
            font-size: 20px; font-weight: 300;
            color: var(--muted); line-height: 1.6; margin: 8px auto 0;
            text-align: center;
            max-width: 400px;
        }

        /* Second orbit arc (counter-rotating gold) */
        .pulse-orbit-2 {
            position: absolute; width: 200px; height: 200px; border-radius: 50%;
            background: conic-gradient(from 180deg,
                transparent 0%, transparent 65%,
                rgba(201,168,124,0.55) 80%, rgba(224,200,154,0.40) 90%,
                transparent 100%);
            animation: orbit-spin 3.8s linear infinite reverse;
            z-index: 1;
        }

        /* ── Scan button ── */
        .pulse-btn {
            position: relative; display: inline-flex; flex-direction: column;
            align-items: center; gap: 20px; cursor: pointer;
            background: none; border: none; padding: 52px;
            -webkit-tap-highlight-color: transparent;
        }

        /* Expanding rings */
        .pulse-ring {
            position: absolute; border-radius: 50%;
            border: 1px solid rgba(85,183,233,0.20);
            animation: ring-expand 3s ease-out infinite;
        }
        .pulse-ring:nth-child(1) { width: 224px; height: 224px; animation-delay: 0s; }
        .pulse-ring:nth-child(2) { width: 280px; height: 280px; animation-delay: 1s; }
        .pulse-ring:nth-child(3) { width: 340px; height: 340px; animation-delay: 2s; }
        @keyframes ring-expand {
            0%   { transform: scale(0.65); opacity: 0.75; }
            100% { transform: scale(1.05); opacity: 0; }
        }

        /* Rotating scanner arc */
        .pulse-orbit {
            position: absolute; width: 200px; height: 200px; border-radius: 50%;
            background: conic-gradient(from 0deg,
                transparent 0%, transparent 60%,
                rgba(85,183,233,0.60) 78%, rgba(155,130,212,0.50) 90%,
                transparent 100%);
            animation: orbit-spin 2.6s linear infinite;
            z-index: 1;
        }
        @keyframes orbit-spin { to { transform: rotate(360deg); } }

        /* Core circle */
        .pulse-core {
            position: relative; z-index: 2;
            width: 182px; height: 182px; border-radius: 50%;
            background: radial-gradient(circle at 38% 32%,
                rgba(142,196,238,0.14) 0%, rgba(5,9,26,0.97) 68%);
            border: 1.5px solid rgba(85,183,233,0.30);
            display: flex; align-items: center; justify-content: center;
            overflow: hidden;
            box-shadow: 0 0 55px rgba(85,183,233,0.22), inset 0 0 40px rgba(85,183,233,0.05);
            transition: box-shadow 0.35s ease, transform 0.35s ease;
        }
        .pulse-btn:hover .pulse-core {
            transform: scale(1.07);
            box-shadow: 0 0 95px rgba(85,183,233,0.58), inset 0 0 50px rgba(85,183,233,0.10);
        }

        /* Grid texture */
        .core-grid {
            position: absolute; inset: 0; border-radius: 50%;
            background-image:
                linear-gradient(rgba(85,183,233,0.06) 1px, transparent 1px),
                linear-gradient(90deg, rgba(85,183,233,0.06) 1px, transparent 1px);
            background-size: 22px 22px;
        }

        /* Face oval guide */
        .core-oval {
            position: absolute;
            width: 55%; aspect-ratio: 0.76;
            top: 50%; left: 50%; transform: translate(-50%, -53%);
            border: 1.5px solid rgba(85,183,233,0.38); border-radius: 50%;
        }

        /* Scan sweep — laser line + trail above the face image */
        .core-scan {
            position: absolute; left: 0; right: 0; height: 60px; z-index: 3;
            background: linear-gradient(180deg,
                transparent 0%,
                rgba(85,183,233,0.08) 55%,
                rgba(85,183,233,0.55) 88%,
                rgba(180,230,255,0.95) 100%);
            box-shadow: 0 2px 16px rgba(85,183,233,0.55), 0 4px 40px rgba(85,183,233,0.25);
            animation: core-sweep 2.4s ease-in-out infinite;
        }
        /* Thin bright line at the bottom edge of the trail */
        .core-scan::after {
            content: ''; position: absolute;
            bottom: 0; left: 8%; right: 8%; height: 2px; border-radius: 1px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), rgba(85,183,233,1), rgba(255,255,255,0.95), transparent);
            box-shadow: 0 0 10px rgba(85,183,233,0.9), 0 0 30px rgba(85,183,233,0.5);
        }
        @keyframes core-sweep {
            0%   { top: 6%;  opacity: 0; }
            8%   { opacity: 1; }
            50%  { top: 68%; }
            92%  { opacity: 1; }
            100% { top: 6%;  opacity: 0; }
        }

        /* Corner markers */
        .core-crn { position: absolute; width: 18px; height: 18px; border-color: var(--blue-light); border-style: solid; opacity: 0.65; }
        .core-crn.tl { top: 14px; left: 14px;   border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
        .core-crn.tr { top: 14px; right: 14px;  border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
        .core-crn.bl { bottom: 14px; left: 14px;  border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
        .core-crn.br { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

        .pulse-icon {
            position: absolute; z-index: 2;
            width: 100%; height: 100%;
            object-fit: cover;
            top: 0; left: 0; transform: none;
            animation: face-pulse 3s ease-in-out infinite;
        }
        @keyframes face-pulse {
            0%, 100% { filter: drop-shadow(0 0 14px rgba(85,183,233,0.45)); }
            50%       { filter: drop-shadow(0 0 32px rgba(85,183,233,0.85)) drop-shadow(0 0 60px rgba(180,230,255,0.35)); }
        }

        /* Label + sub + shimmer */
        .scan-cta { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 56px; }
        .pulse-label {
            font-family: var(--font-h); font-size: 1rem; font-weight: 700; letter-spacing: 0.05em; text-transform: none;
            background: linear-gradient(90deg, var(--blue-light) 0%, var(--text) 50%, var(--blue-light) 100%);
            background-size: 200% 100%;
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
            animation: label-shimmer 2.8s ease-in-out infinite;
        }
        @keyframes label-shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }
        .pulse-sub { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }


        /* Tap indicator — standalone pill button */
        .tap-indicator {
            position: relative; z-index: 2;
            display: flex; align-items: center; gap: 8px;
            font-size: 0.88rem; font-weight: 600; letter-spacing: 0.06em;
            font-family: var(--font-b);
            color: var(--muted);
            background: rgba(85,183,233,0.10);
            border: 1px solid rgba(85,183,233,0.28);
            border-radius: 50px; padding: 10px 24px;
            cursor: pointer;
            animation: tap-hint 1.6s ease-in-out infinite;
            transition: background 0.2s, border-color 0.2s;
        }
        .tap-indicator:hover { background: rgba(85,183,233,0.18); border-color: rgba(85,183,233,0.55); }
        .tap-hand { font-size: 1.15rem; display: inline-block; line-height: 1; }
        @keyframes tap-hint {
            0%,100% { transform: translateY(0);   opacity: 0.80; }
            45%      { transform: translateY(-4px); opacity: 1;   }
            65%      { transform: translateY(-3px); opacity: 1;   }
        }

        /* Detecting ticker */
        .detecting-wrap {
            display: flex; align-items: center; gap: 8px;
            font-size: 20px; letter-spacing: 0.12em; text-transform: uppercase;
            color: var(--blue-light); overflow: hidden; height: 24px;
        }
        .detecting-wrap::before {
            content: ''; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%;
            background: var(--blue); animation: dot-blink 1.1s ease-in-out infinite alternate;
        }
        @keyframes dot-blink { from{opacity:0.15} to{opacity:1} }
        .detecting-ticker {
            display: flex; flex-direction: column;
            animation: ticker-roll 8s steps(4) infinite;
        }
        @keyframes ticker-roll { 0%{transform:translateY(0)} 100%{transform:translateY(-96px)} }
        .detecting-ticker span { display: block; height: 24px; line-height: 24px; }

        /* Hero feature text */
        .hero-feat-text {
            font-size: 0.80rem; font-weight: 450; letter-spacing: 0.025em;
            color: var(--muted); text-align: center; line-height: 1.75;
        }

        /* Feature strip — pill cards (kept for fallback) */
        .feature-strip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
        .feat {
            display: flex; align-items: center; gap: 8px; padding: 8px 16px;
            background: var(--panel); border: 1px solid var(--border);
            border-radius: 50px; backdrop-filter: blur(10px);
            transition: all 0.22s ease; cursor: default;
        }
        .feat:hover { border-color: rgba(85,183,233,0.45); background: var(--panel-hover); transform: translateY(-2px); }
        .feat-icon  { font-size: 1rem; }
        .feat-label { font-size: 0.72rem; font-weight: 500; color: var(--muted); white-space: nowrap; }

        /* ── SCREEN 2 · SCAN ───────────────────────────────────────────────── */
        /* Vertical layout: heading + privacy card on top, camera below */
        #s-scan { flex-direction: column; justify-content: flex-start; gap: 18px; padding: max(36px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); overflow-y: auto; }
        .scan-eyebrow {
            margin-top: 30px;
            font-size: 20px; font-weight: 700; letter-spacing: 0.2em;
            text-transform: uppercase; color: var(--blue-deep);
        }

        .cam-side { order: 2; position: relative; flex-shrink: 0; width: 100%; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

        .cam-frame {
            position: relative;
            width: min(600px, 95vw);
            height: min(680px, 64vh);
            height: min(680px, 64dvh);
            border-radius: 26px; overflow: hidden; background: #020812;
            box-shadow: 0 0 0 1px rgba(85,183,233,0.08), 0 18px 45px rgba(0,0,0,0.18);
        }

        /* Live video feed (shown when getUserMedia works) */
        #video-feed {
            width: 100%; height: 100%; object-fit: cover;
            transform: scaleX(-1); display: none;
        }
        #video-feed.active { display: block; }

        /* Captured photo preview */
        #captured-photo { width: 100%; height: 100%; object-fit: cover; display: none; }

        /* Placeholder — shown when no live feed available */
        .cam-placeholder {
            position: absolute; inset: 0;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 16px; background: #020812;
        }
        .cam-placeholder.off { display: none; }
        .ph-icon { font-size: 4rem; opacity: 0.5; animation: ph-pulse 2.5s ease-in-out infinite; }
        @keyframes ph-pulse { 0%,100%{opacity:0.4;transform:scale(1)} 50%{opacity:0.7;transform:scale(1.06)} }
        .ph-text { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

        /* Corner brackets */
        .cam-ovl { position: absolute; inset: 0; pointer-events: none; }
        .crn { position: absolute; width: 44px; height: 44px; border-color: var(--blue); border-style: solid; }
        .crn-tl { top: 18px; left: 18px;   border-width: 3px 0 0 3px; border-radius: 6px 0 0 0; }
        .crn-tr { top: 18px; right: 18px;  border-width: 3px 3px 0 0; border-radius: 0 6px 0 0; }
        .crn-bl { bottom: 18px; left: 18px;  border-width: 0 0 3px 3px; border-radius: 0 0 0 6px; }
        .crn-br { bottom: 18px; right: 18px; border-width: 0 3px 3px 0; border-radius: 0 0 6px 0; }

        /* Face oval */
        .face-oval {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -52%);
            width: 56%; aspect-ratio: 0.78;
            border: 2px dashed rgba(85,183,233,0.35);
            border-radius: 50%; pointer-events: none;
        }

        /* Scan sweep line */
        .scan-line {
            position: absolute; left: 0; right: 0; height: 3px;
            background: linear-gradient(90deg, transparent, var(--blue), transparent);
            box-shadow: 0 0 18px var(--blue), 0 0 40px rgba(85,183,233,0.40);
            animation: sweep 2.6s ease-in-out infinite;
            opacity: 0; transition: opacity 0.4s;
        }
        .scan-line.on { opacity: 1; }
        @keyframes sweep { 0%{top:8%} 50%{top:88%} 100%{top:8%} }

        /* Analyzing overlay */
        .analyzing {
            position: absolute; inset: 0; border-radius: 26px;
            background: rgba(5,9,26,0.88); backdrop-filter: blur(6px);
            display: flex; flex-direction: column; align-items: center;
            justify-content: center; gap: 20px;
            opacity: 0; pointer-events: none; transition: opacity 0.4s; z-index: 8;
        }
        .analyzing.on { opacity: 1; pointer-events: all; }
        .spin-ring {
            width: 64px; height: 64px; border-radius: 50%;
            border: 3px solid rgba(85,183,233,0.20); border-top-color: var(--blue);
            animation: spin 0.9s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .analyzing p     { font-size: 1.4rem; color: var(--blue-light); font-weight: 600; animation: blink 1.4s ease-in-out infinite; }
        .analyzing small { font-size: 1.05rem; color: var(--muted); }
        @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }

        /* Error overlay */
        .err-overlay {
            position: absolute; inset: 0; border-radius: 26px;
            background: rgba(5,9,26,0.92); backdrop-filter: blur(6px);
            display: flex; flex-direction: column; align-items: center;
            justify-content: center; gap: 14px; padding: 28px;
            opacity: 0; pointer-events: none; transition: opacity 0.4s; z-index: 9;
        }
        .err-overlay.on { opacity: 1; pointer-events: all; }
        .err-icon { font-size: 2.4rem; }
        .err-msg  { font-size: 0.85rem; color: #ff8888; text-align: center; line-height: 1.65; }
        .err-msg small { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
        .err-retry {
            background: var(--panel); border: 1px solid var(--border); color: var(--text);
            font-family: var(--font-b); font-size: 0.85rem; font-weight: 600;
            padding: 10px 24px; border-radius: 50px; cursor: pointer; transition: all 0.2s;
        }
        .err-retry:hover { border-color: var(--blue); }

        /* Controls below camera */
        .cam-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }

        /* Primary: big camera button — always works */
        .btn-take-photo {
            width: 72px; height: 72px; border-radius: 50%;
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            border: 4px solid rgba(255,255,255,0.18);
            font-size: 2rem; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 0 36px rgba(85,183,233,0.55);
            transition: all 0.2s ease;
            -webkit-tap-highlight-color: transparent; margin-top: 10px;
        }
        .btn-take-photo-icon { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }
        .btn-take-photo-hint { font-size: 20px; font-weight: 600; color: #6B7280; letter-spacing: 0.05em; text-align: center; }
        .btn-take-photo:hover  { transform: scale(1.1); box-shadow: 0 0 52px rgba(85,183,233,0.75); }
        .btn-take-photo:active { transform: scale(0.93); }

        /* Secondary: gallery upload */
        .btn-gallery {
            background: none; border: 1px solid var(--border); color: var(--muted);
            font-family: var(--font-b); font-size: 0.82rem;
            padding: 9px 20px; border-radius: 50px; cursor: pointer; transition: all 0.2s;
            -webkit-tap-highlight-color: transparent;
        }
        .btn-gallery:hover { border-color: var(--blue); color: var(--text); }

        .cam-hint { font-size: 0.82rem; color: var(--muted); text-align: center; max-width: 300px; }

        /* Right info panel */
        .scan-info { order: 1; width: 100%; max-width: 460px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 14px; text-align: center; }
        .scan-heading { font-family: var(--font-h); font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.2; line-height: 0.8; -webkit-text-stroke: 0.6px currentColor; }
        .scan-heading em { font-style: italic; color: var(--blue-deep); -webkit-text-fill-color: var(--blue-deep); }
        /* Chinese page: keep the English word (AI) upright, not slanted, so it sits
           steady among the upright CJK characters. */
        [data-lang="zh"] .scan-heading em { font-style: normal !important; }
        .scan-disclaimer {
            margin: 14px auto 0; max-width: 460px;
            font-size: 18px; line-height: 1.5; color: #8A93A3;
        }

        .steps { display: flex; flex-direction: column; gap: 10px; }
        .step {
            display: flex; align-items: flex-start; gap: 14px; padding: 13px 15px;
            background: var(--panel); border: 1px solid var(--border);
            border-radius: 14px; backdrop-filter: blur(10px);
        }
        .step-n {
            width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            display: flex; align-items: center; justify-content: center;
            font-size: 0.8rem; font-weight: 700;
        }
        .step p { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }

        /* Privacy notice */
        .privacy-notice {
            background: var(--panel); border: 1px solid var(--border);
            border-radius: 14px; padding: 14px 16px;
            backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 10px;
        }
        .privacy-title {
            font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
            text-transform: uppercase; color: var(--blue-light);
        }
        .privacy-scroll {
            max-height: 110px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px;
            scrollbar-width: thin; scrollbar-color: var(--border) transparent;
        }
        .privacy-scroll p { font-size: 18px; color: var(--muted); line-height: 1.6; }
        .privacy-check-label {
            display: flex; align-items: center; gap: 10px; cursor: pointer;
            padding-top: 4px; border-top: 1px solid var(--border);
        }
        .privacy-check-label input[type="checkbox"] {
            width: 16px; height: 16px; flex-shrink: 0; cursor: pointer;
            accent-color: var(--blue); margin-top: 10px;
        }
        .privacy-check-text { margin-top: 10px; font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.4; }

        /* Disabled state for camera controls */
        .cam-controls.locked .btn-take-photo { opacity: 0.35; cursor: not-allowed; }
        .cam-controls.locked .btn-gallery     { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

        /* ── Landing consent — gate the Scan button until the notice is agreed ── */
        .pulse-btn.locked { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.25); }
        #s-landing .consent-block {
            max-width: 340px; width: 100%;
            background: rgba(255,255,255,0.82);
            border: 1px solid rgba(85,183,233,0.30);
            backdrop-filter: blur(12px);
            box-shadow: 0 6px 24px rgba(85,183,233,0.16);
        }
        #s-landing .privacy-title { color: var(--blue-deep); }
        #s-landing .privacy-scroll { max-height: 88px; }
        #s-landing .privacy-scroll p { color: #4B5563; }
        #s-landing .privacy-check-text { color: #374151; }
        #s-landing .privacy-check-label { border-top-color: rgba(85,183,233,0.22); }
        /* Pulse the consent box while still awaiting agreement */
        .consent-block.awaiting {
            border-color: var(--blue) !important;
            animation: consent-pulse 1.8s ease-in-out infinite;
        }
        @keyframes consent-pulse {
            0%,100% { box-shadow: 0 0 0 0 rgba(85,183,233,0); }
            50%     { box-shadow: 0 0 0 5px rgba(85,183,233,0.22); }
        }
        /* Shake when the locked Scan button is tapped */
        .consent-block.shake { animation: consent-shake 0.5s ease; }
        @keyframes consent-shake {
            0%,100% { transform: translateX(0); }
            20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
            60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
        }

        /* Back button */
        .btn-back {
            position: absolute; top: calc(28px + env(safe-area-inset-top)); left: calc(28px + env(safe-area-inset-left)); z-index: 20;
            background: var(--panel); border: 1px solid var(--border);
            color: var(--muted); font-family: var(--font-b); font-size: 18px;
            padding: 9px 18px; border-radius: 50px; cursor: pointer;
            backdrop-filter: blur(10px); transition: all 0.2s;
        }
        .btn-back:hover { border-color: var(--blue); color: var(--text); }

        /* ── SCREEN 3 · RESULTS ────────────────────────────────────────────── */
        #s-results {
            flex-direction: column; padding: 28px 40px;
            align-items: stretch; gap: 18px;
            overflow-y: auto; overflow-x: hidden;
            justify-content: flex-start;
        }
        #s-results::-webkit-scrollbar { width: 4px; }
        #s-results::-webkit-scrollbar-thumb { background: var(--blue-deep); border-radius: 2px; }

        .res-header { display: flex; align-items: center; justify-content: space-between; }
        .res-title  { font-family: var(--font-h); font-size: clamp(1.4rem, 3vw, 2rem); }
        .res-title em { font-style: italic; color: var(--blue-light); -webkit-text-fill-color: var(--blue-light); }
        .res-header-btns { display: flex; gap: 10px; }

        /* Results page: photo strip at top, full-width routine below */
        .res-grid {
            display: flex; flex-direction: column; gap: 18px; width: 100%;
        }

        .res-photo { display: none; }
        #res-img { display: none; }
        .res-badge {
            position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
            background: rgba(5,9,26,0.78); backdrop-filter: blur(8px);
            border: 1px solid var(--border); border-radius: 50px;
            padding: 4px 14px; font-size: 0.7rem; color: var(--blue-light); font-weight: 500;
            white-space: nowrap;
        }

        .res-right { display: flex; flex-direction: column; gap: 14px; width: 100%; }

        .card {
            background: var(--panel); border: 1px solid var(--border);
            border-radius: 16px; padding: 18px 20px; backdrop-filter: blur(12px);
            animation: fade-up 0.5s ease both;
        }
        @keyframes fade-up {
            from { opacity: 0; transform: translateY(18px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        .card-label {
            font-size: 0.66rem; font-weight: 700; letter-spacing: 0.22em;
            text-transform: uppercase; color: var(--gold); margin-bottom: 11px;
        }
        .card-text { font-size: 0.93rem; line-height: 1.75; color: var(--text); }
        .card-text strong { color: var(--blue-light); font-weight: 700; }
        .card-text p { margin-bottom: 0.6em; }
        .card-text p:last-child { margin-bottom: 0; }

        /* ── Skin Profile Card — dark hero banner ── */
        .skin-profile-card {
            background: linear-gradient(135deg, #111111 0%, #1A3A60 45%, #2C6A9E 100%);
            border-radius: 22px; padding: 26px 24px;
            box-shadow: 0 12px 40px rgba(55,65,81,0.28), 0 2px 8px rgba(0,0,0,0.10);
            display: flex; flex-direction: column; gap: 16px;
            animation: fade-up 0.5s ease both;
            position: relative; overflow: hidden;
        }
        .skin-profile-card::before {
            content: ''; position: absolute;
            top: -40px; right: -40px;
            width: 180px; height: 180px; border-radius: 50%;
            background: radial-gradient(circle, rgba(85,183,233,0.22) 0%, transparent 70%);
            pointer-events: none;
        }
        .sp-eyebrow {
            font-size: 0.74rem; font-weight: 700; letter-spacing: 0.26em;
            text-transform: uppercase; color: rgba(201,168,124,0.90);
        }
        .sp-row { display: flex; flex-direction: column; gap: 5px; }
        .sp-label {
            font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
            text-transform: uppercase; color: rgba(255,255,255,0.50);
        }
        .sp-type-value {
            font-size: 1.10rem; color: #ffffff; font-weight: 500; line-height: 1.5;
        }
        .sp-pills { display: flex; flex-wrap: wrap; gap: 7px; }
        .sp-pill {
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.25);
            color: rgba(255,255,255,0.90); border-radius: 20px;
            padding: 5px 16px; font-size: 0.86rem; font-weight: 500;
            backdrop-filter: blur(4px);
        }
        .sp-divider { height: 1px; background: rgba(255,255,255,0.12); }

        /* ── RESULTS ENHANCEMENTS ──────────────────────────────────────────── */

        /* MiMi intro — bot message style */
        .mimi-intro-card {
            background: linear-gradient(135deg, #EEF6FC 0%, #F5FAFD 100%);
            border: 1px solid rgba(85,183,233,0.22);
            border-left: 4px solid var(--blue);
            border-radius: 20px; padding: 18px 20px;
            display: flex; gap: 14px; align-items: flex-start;
            animation: fade-up 0.5s ease both;
            box-shadow: 0 4px 20px rgba(85,183,233,0.10);
        }
        .mimi-avatar {
            width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            display: flex; align-items: center; justify-content: center;
            font-size: 1.3rem;
            box-shadow: 0 4px 14px rgba(85,183,233,0.40);
        }
        .mimi-intro-inner { flex: 1; min-width: 0; }
        .mimi-intro-label {
            font-size: 0.64rem; font-weight: 700; letter-spacing: 0.22em;
            text-transform: uppercase; color: var(--blue-deep); margin-bottom: 7px;
        }
        .mimi-intro-body { font-size: 0.92rem; line-height: 1.72; color: #374151; }
        .mimi-intro-body strong { color: var(--blue-deep); font-weight: 700; }



        /* CTA section card */
        .res-cta-card {
            background: none;
            border: none;
            border-radius: 0; padding: 25px 30px;
            box-shadow: none;
            animation: fade-up 0.5s ease both;
            display: flex; flex-direction: column; gap: 18px;
            margin-top: 0; border-radius: 20px;
        }
        .res-cta-top {
            display: flex; justify-content: flex-end;
        }
        .res-share-link {
            background: none; border: none; cursor: pointer;
            font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em;
            text-transform: uppercase; color: #374151;
            display: flex; align-items: center; gap: 6px; padding: 0;
        }
        .res-share-link:hover { color: var(--blue-deep); }
        .res-cta-body {
            display: flex; align-items: center; justify-content: space-between; gap: 25px;
        }
        .res-cta-text { flex: 1; }
        .res-cta-headline {
            font-family: var(--font-h); font-size: 28px; font-weight: 700;
            color: #111827; line-height: 1.25; margin: 0 0 10px;
        }
        .res-cta-desc {
            font-size: 20px; color: #6B7280; margin: 0;
        }
        .res-cta-label {
            font-size: 0.81rem; font-weight: 700; letter-spacing: 0.20em;
            text-transform: uppercase; color: var(--blue-deep); margin-bottom: 3px;
        }
        .res-cta-actions { display: flex; gap: 13px; }
        .res-cta-actions .btn-primary, .res-cta-actions .btn-ghost { flex: 1; text-align: center; font-size: 21px; }
        /* Contact button rendered as an <a> (e.g. LINE OA link) — match the buttons */
        .res-cta-actions a.btn-primary { text-decoration: none; display: flex; align-items: center; justify-content: center; }
        .res-email-box { display: flex; gap: 13px; margin-top: 13px; }
        .res-email-input {
            flex: 1; min-width: 0; padding: 15px 18px; border-radius: 15px;
            border: 1px solid rgba(85,183,233,0.45); background: #fff; color: #111;
            font-size: 1.13rem; outline: none;
        }
        .res-email-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(85,183,233,0.18); }
        .res-email-box .res-email-send { flex: 0 0 auto; padding-left: 28px; padding-right: 28px; font-size: 1.1rem; }
        @media (max-width: 480px) {
            .res-email-box { flex-direction: column; }
            .res-email-box .res-email-send { width: 100%; text-align: center; }
        }
        .res-cta-secondary { display: flex; gap: 13px; }
        .res-cta-secondary .btn-ghost {
            flex: 1; text-align: center;
            background: rgba(85,183,233,0.06);
            border-color: rgba(85,183,233,0.22);
            color: #374151; font-size: 21px;
        }
        .res-cta-secondary .btn-ghost:hover { border-color: var(--blue); background: rgba(85,183,233,0.12); }

        /* MiMi QR block */
        .mimi-qr {
            display: flex; flex-direction: column; align-items: center; gap: 10px;
            flex-shrink: 0;
        }
        .mimi-qr-wrap {
            display: flex; align-items: flex-end; gap: 8px;
        }
        .mimi-qr-icon {
            width: auto; height: 131px; object-fit: contain; flex-shrink: 0;
        }
        .mimi-qr-text {
            font-size: 0.81rem; font-weight: 700; color: #6B7280;
            text-align: center; letter-spacing: 0.1em; text-transform: uppercase;
        }
        .mimi-qr-code {
            width: 138px; height: 138px; object-fit: contain;
            background: #fff; padding: 8px; border-radius: 15px;
            border: 1px solid rgba(85,183,233,0.18);
            box-shadow: 0 4px 18px rgba(85,183,233,0.18);
        }

        /* Action buttons */
        .res-actions { display: flex; gap: 14px; flex-wrap: wrap; }
        .btn-primary {
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            border: none; color: #fff; font-family: var(--font-b);
            font-size: 25px; font-weight: 600;
            padding: 16px 33px; border-radius: 50px; cursor: pointer;
            box-shadow: 0 4px 22px rgba(85,183,233,0.38);
            transition: all 0.2s ease;
        }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(85,183,233,0.55); }

        .btn-ghost {
            background: var(--panel); border: 1px solid var(--border); color: var(--text);
            font-family: var(--font-b); font-size: 1.1rem; font-weight: 500;
            padding: 16px 33px; border-radius: 50px; cursor: pointer;
            backdrop-filter: blur(10px); transition: all 0.2s ease;
        }
        .btn-ghost:hover { border-color: var(--blue); }

        /* ── CHAT FAB + PANEL ───────────────────────────────────────────────── */
        .chat-fab {
            position: fixed; bottom: calc(28px + env(safe-area-inset-bottom)); right: calc(28px + env(safe-area-inset-right)); z-index: 100;
            width: 58px; height: 58px; border-radius: 50%;
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            border: none; cursor: pointer;
            display: none; align-items: center; justify-content: center;
            font-size: 1.55rem;
            box-shadow: 0 4px 22px rgba(85,183,233,0.45);
            transition: all 0.2s ease;
        }
        .chat-fab:hover { transform: scale(1.1); }
        .fab-badge {
            position: absolute; top: -4px; right: -4px;
            background: var(--gold); color: #05091A;
            font-size: 0.56rem; font-weight: 800;
            width: 17px; height: 17px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
        }

        .chat-panel {
            position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); right: calc(28px + env(safe-area-inset-right)); z-index: 99;
            width: 375px; height: 550px;
            background: #080f22; border: 1px solid var(--border);
            border-radius: 26px; display: flex; flex-direction: column;
            overflow: hidden; box-shadow: 0 20px 70px rgba(0,0,0,0.70);
            transform: scale(0.88) translateY(24px); transform-origin: bottom right;
            opacity: 0; pointer-events: none;
            transition: all 0.32s cubic-bezier(0.34,1.56,0.64,1);
        }
        .chat-panel.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

        .chat-header {
            padding: 15px 18px;
            background: linear-gradient(135deg, rgba(74,134,191,0.16), rgba(155,130,212,0.12));
            border-bottom: 1px solid var(--border);
            display: flex; align-items: center; gap: 11px;
        }
        .ch-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
        .ch-info   { flex: 1; }
        .ch-name   { font-size: 0.88rem; font-weight: 600; }
        .ch-status { font-size: 0.68rem; color: var(--green); display: flex; align-items: center; gap: 5px; }
        .ch-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
        .ch-close  { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.15rem; padding: 4px 6px; }

        .chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 11px; }
        .chat-msgs::-webkit-scrollbar { width: 3px; }
        .chat-msgs::-webkit-scrollbar-thumb { background: var(--blue-deep); }

        .cmsg { max-width: 82%; animation: fade-up 0.3s ease; }
        .cmsg.bot  { align-self: flex-start; }
        .cmsg.user { align-self: flex-end; }
        .bubble { padding: 10px 14px; border-radius: 18px; font-size: 0.83rem; line-height: 1.55; }
        .cmsg.bot  .bubble { background: var(--panel); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
        .cmsg.user .bubble {
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            color: #fff; border-bottom-right-radius: 4px;
        }

        .typing-ind {
            display: flex; gap: 4px; padding: 11px 14px;
            background: var(--panel); border: 1px solid var(--border);
            border-radius: 18px; border-bottom-left-radius: 4px;
            width: fit-content; align-self: flex-start;
        }
        .tdot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: tdot 1.2s ease-in-out infinite; }
        .tdot:nth-child(2) { animation-delay: 0.2s; }
        .tdot:nth-child(3) { animation-delay: 0.4s; }
        @keyframes tdot { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }

        .quick-rs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
        .qr-btn {
            background: none; border: 1px solid rgba(85,183,233,0.40);
            color: var(--blue-light); font-family: var(--font-b); font-size: 0.73rem;
            padding: 5px 12px; border-radius: 50px; cursor: pointer; transition: all 0.2s;
        }
        .qr-btn:hover { background: rgba(85,183,233,0.12); border-color: var(--blue); }

        .chat-input-row { padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; }
        .chat-inp {
            flex: 1; background: var(--panel); border: 1px solid var(--border);
            border-radius: 50px; padding: 9px 16px; color: var(--text);
            font-family: var(--font-b); font-size: 0.83rem; outline: none; transition: border-color 0.2s;
        }
        .chat-inp:focus { border-color: var(--blue); }
        .chat-inp::placeholder { color: var(--muted); }

        .send-btn {
            width: 38px; height: 38px; border-radius: 50%;
            background: linear-gradient(135deg, var(--blue-deep), var(--blue));
            border: none; cursor: pointer; font-size: 0.95rem;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 0 12px rgba(85,183,233,0.35);
            transition: all 0.2s;
        }
        .send-btn:hover { transform: scale(1.12); }

        /* ── FLASH ─────────────────────────────────────────────────────────── */
        #flash { position: fixed; inset: 0; z-index: 999; background: #fff; opacity: 0; pointer-events: none; transition: opacity 0.08s; }
        #flash.on { opacity: 1; }

        /* ── LANDING · LIGHT THEME ─────────────────────────────────────────── */
        #s-landing {
            background: linear-gradient(175deg, #ADDAF9 0%, #FFFFFF 100%);
        }

        /* Logo area sits on the blue — keep it light */
        #s-landing .logo-tagline { color: rgba(255,255,255,0.85); letter-spacing: 0.38em; }

        /* Eyebrow + hero on the transition zone */
        #s-landing .hero-eyebrow { color: rgba(255,255,255,0.80); }
        #s-landing .hero-eyebrow::before,
        #s-landing .hero-eyebrow::after { background: rgba(255,255,255,0.40); }

        #s-landing .hero-title {
            background: none;
            -webkit-text-fill-color: #111111;
            color: #111111;
            filter: drop-shadow(0 2px 24px rgba(85,183,233,0.30));
            font-size: clamp(2.75rem, 18vw, 100px);
        }
        #s-landing .hero-title .hero-accent {
            -webkit-text-fill-color: #4694dd;
            color: #4694dd;
        }
        [data-lang="zh"] #s-landing .hero-title {
            line-height: 0.6;
            letter-spacing: 0.05em;
            /* Desktop / laptop (>1024px) size. The ≤1024px rule below overrides this
               on phone/tablet. Was 50px — too small on laptop. */
            font-size: 140px;
        }
        @media (max-width: 1024px) {
        [data-lang="zh"] #s-landing .hero-title {
        line-height: 0.6;
        letter-spacing: 0.05em;
        font-size: 120px;
        }
        }

        /* Chinese-only subtitle size — independent of English/Thai. Edit font-size to taste. */
        [data-lang="zh"] #s-landing .hero-sub {
            font-size: 1.15rem;
            line-height: 1.2;
            font-weight: 500;
        }

        @media (max-width: 1024px) {
    [data-lang="zh"] #s-landing .hero-sub {
        font-size: 26.8px;   /* was 1.8rem (28.8px) — reduced 2px on mobile */
        line-height: 1.2;
        font-weight: 500;
    }
    }
        #s-landing .hero-sub { color: rgba(55,65,81,0.62); }

        /* Scan button — bigger, bolder, two-arc drama */
        #s-landing .pulse-core {
            width: 350px; height: 350px;
            background: radial-gradient(circle at 38% 32%, rgba(142,196,238,0.28) 0%, rgba(245,251,255,0.97) 65%);
            border-color: rgba(85,183,233,0.60);
            box-shadow:
                0 0 0 8px rgba(85,183,233,0.08),
                0 0 60px rgba(85,183,233,0.35),
                inset 0 0 35px rgba(85,183,233,0.14);
        }
        #s-landing .pulse-btn:hover .pulse-core {
            box-shadow:
                0 0 0 12px rgba(85,183,233,0.10),
                0 0 100px rgba(85,183,233,0.60),
                inset 0 0 50px rgba(85,183,233,0.20);
        }
        #s-landing .pulse-orbit {
            width: 374px; height: 374px;
            background: conic-gradient(from 0deg,
                transparent 0%, transparent 58%,
                rgba(85,183,233,0.85) 76%, rgba(74,134,191,0.65) 88%,
                transparent 100%);
        }
        #s-landing .pulse-orbit-2 {
            width: 374px; height: 374px;
            background: conic-gradient(from 180deg,
                transparent 0%, transparent 65%,
                rgba(201,168,124,0.65) 80%, rgba(224,200,154,0.45) 90%,
                transparent 100%);
        }
        #s-landing .pulse-ring:nth-child(1) { width: 414px; height: 414px; }
        #s-landing .pulse-ring:nth-child(2) { width: 500px; height: 500px; }
        #s-landing .pulse-ring:nth-child(3) { width: 594px; height: 594px; }
        #s-landing .pulse-ring { border-color: rgba(85,183,233,0.22); }
        /* Grid mesh removed so it no longer overlays the face */
        #s-landing .core-grid { display: none; }
        #s-landing .core-oval  { border-color: rgba(85,183,233,0.55); }
        #s-landing .core-crn   { border-color: #55B7E9; opacity: 0.90; }
        #s-landing .core-scan {
            background: linear-gradient(180deg,
                transparent 0%,
                rgba(85,183,233,0.12) 50%,
                rgba(100,200,255,0.65) 88%,
                rgba(200,240,255,0.98) 100%);
            box-shadow: 0 2px 22px rgba(85,183,233,0.70), 0 6px 55px rgba(85,183,233,0.35);
        }
        #s-landing .core-scan::after {
            background: linear-gradient(90deg, transparent, rgba(255,255,255,1), #55B7E9, rgba(255,255,255,1), transparent);
            box-shadow: 0 0 14px rgba(85,183,233,1), 0 0 40px rgba(85,183,233,0.65);
        }
        #s-landing .pulse-icon { width: 110%; height: 150%; left: -10px; margin-top: -4px }

        /* Label */
        #s-landing .pulse-label {
            font-family: var(--font-h); font-size: 2rem; letter-spacing: 0.02em; text-transform: uppercase;
            background: linear-gradient(90deg, #2E9AD4 0%, #111111 50%, #2E9AD4 100%);
            background-size: 200% 100%;
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        [data-lang="zh"] #s-landing .pulse-label {
            letter-spacing: 0.12em;
            /* Chinese-only button size — sized up so 扫描我的肌肤 matches the
               visual height of the uppercase English / Thai label. Edit to taste. */
            font-size: 42px;
        }
        #s-landing .pulse-sub      { color: rgba(55,65,81,0.50); font-size: 0.72rem; }
        #s-landing .scan-cta {
            border: 1.5px solid rgba(85,183,233,0.50);
            border-radius: 50px;
            padding: 12px 32px;
            background: rgba(255,255,255,0.60);
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 18px rgba(85,183,233,0.12);
            margin-top: 80px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 10px;
        }
        /* Chinese-only scan button — padding & top spacing tuned for the larger
           CJK label (35px). Edit these two values to taste. */
        [data-lang="zh"] #s-landing .scan-cta {
            padding: 20px 32px;
            margin-top: 72px;
        }
        #s-landing .scan-next-icon {
            width: 22px;
            height: 22px;
            object-fit: contain;
            flex-shrink: 0;
        }


        #s-landing .tap-indicator  { color: #374151; border-color: rgba(61,139,201,0.40); background: rgba(255,255,255,0.55); }
        #s-landing .detecting-wrap { color: #2E9AD4; }
        #s-landing .detecting-wrap::before { background: #55B7E9; }

        /* Hero feature text on dark landing */
        #s-landing .hero-feat-text { color: rgba(55,65,81,0.62); }

        /* Feature pills */
        #s-landing .feat {
            background: rgba(255,255,255,0.70);
            border-color: rgba(85,183,233,0.30);
            backdrop-filter: blur(14px);
            box-shadow: 0 2px 12px rgba(85,183,233,0.12);
        }
        #s-landing .feat:hover {
            background: rgba(85,183,233,0.12);
            border-color: rgba(85,183,233,0.55);
            box-shadow: 0 4px 18px rgba(85,183,233,0.20);
        }
        #s-landing .feat-label { color: rgba(55,65,81,0.68); font-weight: 600; }

        /* ── RESULTS · REFERENCE LAYOUT ───────────────────────────────────── */
        #s-results { padding: 0; gap: 0; }

        .res-topbar {
            display: flex; justify-content: flex-end; gap: 8px;
            padding: calc(14px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); flex-shrink: 0; position: relative; z-index: 2;
        }
        .res-topbar-btn { position: static !important; }

        .res-scroll {
            flex: 1; overflow-y: auto; overflow-x: hidden;
            display: flex; flex-direction: column; align-items: center;
            padding: 14px max(22px, env(safe-area-inset-right)) calc(52px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); gap: 16px; width: 100%;
        }
        .res-scroll::-webkit-scrollbar { width: 4px; }
        .res-scroll::-webkit-scrollbar-thumb { background: rgba(85,183,233,0.30); border-radius: 2px; }

        /* Brand label at top */
        .res-brand {
            font-family: var(--font-h); font-size: 1.25rem; font-weight: 700;
            letter-spacing: 0.28em; text-align: center; color: #111111; width: 100%;
            padding-bottom: 8px; border-bottom: 1px solid rgba(85,183,233,0.18);
        }

        /* MIMI FOR YOU card */
        .res-mimi-card {
            width: 100%; border: 1px solid rgba(85,183,233,0.22); border-radius: 18px;
            padding: 21px 26px; background: rgba(255,255,255,0.82);
            backdrop-filter: blur(10px); animation: fade-up 0.4s ease both;
            box-shadow: 0 4px 18px rgba(85,183,233,0.12);
        }
        .res-mimi-title {
            font-family: var(--font-h); font-size: 1.28rem; font-weight: 700;
            text-align: center; letter-spacing: 0.10em; color: #111111;
            margin-bottom: 14px; padding-bottom: 12px;
            border-bottom: 1px solid rgba(85,183,233,0.16);
        }
        .res-mimi-body {
            font-size: 1.0rem; line-height: 1.78; color: #2a3e55; text-align: center;
        }
        .res-mimi-body strong { color: var(--blue-deep); }

        /* Info row: Skin Type | Key Concerns | How to Improve */
        .res-info-row {
            width: 100%; display: grid;
            grid-template-columns: 1fr 1fr 1.5fr; gap: 12px;
            animation: fade-up 0.4s ease 0.08s both;
        }
        .res-info-box {
            border: 1px solid rgba(85,183,233,0.22); border-radius: 14px;
            padding: 16px 14px; background: rgba(255,255,255,0.82);
            backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 10px;
            box-shadow: 0 2px 10px rgba(85,183,233,0.09);
        }
        .res-info-label {
            font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
            text-transform: uppercase; color: #9CA3AF;
        }
        .res-info-icons { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
        .res-info-icon-circle {
            width: 40px; height: 40px; border-radius: 50%;
            background: rgba(85,183,233,0.10); border: 1px solid rgba(85,183,233,0.22);
            display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
        }
        .res-info-value {
            font-size: 0.9rem; font-weight: 700; color: #111111;
            line-height: 1.35; text-transform: uppercase; letter-spacing: 0.02em;
        }
        .res-tips-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
        .res-tips-list li { font-size: 0.85rem; color: #4B5563; line-height: 1.5; padding-left: 14px; position: relative; }
        .res-tips-list li::before { content: '•'; position: absolute; left: 0; color: var(--blue); }

        /* Routine section header */
        .routine-section-header {
            display: flex; align-items: center; justify-content: space-between;
            width: 100%; padding: 4px 0;
            animation: fade-up 0.4s ease 0.16s both;
        }
        .routine-section-title {
            font-family: var(--font-h); font-size: 1.65rem; font-weight: 700; color: #111111;
        }
        .routine-section-count {
            font-size: 1.08rem; font-weight: 700; letter-spacing: 0.14em;
            text-transform: uppercase; color: var(--blue-deep);
            background: rgba(85,183,233,0.10); border: 1px solid rgba(85,183,233,0.25);
            border-radius: 50px; padding: 5px 14px;
        }

        /* Horizontal routine cards */
        .routine-list { display: flex; flex-direction: column; gap: 16px; width: 100%; }
        .routine-step {
            background: rgba(255,255,255,0.86); border: 1px solid rgba(85,183,233,0.18);
            border-radius: 18px; padding: 16px 18px;
            display: flex; align-items: center; gap: 18px;
            animation: fade-up 0.5s ease both;
            box-shadow: 0 2px 14px rgba(85,183,233,0.10);
        }
        .step-card-img-wrap {
            flex: 0 0 138px; align-self: stretch; min-height: 126px;
            background: #fff; border-radius: 12px; padding: 12px;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 1px 6px rgba(85,183,233,0.12);
        }
        .step-card-img { max-width: 100%; max-height: 160px; object-fit: contain; display: block; }
        .step-name-col {
            flex: 1.2; min-width: 0; display: flex; flex-direction: column; gap: 10px;
            align-self: stretch; justify-content: center;
            padding-right: 18px; border-right: 1px solid rgba(85,183,233,0.18);
        }
        .step-card-name { font-size: 1.15rem; font-weight: 700; color: #1A1A1A; line-height: 1.3; }
        .step-card-tags { display: flex; flex-wrap: wrap; gap: 7px; }
        .step-card-tag {
            background: rgba(85,183,233,0.08); border: 1px solid rgba(85,183,233,0.30);
            color: #2a6aaa; border-radius: 20px; padding: 4px 12px;
            font-size: 0.82rem; font-weight: 500;
            display: inline-flex; align-items: center; gap: 4px;
        }
        .step-benefits-col {
            flex: 1.4; min-width: 0; display: flex; flex-direction: column; gap: 7px;
            align-self: stretch; justify-content: center; padding: 0 16px;
        }
        .step-benefits-label {
            font-size: 0.70rem; font-weight: 700; letter-spacing: 0.18em;
            text-transform: uppercase; color: #6a7a8a;
        }
        .step-benefits-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
        .step-benefit-item {
            font-size: 0.92rem; color: #4B5563; line-height: 1.45;
            display: flex; align-items: flex-start; gap: 8px;
        }
        .step-benefit-item::before { content: '•'; color: var(--blue); line-height: 1.45; flex-shrink: 0; }
        .step-ampm-col {
            flex: 0 0 auto; padding-left: 10px;
            display: flex; flex-direction: column; gap: 7px; align-items: center;
        }
        .ampm-circle {
            width: 64px; height: 64px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; font-size: 1.95rem;
        }
        .ampm-circle.am { background: rgba(255,210,60,0.22); }
        .ampm-circle.pm { background: rgba(155,130,212,0.20); }

        /* Routine step layout */
        .step-front {
            display: flex; align-items: center; gap: 16px; width: 100%;
        }

        @media (max-width: 640px) {
            .step-card-img-wrap { flex: 0 0 92px; min-height: 92px; }
            .step-card-img { max-height: 104px; }
            .ampm-circle { width: 46px; height: 46px; font-size: 1.5rem; }
            .step-benefits-col { display: none; }
            .step-card-name { font-size: 0.98rem; }
        }

        /* Product grid — 3 columns */
        .product-grid {
            width: 100%; display: grid; grid-template-columns: repeat(3, 1fr);
            column-gap: 18px; row-gap: 0px; animation: fade-up 0.4s ease both;
        }

        /* Flip card shell */
        .product-card { height: 200px; border-radius: 18px; perspective: 1000px; }
        .product-card-inner {
            position: relative; width: 100%; height: 100%;
            transform-style: preserve-3d;
            transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
        }
        .product-card.flipped .product-card-inner { transform: rotateY(180deg); }

        /* Shared face */
        .product-card-front,
        .product-card-back {
            position: absolute; inset: 0;
            backface-visibility: hidden; -webkit-backface-visibility: hidden;
            border-radius: 18px; overflow: hidden;
            border: 1px solid rgba(0,0,0,0.08);
            background: #fff;
            box-shadow: 0 4px 18px rgba(0,0,0,0.08);
            display: flex; flex-direction: column;
        }

        /* Front — white card, contained image, name + desc + actions below */
        .product-card-img-wrap {
            flex: 1; background: #fff; padding: 14px;
            display: flex; align-items: center; justify-content: center;
            min-height: 0; max-height: 172px; overflow: hidden;
        }
        .product-card-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
        .product-card-bottom {
            flex-shrink: 0; padding: 12px 16px 14px;
            border-top: 1px solid rgba(0,0,0,0.06);
            display: flex; flex-direction: column; gap: 7px;
        }
        .product-card-name { font-size: 0.98rem; font-weight: 700; color: #1A1A1A; line-height: 1.3; }
        .product-card-desc-front { font-size: 0.84rem; color: #6a7a8a; line-height: 1.4; }
        .product-card-footer {
            display: flex; align-items: center; justify-content: space-between; gap: 6px;
            padding-top: 4px;
        }
        .flip-btn {
            width: 34px; height: 34px; flex-shrink: 0;
            background: #f5f7fa; border: 1px solid rgba(0,0,0,0.10);
            border-radius: 8px; cursor: pointer; padding: 6px;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.18s;
        }
        .flip-btn:hover { background: rgba(85,183,233,0.14); }
        .flip-btn img   { width: 20px; height: 20px; object-fit: contain; opacity: 0.65; }
        .product-view-link {
            font-size: 0.8rem; color: #3a86bf; text-decoration: underline;
            background: none; border: none; padding: 0;
            font-family: var(--font-b); cursor: pointer; line-height: 1.3;
        }
        .product-view-link:hover { color: #1a5a9a; }

        /* Back face */
        .product-card-back {
            transform: rotateY(180deg);
            padding: 18px 16px 12px; gap: 9px;
        }
        .product-card-back-name {
            font-size: 0.92rem; font-weight: 700; color: #1A1A1A; flex-shrink: 0;
            padding-bottom: 9px; border-bottom: 1px solid rgba(0,0,0,0.08);
        }
        .product-card-back-desc {
            font-size: 0.82rem; color: #4B5563; line-height: 1.60;
            overflow-y: auto; flex: 1;
        }
        .product-card-back-footer {
            flex-shrink: 0; display: flex;
            padding-top: 6px; border-top: 1px solid rgba(0,0,0,0.06);
        }

        /* Brand logo on results page */
        .res-brand { width: 100%; text-align: center; padding-bottom: 10px; border-bottom: 1px solid rgba(85,183,233,0.18); }
        /* Same size as the landing logo; darkened so the white logo shows on the light results page */
        .res-brand-logo { height: 72px; object-fit: contain; filter: brightness(0) opacity(0.82); }

        /* ── RESULTS · LIGHT THEME ─────────────────────────────────────────── */
        #s-results {
            background: linear-gradient(175deg, #ADDAF9 0%, #FFFFFF 100%);
        }

        /* Header */
        #s-results .btn-back {
            background: rgba(255,255,255,0.70); border-color: rgba(85,183,233,0.28);
            color: #374151; backdrop-filter: blur(10px);
        }
        #s-results .btn-back:hover { border-color: var(--blue); color: #111111; }
        #s-results .res-title {
            background: linear-gradient(135deg, #111111 0%, var(--blue-deep) 55%, var(--blue) 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        #s-results .res-title em { background: none; -webkit-text-fill-color: var(--blue-deep); }
        #s-results::-webkit-scrollbar-thumb { background: var(--blue); }
        #s-results .btn-ghost {
            background: rgba(255,255,255,0.80); border-color: rgba(85,183,233,0.30); color: #374151;
        }
        #s-results .btn-ghost:hover { border-color: var(--blue); color: #111111; }

        /* MiMi intro card */
        #s-results .mimi-intro-card {
            background: rgba(255,255,255,0.75); border-color: rgba(85,183,233,0.22);
            border-left-color: var(--blue); backdrop-filter: blur(12px);
            box-shadow: 0 4px 20px rgba(85,183,233,0.14);
        }
        #s-results .mimi-intro-label { color: var(--blue-deep); }
        #s-results .mimi-intro-body  { color: #374151; }
        #s-results .mimi-intro-body strong { color: var(--blue-deep); }

        /* Routine section header */
        #s-results .routine-section-title { color: #111111; }
        #s-results .routine-section-count {
            color: var(--blue-deep); background: rgba(85,183,233,0.10); border-color: rgba(85,183,233,0.25);
        }
        #s-results .routine-section-line {
            background: linear-gradient(90deg, rgba(85,183,233,0.25), transparent);
        }

        /* Product cards */
        #s-results .routine-step {
            background: rgba(255,255,255,0.82); border-color: rgba(85,183,233,0.20);
            backdrop-filter: blur(12px);
            box-shadow: 0 4px 20px rgba(85,183,233,0.12);
        }
        #s-results .step-card-img-wrap {
            background: #ffffff;
            box-shadow: 0 2px 8px rgba(85,183,233,0.10);
        }
        #s-results .step-name-col  { border-right-color: rgba(85,183,233,0.20); }
        #s-results .step-card-name { color: #374151; }
        #s-results .step-card-tag  {
            background: rgba(85,183,233,0.10); border-color: rgba(85,183,233,0.25);
            color: var(--blue-deep);
        }
        #s-results .step-benefits-label { color: #9CA3AF; }
        #s-results .step-benefit-item   { color: #4B5563; }
        #s-results .step-benefit-item::before { color: var(--blue); }

        /* CTA card */
        #s-results .res-cta-card {
            background:#EEFAFC ; border: 1px solid #66CBFE; border-radius: 16px; margin-top: 20px;
        }
        #s-results .res-cta-label { color: var(--blue-deep); }
        #s-results .res-cta-secondary .btn-ghost {
            background: rgba(255,255,255,0.80); border-color: rgba(85,183,233,0.30); color: #374151;
        }
        #s-results .res-cta-secondary .btn-ghost:hover { border-color: var(--blue); color: #111111; }

        /* ── SCAN · LIGHT THEME ────────────────────────────────────────────── */
        #s-scan {
            background: linear-gradient(135deg, #ffffff 0%, #addaf9 100%);
        }
        /* Back button */
        #s-scan .btn-back {
            background: rgba(255,255,255,0.70); border-color: rgba(85,183,233,0.28);
            color: #374151; backdrop-filter: blur(10px);
        }
        #s-scan .btn-back:hover { border-color: var(--blue); color: #111111; }
        /* Heading */
        #s-scan .scan-heading { color: #111111; }
        /* #s-scan .scan-heading em { color: var(--blue-deep); -webkit-text-fill-color: var(--blue-deep); } */
        /* Steps */
        #s-scan .step {
            background: rgba(255,255,255,0.78); border-color: rgba(85,183,233,0.22);
            box-shadow: 0 2px 12px rgba(85,183,233,0.10);
        }
        #s-scan .step p { color: #4B5563; }
        /* Camera controls */
        #s-scan .cam-hint { color: rgba(55,65,81,0.55); }
        #s-scan .btn-gallery { border-color: rgba(85,183,233,0.30); color: #374151; }
        #s-scan .btn-gallery:hover { border-color: var(--blue); color: #111111; }
        /* Privacy notice */
        #s-scan .privacy-notice {
            background: rgba(255,255,255,0.80); border-color: rgba(85,183,233,0.22);
            box-shadow: 0 4px 20px rgba(85,183,233,0.12); backdrop-filter: blur(12px);
        }
        #s-scan .privacy-title { color: var(--blue-deep); }
        #s-scan .privacy-scroll p { color: #4B5563; }

        [data-lang="zh"] #s-scan .privacy-scroll p
        {
            font-size: 20px;
            line-height: 1.6;
        }



        #s-scan .privacy-check-label { border-top-color: rgba(85,183,233,0.22); justify-content: center; }
        #s-scan .privacy-check-text { color: #374151; }
        /* Consent popup overlay — covers the scan page until the user agrees */
        #s-scan .consent-overlay {
            position: absolute; inset: 0; z-index: 40;
            display: flex; align-items: center; justify-content: center;
            padding: 24px;
            background: rgba(55,65,81,0.42); backdrop-filter: blur(5px);
            transition: opacity 0.35s ease;
        }
        #s-scan .consent-overlay.hidden { opacity: 0; pointer-events: none; }
        #s-scan .consent-overlay .consent-block {
            width: 100%; max-width: 420px; padding: 22px 22px;
            background: #ffffff; max-height: 82vh; overflow: hidden;
            box-shadow: 0 24px 64px rgba(55,65,81,0.30);
            animation: consent-pop 0.35s ease;
        }
        @keyframes consent-pop {
            from { transform: translateY(18px) scale(0.96); opacity: 0; }
            to   { transform: translateY(0) scale(1); opacity: 1; }
        }
        #s-scan .privacy-title { text-align: center; font-size: 20px; text-transform: none; letter-spacing: 0.02em; }
        [data-lang="zh"] #s-scan .privacy-title {
        font-size: 30px
        }
        #s-scan .privacy-scroll { max-height: 180px; text-align: center; }

        /* ── RESPONSIVE ────────────────────────────────────────────────────── */
        /* Retake button overlaid on photo — mobile only */
        .res-photo-retake {
            display: none;
            position: absolute; top: 12px; left: 12px; z-index: 5;
            background: rgba(5,9,26,0.70); backdrop-filter: blur(10px);
            border: 1px solid rgba(85,183,233,0.40);
            color: var(--text); font-family: var(--font-b);
            font-size: 0.78rem; font-weight: 600;
            padding: 7px 14px; border-radius: 50px; cursor: pointer;
            transition: all 0.2s;
        }
        .res-photo-retake:hover { border-color: var(--blue); }

        /* ── iPad landscape / small laptop (≤ 1024px) ── */
        @media (max-width: 1024px) {
            #s-scan { gap: 36px; }
            .scan-info { max-width: 320px; }
            .scan-heading { font-size: 50px; line-height: 1; letter-spacing: 2px; }
            :root[data-lang="zh"] .scan-heading { letter-spacing: 4px; font-size: 70px; }
            .chat-panel { width: 340px; }
        }

        /* ── Tablet portrait / phablet (≤ 860px) ── */
        @media (max-width: 860px) {
            .screen { padding: 24px 20px; }
            #s-scan { flex-direction: column; padding: 20px; gap: 14px; overflow-y: auto; }
            .cam-frame { width: min(440px, 94vw); height: min(560px, 62vh); height: min(560px, 62dvh); }
            .scan-info { max-width: 460px; gap: 12px; margin-top: 56px; }
            .res-photo  { height: 170px; }
            /* #s-results  { padding: 16px 18px; } */
            #s-results .btn-back { display: none; }
            .res-photo-retake   { display: block; }
            .step-card-img-wrap { flex: 0 0 110px; padding: 8px; min-height: 110px; }
            .step-card-img      { max-height: 150px; }
            .step-name-col      { padding-right: 14px; }
            .step-benefits-col  { padding: 0 10px; }
            .ampm-circle        { width: 56px; height: 56px; font-size: 1.5rem; }
            .routine-step       { padding: 12px; border-radius: 18px; }
            .step-header        { font-size: 1rem; margin-bottom: 16px; }
            .chat-panel { width: calc(100vw - 40px); right: 20px; }
        }

        /* ── Standard phones (≤ 640px) — most Android & large iPhones ── */
        @media (max-width: 640px) {
            .screen { padding: 20px 16px; }
            #s-landing { gap: 14px; }
            .logo-img { height: 120px; }
            .hero-sub { max-width: 100%; font-size: 0.9rem; }
            .scan-heading { font-size: 40px; }

            /* Slightly smaller scan button */
            #s-landing .pulse-core   { width: 232px; height: 232px; }
            #s-landing .pulse-orbit  { width: 250px; height: 250px; }
            #s-landing .pulse-orbit-2{ width: 250px; height: 250px; }
            #s-landing .pulse-ring:nth-child(1) { width: 274px; height: 274px; }
            #s-landing .pulse-ring:nth-child(2) { width: 332px; height: 332px; }
            #s-landing .pulse-ring:nth-child(3) { width: 396px; height: 396px; }
            .pulse-btn { padding: 38px; }

            /* Camera — full available width */
            .cam-frame { width: min(340px, 88vw); height: min(450px, 52vh); height: min(450px, 52dvh); }

            /* Product card stacks on phones */
            .routine-step { padding: 14px; }
            .step-front { flex-direction: column; align-items: stretch; gap: 12px; }
            .step-card-img-wrap { flex: none; width: 100%; min-height: 120px; max-height: 180px; border-radius: 12px; }
            .step-card-img { max-height: 160px; margin: 0 auto; display: block; }
            .step-name-col { padding-right: 0; border-right: none; border-bottom: 1px solid rgba(85,183,233,0.20); padding-bottom: 12px; }
            .step-benefits-col { padding: 0; }
            .step-ampm-col { justify-content: flex-start; padding-left: 0; }
            .ampm-circle { width: 52px; height: 52px; font-size: 1.4rem; }
            .step-card-name { font-size: 0.94rem; }
            .res-actions { flex-direction: column; gap: 8px; }
            /* CTA action buttons stack full-width so long labels stay on one line
               instead of collapsing each button into a tall oval */
            .res-cta-actions { flex-direction: column; }
            .res-cta-actions .btn-primary, .res-cta-actions .btn-ghost { flex: none; width: 100%; }
            .btn-primary, .btn-ghost { width: 100%; text-align: center; }

            /* CTA body: stack text + QR vertically so the headline isn't crushed
               into a narrow column and the QR/mascot don't overflow the card edge
               (this layout is what the shared/downloaded PNG captures too) */
            .res-cta-body { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
            .res-cta-text { width: 100%; }
            .mimi-qr { max-width: 100%; }
            .mimi-qr-wrap { flex-wrap: wrap; justify-content: center; }

            /* Chat panel full-width slide-up */
            .chat-panel {
                width: 100vw; right: 0; bottom: 0;
                border-radius: 26px 26px 0 0;
                border-bottom-left-radius: 0; border-bottom-right-radius: 0;
                height: 70vh; height: 70dvh;
            }
            .chat-fab { bottom: calc(20px + env(safe-area-inset-bottom)); right: calc(16px + env(safe-area-inset-right)); width: 52px; height: 52px; }
        }

        /* ── Compact phones (≤ 430px) — iPhone 13/14, most mid-size Android ── */
        @media (max-width: 430px) {
            #s-landing { gap: 12px; }

            #s-landing .pulse-core   { width: 204px; height: 204px; }
            #s-landing .pulse-orbit  { width: 220px; height: 220px; }
            #s-landing .pulse-orbit-2{ width: 220px; height: 220px; }
            #s-landing .pulse-ring:nth-child(1) { width: 240px; height: 240px; }
            #s-landing .pulse-ring:nth-child(2) { width: 296px; height: 296px; }
            #s-landing .pulse-ring:nth-child(3) { width: 352px; height: 352px; }
            .pulse-btn { padding: 32px; }

            .feature-strip { gap: 6px; }
            .feat { padding: 6px 11px; }
            .feat-label { font-size: 0.67rem; }

            .cam-frame { height: min(420px, 50vh); height: min(420px, 50dvh); }
            .step-card-img { max-height: 180px; }

            .chat-panel { height: 75vh; height: 75dvh; }
            .res-header { flex-direction: column; align-items: flex-start; gap: 10px; }
            .res-header-btns { width: 100%; justify-content: flex-end; }
        }

        /* ── Small phones (≤ 375px) — iPhone SE / Mini, small Android ── */
        @media (max-width: 375px) {
            .screen { padding: 16px 14px; }
            #s-landing { gap: 10px; }

            .logo-img { height: 52px; }
            .logo-tagline { font-size: 0.6rem; letter-spacing: 0.28em; }
            .hero-eyebrow { font-size: 0.58rem; }
            .hero-sub { font-size: 0.84rem; }

            #s-landing .pulse-core   { width: 184px; height: 184px; }
            #s-landing .pulse-orbit  { width: 199px; height: 199px; }
            #s-landing .pulse-orbit-2{ width: 199px; height: 199px; }
            #s-landing .pulse-ring:nth-child(1) { width: 217px; height: 217px; }
            #s-landing .pulse-ring:nth-child(2) { width: 266px; height: 266px; }
            #s-landing .pulse-ring:nth-child(3) { width: 318px; height: 318px; }
            .pulse-btn { padding: 26px; }

            /* Feature strip → 2-column grid on tiny screens */
            .feature-strip { display: grid; grid-template-columns: 1fr 1fr; max-width: 280px; margin: 0 auto; gap: 6px; }
            .feat { justify-content: center; }

            .cam-frame { height: min(370px, 50vh); height: min(370px, 50dvh); }
            .step-card-img { max-height: 160px; }

            .chat-panel { height: 80vh; height: 80dvh; }
            .res-header-btns .btn-ghost { font-size: 0.78rem; padding: 9px 16px; }
        }

        /* ── LANGUAGE TOGGLE ──────────────────────────────────────────── */
        .lang-toggle {
            position: absolute; top: calc(18px + env(safe-area-inset-top)); right: calc(18px + env(safe-area-inset-right)); z-index: 30;
            display: flex; align-items: center; gap: 5px;
            /* Fixed font (not var(--font-b)) so EN/CN/TH stay the same size in every language */
            font-family: 'Kittitada', sans-serif; font-size: 1rem; font-weight: 700;
            letter-spacing: 0.07em;
            border: 1.5px solid rgba(85,183,233,0.35);
            border-radius: 20px;
            padding: 6px 16px;
            background: #ffffff;
        }
        .lang-opt {
            color: rgba(70,148,221,0.55); cursor: pointer;
            transition: color 0.18s;
            display: inline-block; padding: 12px 6px; margin: -12px -6px;
        }
        .lang-opt.active { color: #4694dd; }
        .lang-opt:hover  { color: #4694dd; }
        .lang-sep        { color: rgba(85,183,233,0.35); font-weight: 300; }

        /* ── Phone landscape (height ≤ 500px) ── */
        @media (max-height: 500px) and (orientation: landscape) {
            #s-landing {
                flex-direction: row; flex-wrap: wrap;
                gap: 8px; padding: 10px calc(20px + env(safe-area-inset-right)) 10px calc(20px + env(safe-area-inset-left));
                align-items: center; justify-content: center;
            }
            #s-landing .logo-wrap  { display: none; }
            #s-landing .hero-eyebrow { display: none; }
            #s-landing .hero-sub   { display: none; }
            .feature-strip         { display: none; }
            .detecting-wrap        { display: none; }

            .pulse-btn { padding: 18px; }
            #s-landing .pulse-core   { width: 136px; height: 136px; }
            #s-landing .pulse-orbit  { width: 148px; height: 148px; }
            #s-landing .pulse-orbit-2{ width: 148px; height: 148px; }
            #s-landing .pulse-ring:nth-child(1) { width: 162px; height: 162px; }
            #s-landing .pulse-ring:nth-child(2) { width: 198px; height: 198px; }
            #s-landing .pulse-ring:nth-child(3) { width: 238px; height: 238px; }

            #s-scan { flex-direction: row; gap: 16px; padding: 10px calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left)); align-items: flex-start; }
            .cam-side { width: auto; max-width: 260px; }
            .cam-frame { width: min(240px, 50vw); height: calc(100vh - 40px); height: calc(100dvh - 40px); }
            .scan-info { display: flex; max-width: 200px; gap: 6px; margin-top: 66px; }
            .scan-info .steps { gap: 6px; }
            .scan-info .step  { padding: 8px 10px; }
            .scan-heading      { font-size: 22px; line-height: 1.15; }
            .scan-disclaimer   { display: none; }

            .chat-panel {
                width: 320px; height: calc(100vh - 20px); height: calc(100dvh - 20px);
                bottom: calc(10px + env(safe-area-inset-bottom)); right: calc(10px + env(safe-area-inset-right)); border-radius: 20px;
            }
        }

        /* ── Tablet portrait (iPad) — comfortably sized scan column ── */
        @media (min-width: 700px) and (max-width: 1024px) and (orientation: portrait) {
            #s-scan {
                flex-direction: column; justify-content: center;
                gap: 22px; padding: 48px 40px; overflow-y: auto;
            }
            .cam-side { width: 100%; max-width: 620px; }
            .cam-frame { width: min(580px, 90vw); height: min(680px, 56vh); height: min(680px, 56dvh); }
            .scan-info { max-width: 620px; width: 100%; margin: 28px auto 0; gap: 16px; }
        }

        /* ══════════ RESULTS · FIGMA REDESIGN ══════════ */
        .res-header-bar {
            flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 10px; padding: calc(25px + env(safe-area-inset-top)) 35px 25px;
            background: transparent; min-height:125px;
        }
        .res-logo { width: 120px; height: 120px; object-fit: contain; }
        .btn-pdf {
            padding: 10px 25px; border-radius: 50px; border: 1.5px solid rgba(85,183,233,0.5);
            background: #fff; color: #2E9AD4; font-family: var(--font-b);
            font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(85,183,233,0.15);
        }
        .btn-pdf:hover { background: #2E9AD4; color: #fff; }
        .btn-pdf:disabled { opacity: 0.55; cursor: wait; }
        .res-header-title {
            font-family: var(--font-h); font-size: 1rem; letter-spacing: 0.22em;
            text-transform: uppercase; color: #9CA3AF; white-space: nowrap;
        }
        .res-lang { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; font-family: 'Kittitada', sans-serif; }
        .res-lang .lang-opt { color: rgba(103,162,215,0.45); cursor: pointer; transition: color 0.18s; }
        .res-lang .lang-opt.active, .res-lang .lang-opt:hover { color: #67A2D7; }
        .res-lang .lang-sep { color: rgba(103,162,215,0.3); font-weight: 300; }

        .res-content { width: 100%; max-width: 1150px; margin: 0 auto; display: flex; flex-direction: column; }

        /* AI Skin Analysis card — white background */
        .res-section-card {
            background: #ffffff; border-radius: 25px; overflow: hidden;
            box-shadow: 0 6px 26px rgba(85,183,233,0.14);
            animation: fade-up 0.4s ease both;
        }

        /* Routine cards (morning/night) — light blue background so product boxes stand out */
        /*.res-routine-card {
            background: linear-gradient(175deg, #d4edfc 0%, #eef7ff 100%);
            border-radius: 20px; overflow: hidden;
            box-shadow: 0 6px 26px rgba(85,183,233,0.14);
            animation: fade-up 0.4s ease both;
        }
        .res-routine-card > .routine-pill { margin: 24px 24px 16px; }
        .res-routine-card > .pcard-grid { padding: 0 24px 24px; }

        /* Hero card: photo + info */
        .res-hero {
            display: flex; flex-direction: column; background: #ffffff; border-radius: 25px;
            overflow: hidden; box-shadow: 0 6px 26px rgba(85,183,233,0.14);
            animation: fade-up 0.4s ease both;
        }
        .res-hero-top { display: flex; gap: 33px; padding: 5px 33px 33px; }
        .res-hero-photo img { width: 200px; height: 275px; object-fit: cover; border-radius: 20px; display: block; }
        .res-hero-info { flex: 1; min-width: 0; }
        .res-hero-label { font-size: 25px; font-weight: 700; letter-spacing: 1px; color: #9CA3AF; }
        .res-hero-body { color: #4B5563; font-size: 1.63rem; margin: 10px 0 5px; }
        .res-hero-body strong { color: #2E9AD4; }
        .res-hero-sublabel { font-size: 25px; font-weight: 700; letter-spacing: 1px; color: #9CA3AF; margin: 20px 0 10px; }
        .skin-pill {
            display: inline-flex; align-items: center; gap: 10px; padding: 10px 23px;
            border-radius: 9999px; color: #fff; font-weight: 600; font-size: 1.63rem;
            background: linear-gradient(135deg, #55B7E9, #2E9AD4);
            box-shadow: 0 4px 14px rgba(85,183,233,0.35);
        }
        .area-chips { display: flex; flex-wrap: wrap; gap: 13px; }
        .area-chip {
            padding: 11px 20px; border-radius: 13px; background: #fff;
            border: 1px solid rgba(85,183,233,0.3); color: #374151; font-size: 1.03rem;
            box-shadow: 0 1px 5px rgba(85,183,233,0.1);
        }

        /* AI Skin Analysis radar (power graph) — standalone card */
        .res-radar-section { border-top: none; }
        .res-radar-banner {
            display: flex; align-items: center; width: 100%; box-sizing: border-box;
            background: linear-gradient(90deg, #55B7E9 0%, #55B7E9 40%, #addaf9 80%, #ffffff 100%);
            border-radius: 9999px; color: #fff; font-weight: 700; font-size: 28px;
            letter-spacing: 1px; text-transform: uppercase;
            padding: 14px 38px 14px 28px; margin: 0 0 20px;
            box-shadow: 0 4px 16px rgba(173,218,249,0.45);
            text-shadow: 0 1px 4px rgba(70,140,200,0.45);
        }
        .res-radar-banner-icon { width: 33px; height: 33px; object-fit: contain; flex-shrink: 0; margin-right: 13px; }
        .res-radar-hint {
            font-size: 20px; color: #a6adbc; padding: 13px 38px 0;
            line-height: 1.2; margin-top: -30px; margin-bottom: 20px; text-align: center;
        }
        .res-radar-section-inner { padding: 30px 30px 0; }
        .res-radar-body { display: flex; flex-direction: column; padding: 13px 30px 0; }
        .res-radar-chart { width: 100%; }
        .res-radar-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
        .res-radar-concerns { display: flex; flex-direction: column; gap: 13px; padding-top: 20px; }
        .res-radar-concerns-label { font-size: 25px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #9CA3AF; margin-bottom: 5px; }
        .res-radar-chips-row { display: flex; flex-wrap: wrap; gap: 13px; }
        .res-radar-chip { background: #fff; border: 1px solid rgba(85,183,233,0.30); border-radius: 13px; padding: 8px 18px; font-size: 1.5rem; color: #374151; box-shadow: 0 1px 4px rgba(85,183,233,0.08); }
        .res-radar-label {
            font-family: var(--font-h); font-size: 20px; font-weight: 600;
            fill: #5B6675; letter-spacing: 0.03em; text-transform: uppercase;
        }

        /* Routine section pill */
        .routine-pill {
            display: flex; align-items: center; gap: 13px;
            padding: 14px 63px 14px 28px;
            border-radius: 9999px; color: #fff; font-weight: 700; font-size: 28px;
            text-transform: uppercase; letter-spacing: 1px;
            background: linear-gradient(90deg, #55B7E9 0%, #55B7E9 40%, #addaf9 80%, #ffffff 100%);
            box-shadow: 0 4px 16px rgba(173,218,249,0.45);
            text-shadow: 0 1px 4px rgba(70,140,200,0.45);
            box-sizing: border-box; margin: 30px 30px 20px;
            margin: 25px 3px 20px;
        }
        .routine-pill .routine-icon { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
        .routine-pill-text {
            flex: 1; min-width: 0;
            color: #fff;
        }
        /* Chinese: routine-pill label sized up independently, at every viewport.
           1.15em = 15% larger than the pill (stays proportional on mobile). Edit to taste. */
        [data-lang="zh"] .routine-pill-text { font-size: 38px; }

        /* Vertical product cards (flippable: front = image/name/desc, back = key benefits) */
        /*.pcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 18px; row-gap: 6px; } */
        .pcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 23px; row-gap: 25px; align-content: start; }

        /*.pcard { height: 370px; perspective: 1200px; animation: fade-up 0.4s ease both; } */
        .pcard { height: 375px; perspective: 1200px; animation: fade-up 0.4s ease both; }
        .pcard-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
        .pcard.flipped .pcard-inner { transform: rotateY(180deg); }
        .pcard-front, .pcard-back {
            position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
            background: #fff; border-radius: 20px; box-shadow: 0 4px 18px rgba(85,183,233,0.12);
            padding: 23px; display: flex; flex-direction: column; cursor: pointer; overflow: hidden;
        }
        .pcard-back { transform: rotateY(180deg); }
        .pcard-img-wrap { height: 188px; display: flex; align-items: center; justify-content: center; margin-bottom: 13px; }
        .pcard-img { max-height: 238px; object-fit: contain; margin-top: -25px; }
        .pcard-name { font-weight: 700; color: #111111; font-size: 28px; line-height: 1.1; }
        .pcard-desc {
            color: #4B5563; font-size: 20px; line-height: 1.1; margin-top: 6px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 4;
        }
        .pcard-flip {
            position: absolute; bottom: 15px;right: 15px; width: 38px; height: 31px; border-radius: 50%;
            background: rgba(85,183,233,0.10); border: 1px solid rgba(85,183,233,0.25);
            cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s;
        }
        .pcard-flip:hover { background: rgba(85,183,233,0.20); }
        .pcard-flip img { width: 20px; height: 20px; object-fit: contain; opacity: 0.65; }
        .pcard-back-label { font-size: 1.31rem; font-weight: 700; letter-spacing: 0.08em; color: #2E9AD4; text-transform: uppercase; margin: 10px 0 8px; }
        .pcard-back-list { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
        .pcard-back-list li { font-size: 1.44rem; color: #4B5563; padding-left: 18px; position: relative; margin-bottom: 6px; }
        .pcard-back-list li::before { content: '•'; position: absolute; left: 0; color: #55B7E9; }

        @media (max-width: 760px) {
            .res-header-bar { padding: 5px 12px; gap: 5px; }
            .res-header-title { font-size: 0.9rem; letter-spacing: 0.12em; white-space: normal; text-align: center; }
            .res-hero-top { flex-direction: column; align-items: center; text-align: center; padding: 25px; }
            .res-hero-photo img { width: 250px; height: 300px; }
            .area-chips { justify-content: center; }
            /* Products 2-up on phones (matches the downloaded image). Cards get a
               tighter layout so titles clamp to 2 lines and text stays legible. */
            .pcard-grid { grid-template-columns: repeat(2, 1fr); column-gap: 15px; row-gap: 18px; }
            .pcard { height: 348px; }
            .pcard-front, .pcard-back { padding: 18px; border-radius: 18px; }
            .pcard-img-wrap { height: 148px; margin-bottom: 10px; }
            .pcard-img { max-height: 188px; margin-top: 0; }
            .pcard-name {
                /* Show the full product name (no 2-line clamp). At 18px the
                   longest catalog names wrap to ≤3 lines, leaving room for the
                   full 3-line description below inside the fixed-height card. */
                font-size: 18px; line-height: 1.25;
            }


            [data-lang="zh"] #s-results .pcard-name {font-size: 24px; line-height: 20px;}
            [data-lang="zh"] #s-results .pcard-desc {font-size: 19.5px; line-height: 20px;}
            [data-lang="zh"] #s-scan .privacy-scroll p {font-size: 20px; line-height:1;}
            [data-lang="zh"] .scan-heading {letter-spacing: 4px; font-size: 70px; font-weight: 500; }
            [data-lang="zh"] .scan-disclaimer { margin: 14px auto 0; max-width: 460px; font-size: 20px; line-height: 1.2; color: #8A93A3;}
            [data-lang="zh"].btn-take-photo-hint { font-size: 24px; font-weight: bolder; color: #6B7280; letter-spacing: 0.05em;text-align: center}






            .pcard-desc { font-size: 15px; line-height: 1.35; margin-top: 8px; -webkit-line-clamp: 3; }
            .pcard-flip { width: 33px; height: 28px; bottom: 13px; right: 13px; }
            .pcard-back-label { font-size: 1.13rem; }
            .pcard-back-list li { font-size: 1.13rem; }
            .routine-pill {
                padding: 10px 25px; font-size: 19px; gap: 8px;
                white-space: nowrap;
            }
            .routine-pill .routine-icon { width: 22px; height: 22px; }
            .res-radar-banner { padding: 10px 25px; font-size: 19px; }
            .res-radar-banner-icon { width: 23px; height: 23px; margin-right: 8px; }
            /* Bigger mobile radar chart (see buildRadar's isMobile R) needs more
               clearance before the hint text than the desktop -24px pull-up allows. */
            .res-radar-hint { margin-top: 8px; }
            /* Scan pills: trim 2px of height (12px → 11px vertical padding). */
            .scan-bubble { padding: 11px 18px; }

        
            #s-results .res-hero-label,
            #s-results .res-hero-sublabel,
            #s-results .res-radar-concerns-label { font-size: 22.5px; }
            #s-results .res-hero-body,
            #s-results .skin-pill,
            #s-results .res-radar-chip,
            #s-results .res-radar-hint { font-size: 22.5px; }
            #s-results .res-radar-banner { font-size: 21.3px; }
            #s-results .res-radar-label { font-size: 25px; }
            #s-results .routine-pill { font-size: 21.3px; }
            #s-results .pcard-name { font-size: 18px; }
            #s-results .pcard-desc { font-size: 17.5px; }
            #s-results .pcard-back-label,
            #s-results .pcard-back-list li { font-size: 20.5px; }
            #s-results .step-card-name { font-size: 17px; }
            #s-results .step-card-tag { font-size: 15px; }
            #s-results .step-benefits-label { font-size: 13.2px; }
            #s-results .step-benefit-item { font-size: 16.7px; }
            #s-results .ampm-circle { font-size: 24.4px; }
            #s-results .card-label { font-size: 12.6px; }
            #s-results .res-cta-headline { font-size: 30px; }
            #s-results .res-cta-desc { font-size: 22.5px; }
            #s-results .res-email-input { font-size: 20.5px; }
            #s-results .res-email-send { font-size: 20px; }
            #s-results .res-brand-social-handle { font-size: 17.5px; }

            /* ── Chinese results page (mobile): every text element sized up ─────── */
            [data-lang="zh"] #s-results .res-hero-label,
            [data-lang="zh"] #s-results .res-hero-sublabel,
            [data-lang="zh"] #s-results .res-radar-concerns-label { font-size: 24.5px; }
            [data-lang="zh"] #s-results .res-hero-body,
            [data-lang="zh"] #s-results .skin-pill,
            [data-lang="zh"] #s-results .res-radar-chip,
            [data-lang="zh"] #s-results .res-radar-hint { font-size: 24.5px; }
            [data-lang="zh"] #s-results .res-radar-banner { font-size: 23.3px; }
            [data-lang="zh"] #s-results .res-radar-label { font-size: 27px; }
            [data-lang="zh"] #s-results .routine-pill { font-size: 23.3px; }
            [data-lang="zh"] #s-results .pcard-name { font-size: 23px; }
            [data-lang="zh"] #s-results .pcard-desc { font-size: 19.5px; }
            [data-lang="zh"] #s-results .pcard-back-label,
            [data-lang="zh"] #s-results .pcard-back-list li { font-size: 23px; }
            [data-lang="zh"] #s-results .step-card-name { font-size: 19px; }
            [data-lang="zh"] #s-results .step-card-tag { font-size: 17px; }
            [data-lang="zh"] #s-results .step-benefits-label { font-size: 15.2px; }
            [data-lang="zh"] #s-results .step-benefit-item { font-size: 18.7px; }
            [data-lang="zh"] #s-results .ampm-circle { font-size: 26.4px; }
            [data-lang="zh"] #s-results .card-label { font-size: 14.6px; }
            [data-lang="zh"] #s-results .res-cta-headline { font-size: 32px; }
            [data-lang="zh"] #s-results .res-cta-desc { font-size: 24.5px; }
            [data-lang="zh"] #s-results .res-email-input { font-size: 22.5px; }
            [data-lang="zh"] #s-results .res-email-send { font-size: 22px; }
            [data-lang="zh"] #s-results .res-brand-social-handle { font-size: 19.5px; }
            /* Text elements without an explicit mobile size */
            [data-lang="zh"] #s-results .res-title { font-size: 24.4px; }
            [data-lang="zh"] #s-results .card-text { font-size: 16.9px; }
            [data-lang="zh"] #s-results .mimi-intro-body { font-size: 16.7px; }
            [data-lang="zh"] #s-results .res-tips-list li { font-size: 15.6px; }
            [data-lang="zh"] #s-results .product-card-name { font-size: 17.7px; }
            [data-lang="zh"] #s-results .product-card-desc-front { font-size: 15.4px; }
        }

        /* ── FOLLOW OUR JOURNEY footer (PNG export only — hidden on live page) ── */
        .res-follow-footer {
            display: none;
            width: 100%;
            background: #ADDAF9;
            border-radius: 25px;
            padding: 30px 35px 25px;
            align-items: flex-start;
            justify-content: space-between;
            gap: 30px;
        }
        .res-follow-left {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .res-follow-logo { height: 65px; object-fit: contain; }
        .res-follow-tagline {
            font-size: 0.9rem; color: rgba(30,60,100,0.65); line-height: 1.6; max-width: 275px;
        }
        .res-follow-right {
            display: flex;
            flex-direction: column;
            gap: 13px;
            align-items: flex-end;
        }
        .res-follow-title {
            font-size: 0.81rem; font-weight: 700; letter-spacing: 0.22em;
            text-transform: uppercase; color: rgba(30,60,100,0.55);
        }
        .res-follow-socials {
            display: flex;
            flex-direction: column;
            gap: 10px;
            align-items: flex-end;
        }
        .res-follow-social-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .res-follow-social-handle {
            font-size: 1.03rem; font-weight: 600; color: #1e3c64;
        }
        .res-follow-social-icon {
            width: 35px; height: 35px; border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.25rem;
        }
        .res-follow-social-icon.ig   { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
        .res-follow-social-icon.tt   { background: #000; color: #fff; }
        .res-follow-social-icon.line { background: #06C755; color: #fff; }

        /* ── MizuMi brand footer (PDF / PNG export only — hidden on live page) ── */
        /* Social icons left blank for now — only the placeholder circles + handles. */
        /* NOTE: this footer is rendered to PNG by html2canvas, which mis-handles
           flex `gap`, `flex:1` growth and `justify-content:flex-end` (causes the
           logo to overlap the rows). So spacing here uses MARGINS, not gap, and the
           block is left-aligned right after the logo — both render reliably. */
        .res-brand-footer {
            display: none;
            width: 100%;
            box-sizing: border-box;
            align-items: center;
            background: linear-gradient(135deg, #C8E8F7 0%, #DFF2FC 40%, #F5FBFF 100%);
            border-radius: 18px;
            padding: 11px 18px;
            margin-top: 5px;
        }
        .res-brand-footer-logo { height: 55px; object-fit: contain; display: block; flex-shrink: 0; margin: 0 45px 0 0; mix-blend-mode: multiply; }
        /* 3-column grid so the two rows line up in neat columns (export under
           @mizumi_official, marketing under @mizumi_global). Grid gap renders
           reliably in html2canvas (verified), unlike flex gap / justify-content. */
        .res-brand-footer-socials {
            display: grid;
            grid-template-columns: repeat(3, max-content);
            column-gap: 40px;
            row-gap: 15px;
            align-items: center;
        }
        .res-brand-social-row { display: flex; align-items: center; }
        .res-brand-social-icon {
            width: 40px; height: 40px;
            border-radius: 50%;
            border: 1.5px solid #55B7E9;
            flex-shrink: 0; display: flex; align-items: center; justify-content: center;
            color: #2E8FCB; overflow: hidden;
            font-size: 20px; line-height: 1;
            margin-right: 13px;
            background: #ffffff;
        }
        /* Instagram & 小红书 PNGs already include their own circle → fill, no CSS border. */
        .res-brand-social-icon--ig,
        .res-brand-social-icon--xhs { border: none; background: transparent; }
        .res-brand-social-icon--ig img,
        .res-brand-social-icon--xhs img { width: 40px; height: 40px; object-fit: contain; display: block; }
        /* Mail PNG is just an envelope → keep the bordered circle, sit it inside. */
        .res-brand-social-icon--mail img { width: 21px; height: 21px; object-fit: contain; display: block; }

        .res-brand-social-handle {
            font-size: 15px; font-weight: 400; color: #0D2B4E; white-space: nowrap;
        }

