        :root {
            --face-scan-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='19 6 90 106' fill='none'%3E%3Cpath d='M29.2988 42.7154C29.2988 23.5505 44.835 8.01434 63.9999 8.01434C83.1647 8.01434 98.7009 23.5505 98.7009 42.7154V73.4125C98.7009 92.5774 77.8261 110.783 63.9999 110.783C50.1736 110.783 29.2988 92.5774 29.2988 73.4125V42.7154Z' fill='url(%23paint0_linear_112_1545)'/%3E%3Cpath d='M29.2989 54.7273H29.1162C23.5292 54.7273 19 59.2565 19 64.8435C19 70.4306 23.5292 74.9597 29.1162 74.9597H29.2989V54.7273Z' fill='url(%23paint1_linear_112_1545)'/%3E%3Cpath d='M98.7011 54.7273H98.8838C104.471 54.7273 109 59.2565 109 64.8435C109 70.4306 104.471 74.9597 98.8838 74.9597H98.7011V54.7273Z' fill='url(%23paint2_linear_112_1545)'/%3E%3Cpath d='M63.3795 84.4929C58.2092 81.3629 54.2498 84.4719 52.9164 86.4176C55.2881 88.3468 59.9256 88.2497 63.3795 88.3468C67.9786 88.3468 72.5747 88.6898 74.7008 86.4176C70.1679 82.5385 67.2935 81.9858 63.3795 84.4929Z' fill='url(%23paint3_radial_112_1545)'/%3E%3Cpath d='M63.4217 105.496C51.9269 105.496 44.4497 97.1273 53.0851 89.1603C55.2963 91.6274 57.6986 93.766 63.4217 93.766C69.1449 93.766 72.0834 92.1635 74.5324 89.1603C87.1174 97.8818 74.9166 105.496 63.4217 105.496Z' fill='url(%23paint4_radial_112_1545)'/%3E%3Cpath d='M54.1223 74.9645C56.8047 62.5446 61.596 50.8048 55.659 44.4127C54.7808 43.0971 50.9939 40.548 42.8719 40.8773V37.5846H70.4482V69.6923C70.4482 73.3293 67.4998 76.2777 63.8628 76.2777H55.1891C54.4956 76.2777 53.9759 75.6424 54.1223 74.9645Z' fill='url(%23paint5_linear_112_1545)'/%3E%3Cpath d='M53.8474 76.2776C56.5647 61.2155 61.8048 51.0297 55.6588 44.4127C52.881 41.422 48.5099 40.3239 42.8718 40.8773C35.5109 41.5997 30.5588 45.2675 30.5588 51.0297C30.5588 57.7523 30.3969 70.5265 32.7195 76.2776C38.4817 90.5459 52.5225 83.6221 53.8474 76.2776Z' fill='url(%23paint6_linear_112_1545)'/%3E%3Cpath d='M58.9237 54.1332C51.378 59.673 42.4603 59.5358 36.6413 54.1332C35.425 49.3722 38.2695 42.6608 47.5366 42.6608C56.8037 42.6608 59.7 49.3722 58.9237 54.1332Z' fill='url(%23paint7_radial_112_1545)'/%3E%3Cpath d='M90.5626 54.1332C83.0169 59.673 74.0992 59.5358 68.2802 54.1332C67.0639 49.3722 69.9084 42.6608 79.1755 42.6608C88.4426 42.6608 91.3389 49.3722 90.5626 54.1332Z' fill='url(%23paint8_radial_112_1545)'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_112_1545' x1='79.6206' y1='40.3222' x2='38.6601' y2='104.157' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0.6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_112_1545' x1='24.1495' y1='58.3611' x2='24.1495' y2='74.9597' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0.7'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint2_linear_112_1545' x1='103.851' y1='58.3611' x2='103.851' y2='74.9597' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0.7'/%3E%3C/linearGradient%3E%3CradialGradient id='paint3_radial_112_1545' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(63.8086 82.6975) rotate(90) scale(8.80479 14.9937)'%3E%3Cstop stop-color='white'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='paint4_radial_112_1545' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(63.7025 93.2858) rotate(90) scale(11.5244 9.72596)'%3E%3Cstop stop-color='white'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3ClinearGradient id='paint5_linear_112_1545' x1='63.5914' y1='66.9503' x2='51.7808' y2='76.2777' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0.8'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint6_linear_112_1545' x1='40.6768' y1='56.2431' x2='52.8872' y2='39.3681' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='white' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='white'/%3E%3C/linearGradient%3E%3CradialGradient id='paint7_radial_112_1545' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(46.5762 58.2368) rotate(-90) scale(10.3625 11.7956)'%3E%3Cstop stop-color='white' stop-opacity='0.7'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='paint8_radial_112_1545' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='translate(78.2151 58.2368) rotate(-90) scale(10.3625 11.7956)'%3E%3Cstop stop-color='white' stop-opacity='0.7'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3C/svg%3E");   
            --title-tracking-result: 0;
            --color-primary: #e7b500;          
            --color-primary-light: #f0bd00;    
            --color-primary-dark: #c99824;     
            --color-primary-tint: rgba(231, 181, 0, 0.09); 
            --color-accent: #2563eb;
            --color-bg: #050505;               
            --color-surface: #0c0d11;          
            --color-surface-soft: #111217;     
            --color-border: #24252c;           
            --color-text: #f3f3f5;             
            --color-text-muted: #c9c9d0;       
            --color-danger: #dc2626;
            --color-danger-bg: #fef2f2;
            --color-success: #15803d;
            --color-success-bg: #f0fdf4;

            --color-dark-surface: #0c0d11;     
            --color-dark-surface-2: #111217;   
            --color-dark-border: #24252c;      
            --color-on-dark: #f3f3f5;          
            --color-on-dark-muted: #c9c9d0;    

            --result-bg: #0c0d11;              
            --result-surface: #14151a;         
            --result-surface-hover: #1a1b21;
            --result-border: #24252c;          
            --result-text: #f3f3f5;            
            --result-text-secondary: #c9c9d0;
            --result-text-muted: #c9c9d0;      
            --survey-hl: #6ad6c8;              
            --radar-free-value: #c9a27e;       
            --result-primary: #e7b500;         
            --result-primary-dark: #f0bd00;    
            --result-primary-tint: rgba(231, 181, 0, 0.09); 

            --severity-track: #2a2b33;
            --severity-dot: #c99824;           
            --severity-label: #c9c9d0;
            --severity-none: #6b6b75;

            --score-red: #f06476;
            --history-warn: #f0a35e;          
            --score-yellow: #f2c94c;
            --score-yellow-ink: #f2c94c;      
            --score-green: #3bd181;
            --score-blue: #559cff;

            --radius-lg: 22px;
            --radius-md: 14px;
            --radius-sm: 10px;
            --shadow-card: 0 18px 60px rgba(0,0,0,0.35);

            --desktop-photo-aspect: 3 / 4;
            --desktop-top-ui-height: 170px;
            --desktop-photo-controls-height: 140px;
            --desktop-photo-min-render-width: 320px;

            --font-serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
            --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;

            --chrome-bg: #050505;              
            --chrome-bg-rgb: 5, 5, 5;
            --wash-rgb: 255, 255, 255;
            --accent-rgb: 231, 181, 0;
            --accent-fill: #f0bd00;            
            --accent-fill-hover: #ffcb1f;
            --on-accent: #080808;              
            --media-bg: #11141a;               

            --overlay-bg: rgba(10, 14, 14, 0.82);
            --overlay-border: rgba(255, 255, 255, 0.14);
            --overlay-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
            --overlay-swatch-border: rgba(255, 255, 255, 0.3);
            --overlay-gradient-border: rgba(255, 255, 255, 0.25);
            --overlay-badge-ring: #92929c;
            --overlay-text: #f3f3f5;
            --overlay-text-secondary: #c9c9d0;
            --overlay-text-muted: #c9c9d0;
            --overlay-danger-bg: rgba(10, 14, 14, 0.82);
            --overlay-danger-border: rgba(248, 113, 113, 0.35);
            --overlay-danger-text: #fecaca;
        }

        :root[data-theme="linen"] {
            color-scheme: light;
            --chrome-bg: #fffcf7;
            --chrome-bg-rgb: 255, 252, 247;
            --wash-rgb: 46, 42, 32;            
            --accent-rgb: 79, 90, 58;          
            --accent-fill: #4f5a3a;            
            --accent-fill-hover: #434d31;      
            --on-accent: #ffffff;
            --media-bg: #ece3d4;

            --color-primary: #4f5a3a;          
            --color-primary-light: #6f7c55;
            --color-primary-dark: #374029;     
            --color-primary-tint: rgba(79, 90, 58, 0.09);
            --color-bg: #faf5ee;               
            --color-surface: #ffffff;          
            --color-surface-soft: #f2e9dc;     
            --color-border: #e6d9c4;           
            --color-text: #2e2a20;             
            --color-text-muted: #554c3e;       

            --color-dark-surface: #ffffff;
            --color-dark-surface-2: #f2e9dc;
            --color-dark-border: #e6d9c4;
            --color-on-dark: #2e2a20;
            --color-on-dark-muted: #6b6152;

            --result-bg: #fffdf9;
            --result-surface: #faf5ee;
            --result-surface-hover: #f2e9dc;
            --result-border: #e6d9c4;
            --result-text: #2e2a20;
            --result-text-secondary: #3b3428;  
            --result-text-muted: #554c3e;      
            --survey-hl: #0a6fc2;              
            --radar-free-value: #8b5e3c;       
            --result-primary: #4f5a3a;
            --result-primary-dark: #374029;
            --result-primary-tint: rgba(79, 90, 58, 0.09);

            --severity-track: #e8dbc6;         
            --severity-dot: #c99a3f;           
            --severity-label: #4d4538;
            --severity-none: #b5a891;

            --score-red: #b4483a;              
            --history-warn: #b4532a;
            --score-yellow: #c99a3f;           
            --score-yellow-ink: #8a6516;       
            --score-green: #5a7a4a;            
            --score-blue: #5c7fa3;             

            --shadow-card: 0 20px 45px rgba(30, 40, 38, 0.10);
            --overlay-bg: rgba(250, 249, 247, 0.62);
            --overlay-border: rgba(28, 28, 30, 0.14);
            --overlay-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
            --overlay-swatch-border: rgba(28, 28, 30, 0.2);
            --overlay-gradient-border: rgba(28, 28, 30, 0.18);
            --overlay-badge-ring: #4f5a3a;     
            --overlay-text: rgba(28, 28, 30, 0.85);
            --overlay-text-secondary: rgba(28, 28, 30, 0.75);
            --overlay-text-muted: rgba(28, 28, 30, 0.6);
            --overlay-danger-bg: rgba(247, 224, 218, 0.95);  
            --overlay-danger-border: rgba(180, 72, 58, 0.4);
            --overlay-danger-text: #8f3427;
        }
        * { box-sizing: border-box; }
        html, body { margin: 0; padding: 0; }
        html, body { height: 100%; }
        body {
            font-family: -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Helvetica Neue", Arial, sans-serif;
            background: var(--color-bg);
            color: var(--color-text);
            -webkit-font-smoothing: antialiased;
            min-height: 100vh; height: 100dvh; overflow: hidden;
            display: flex; flex-direction: column;
        }
        .canvas0 { display: none; }

        .app-header {
            position: relative; z-index: 450;
            flex: none;
            background: var(--chrome-bg);
            border-bottom: 1px solid var(--color-dark-border);
            padding: calc(14px + env(safe-area-inset-top, 0px)) calc(32px + env(safe-area-inset-right, 0px)) 14px calc(32px + env(safe-area-inset-left, 0px));
            display: flex; align-items: center; gap: 14px;
        }
        .app-brand { display: flex; align-items: center; gap: 14px; cursor: pointer; border-radius: 10px; }
        .app-brand:focus-visible { outline: 2px solid var(--color-on-dark); outline-offset: 4px; }
        .brand-mark {
            width: 40px; height: 40px; flex: none;
            display: flex; align-items: center; justify-content: center;
        }
        .brand-mark svg { width: 100%; height: 100%; }
        .brand-title { font-family: var(--font-sans); font-size: 16px; font-weight: 700; color: var(--color-on-dark); line-height: 20px; letter-spacing: -0.01em; }
        .brand-subtitle { font-size: 12px; font-weight: 500; color: var(--color-on-dark-muted); line-height: 16px; }

        .app-header-actions { display: contents; }

        .feature-strip-wrap { flex: none; background: var(--chrome-bg); border-bottom: 1px solid var(--color-dark-border); padding: 18px calc(32px + env(safe-area-inset-right, 0px)) 12px calc(32px + env(safe-area-inset-left, 0px)); }
        .feature-grid {
            display: flex; flex-wrap: nowrap; gap: 4px;
            width: max-content; min-width: 100%;
        }

        .feature-scroll-shell { position: relative; width: 100%; min-width: 0; }
        .feature-scroll-viewport {
            width: 100%; min-width: 0;
            overflow-x: auto; overflow-y: hidden;
            scroll-behavior: smooth;
            scrollbar-width: none; -ms-overflow-style: none;
            overscroll-behavior-x: contain;
            -webkit-overflow-scrolling: touch;
            padding: 0 40px;
        }
        .feature-scroll-viewport::-webkit-scrollbar { display: none; }
        .feature-scroll-shell:not(.has-overflow) .feature-scroll-viewport { padding-left: 0; padding-right: 0; }

        .feature-scroll-button {
            position: absolute; top: 50%; z-index: 5;
            width: 32px; height: 32px;
            display: flex; align-items: center; justify-content: center;
            transform: translateY(-50%);
            border: 1px solid rgba(var(--wash-rgb), 0.10);
            border-radius: 50%;
            background: rgba(var(--chrome-bg-rgb), 0.88);
            color: var(--result-text-secondary);
            cursor: pointer;
            backdrop-filter: blur(8px);
            box-shadow: 0 4px 14px rgba(0,0,0,0.32);
            transition: opacity .18s ease, background .18s ease, color .18s ease, transform .18s ease;
        }
        .feature-scroll-button svg { width: 16px; height: 16px; }
        .feature-scroll-button--left { left: 2px; }
        .feature-scroll-button--right { right: 2px; }
        .feature-scroll-button:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.14); color: var(--result-primary); transform: translateY(-50%) scale(1.04); }
        .feature-scroll-button:active:not(:disabled) { transform: translateY(-50%) scale(0.96); }
        .feature-scroll-button:disabled { opacity: 0; pointer-events: none; }
        .feature-scroll-button[hidden] { display: none; }

        .feature-scroll-fade {
            position: absolute; top: 0; bottom: 0;
            width: 52px; z-index: 3;
            pointer-events: none;
            transition: opacity .18s ease;
        }
        .feature-scroll-fade--left { left: 0; background: linear-gradient(to right, var(--chrome-bg) 18%, rgba(var(--chrome-bg-rgb), 0.82) 50%, transparent 100%); }
        .feature-scroll-fade--right { right: 0; background: linear-gradient(to left, var(--chrome-bg) 18%, rgba(var(--chrome-bg-rgb), 0.82) 50%, transparent 100%); }
        .feature-scroll-shell.is-at-start .feature-scroll-fade--left { opacity: 0; }
        .feature-scroll-shell.is-at-end .feature-scroll-fade--right { opacity: 0; }
        .feature-scroll-shell:not(.has-overflow) .feature-scroll-fade { opacity: 0; }

        @media (max-width: 820px) {
            .feature-scroll-viewport { padding-left: 8px; padding-right: 8px; }
            .feature-scroll-button { display: none !important; }
            .feature-scroll-fade { width: 24px; }
            .feature-scroll-fade--left { background: linear-gradient(to right, var(--chrome-bg), transparent); }
            .feature-scroll-fade--right { background: linear-gradient(to left, var(--chrome-bg), transparent); }
        }
        @media (prefers-reduced-motion: reduce) {
            .feature-scroll-viewport { scroll-behavior: auto; }
            .feature-scroll-button, .feature-scroll-fade { transition: none; }
        }

        .global-analysis-status {
            margin-top: 10px;
            padding: 10px 14px;
            border: 1px solid rgba(var(--wash-rgb), 0.08);
            border-radius: 12px;
            background: rgba(var(--wash-rgb), 0.025);
        }
        .global-analysis-status[hidden] { display: none; }
        .global-analysis-status-main {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .global-analysis-spinner {
            width: 15px;
            height: 15px;
            flex: none;
            border-radius: 50%;
            border: 2px solid rgba(var(--accent-rgb), 0.25);
            border-top-color: var(--result-primary);
            animation: globalAnalysisSpin .8s linear infinite;
        }
        @keyframes globalAnalysisSpin {
            to { transform: rotate(360deg); }
        }
        .global-analysis-copy {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
            flex: 1;
        }
        .global-analysis-copy strong {
            color: var(--result-text);
            font-size: 12px;
            font-weight: 650;
        }
        .global-analysis-copy span {
            color: var(--result-text-muted);
            font-size: 11px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .global-analysis-count {
            flex: none;
            color: var(--severity-dot);
            font-size: 21px;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }
        .global-analysis-progress-track {
            height: 3px;
            margin-top: 9px;
            overflow: hidden;
            border-radius: 999px;
            background: var(--severity-track);
        }
        .global-analysis-progress-fill {
            width: 0;
            height: 100%;
            border-radius: inherit;
            background: var(--result-primary);
            transition: width .25s ease;
        }
        .global-analysis-status[data-phase="complete"] .global-analysis-spinner {
            animation: none;
            border-color: var(--result-primary);
            background: var(--result-primary);
        }
        .global-analysis-status[data-phase="partial-error"] .global-analysis-spinner {
            animation: none;
            border-color: var(--severity-dot);
        }
        .global-analysis-status[data-phase="detect-error"] .global-analysis-spinner {
            animation: none;
            border-color: #fb7185;
            background: #fb7185;
        }
        .global-analysis-status[data-phase="detect-error"] .global-analysis-count {
            color: #fca5a5;
        }
        @media (max-width: 820px) {
            .global-analysis-status {
                padding: 10px calc(12px + env(safe-area-inset-right, 0px)) 10px calc(12px + env(safe-area-inset-left, 0px));
                position: fixed; left: 0; right: 0;
                bottom: var(--mobile-feature-bar-height, 64px);
                z-index: 39;
                margin: 0;
                border-radius: 0;
                border: none;
                border-top: 1px solid var(--color-dark-border);
                background: var(--chrome-bg);
            }
            .global-analysis-copy span { white-space: normal; line-height: 1.4; }
            body.has-mobile-status-bar {
                padding-bottom: calc(var(--mobile-feature-bar-height, 64px) + var(--mobile-status-bar-height, 78px));
            }
        }

        .feature-bottom-bar {
            display: none;
            position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
            background: var(--chrome-bg); border-top: 1px solid var(--color-dark-border);
            padding-bottom: env(safe-area-inset-bottom, 0px);
            padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
        }
        .feature-bottom-bar-track {
            display: flex; flex-wrap: nowrap; gap: 4px;
            overflow-x: auto; overflow-y: hidden;
            scrollbar-width: none; -ms-overflow-style: none;
            -webkit-overflow-scrolling: touch;
            padding: 8px 14px;
            mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
            -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
        }
        .feature-bottom-bar-track::-webkit-scrollbar { display: none; }
        .feature-bottom-bar::after {
            content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 120px;
            background: inherit; pointer-events: none;
        }

        .feature-bottom-scroll-button {
            position: absolute; top: 8px; z-index: 5;
            width: 28px; height: 28px;
            display: flex; align-items: center; justify-content: center;
            border: 1px solid rgba(255,255,255,0.10);
            border-radius: 50%;
            background: rgba(12,16,16,0.92);
            color: #dce7e4;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(0,0,0,0.32);
            transition: opacity .18s ease, background .18s ease, color .18s ease;
        }
        .feature-bottom-scroll-button svg { width: 14px; height: 14px; }
        .feature-bottom-scroll-button--left { left: 4px; }
        .feature-bottom-scroll-button--right { right: 4px; }
        .feature-bottom-scroll-button:active:not(:disabled) { background: rgba(49,197,181,0.18); color: var(--result-primary); }
        .feature-bottom-scroll-button:disabled { opacity: 0; pointer-events: none; }
        .feature-bottom-scroll-button[hidden] { display: none; }
        .feature-bottom-bar.has-overflow .feature-bottom-bar-track { padding-left: 34px; padding-right: 34px; }

        .app-main {
            display: grid;
            grid-template-columns: minmax(330px, 0.80fr) minmax(0, 1.20fr);
            gap: 18px;
            flex: 1 1 auto; min-height: 0;
            max-width: 1620px; margin: 0 auto; width: 100%;
            padding: 14px calc(24px + env(safe-area-inset-right, 0px)) 28px calc(24px + env(safe-area-inset-left, 0px));
        }
        .photo-column {
            display: flex; flex-direction: column; min-width: 0; min-height: 0; align-self: start; align-items: center;
        }
        .results-column { min-width: 0; display: flex; flex-direction: column; min-height: 0; }

        .card {
            background: var(--color-surface);
            border: 1px solid var(--color-border);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-card);
            padding: 20px;
        }
        .card-stack > .card + .card { margin-top: 20px; }
        .result-eyebrow { font-family: var(--font-serif); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
        .result-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
        .result-disclaimer { font-size: 12px; color: var(--color-text-muted); margin: 4px 0 14px; }

        .overall-summary {
            padding: 16px 18px; margin-bottom: 14px;
            border: 1px solid var(--result-border); border-radius: var(--radius-sm);
        }
        .overall-summary[hidden] { display: none; }
        .overall-summary-note { margin-top: 8px; font-size: 11.5px; color: var(--result-text-muted); }

        .skin-report-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
        .skin-report-stat { display: flex; align-items: baseline; gap: 8px; }
        .skin-report-stat-label { font-size: 12px; color: var(--result-text-muted); }
        .skin-report-stat-value {
            font-family: var(--font-serif); font-size: 34px; font-weight: 700; line-height: 1;
            font-variant-numeric: tabular-nums; color: var(--result-text);
        }
        .skin-report-stat-suffix { font-size: 13px; color: var(--result-text-muted); }
        .skin-report-hero-divider { width: 1px; height: 30px; background: var(--result-border); }
        .skin-report-eye-age-values { display: flex; align-items: baseline; gap: 10px; }
        .skin-report-eye-age-item { display: flex; align-items: baseline; gap: 4px; }
        .skin-report-eye-age-side { font-size: 12px; color: var(--result-text-muted); }

        
        .skin-score-range { margin-top: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
        .skin-score-range-label { font-size: 13px; margin: 0; color: var(--result-text-secondary); }
        .skin-score-range-label strong { color: var(--result-text); }
        .skin-score-range-label[hidden] { display: none; }
        @media (max-width: 620px) { .skin-score-range { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

        .skin-report-body { display: flex; flex-direction: column; gap: 14px; }
        .skin-radar-canvas-wrap { width: min(100%, calc(460px * var(--skin-radar-width-scale, 1))); margin: 0 auto; }
        .skin-radar-svg { width: 100%; height: auto; display: block; overflow: visible; }
        .skin-radar-grid-ring { fill: none; stroke: rgba(var(--wash-rgb), 0.14); stroke-width: 1.1; }
        .skin-radar-axis-line { stroke: rgba(var(--wash-rgb), 0.10); stroke-width: 1; }
        .skin-radar-data-area { stroke: none; }
        .skin-radar-edge { fill: none; stroke-width: 2.5; stroke-linecap: round; }
        .skin-radar-dot { stroke: var(--result-bg); stroke-width: 2; }
        .skin-radar-label-name { fill: var(--result-text-secondary); font-size: 26px; font-weight: 600; }
        .skin-radar-label-value { font-size: 24px; font-weight: 700; }

        .skin-report-analyzing { display: flex; align-items: center; gap: 10px; }
        .skin-report-analyzing-dots { display: flex; gap: 5px; }
        .skin-report-analyzing-dots span {
            width: 7px; height: 7px; border-radius: 50%; background: var(--severity-dot); opacity: 0.4;
        }
        .skin-report-analyzing-text { font-size: 13px; color: var(--result-text-secondary); }
        @media (prefers-reduced-motion: no-preference) {
            .skin-report-analyzing-dots span { animation: skinReportAnalyzingPulse 1.2s ease-in-out infinite; }
            .skin-report-analyzing-dots span:nth-child(2) { animation-delay: 0.15s; }
            .skin-report-analyzing-dots span:nth-child(3) { animation-delay: 0.3s; }
            @keyframes skinReportAnalyzingPulse {
                0%, 80%, 100% { opacity: 0.4; transform: scale(0.85); }
                40% { opacity: 1; transform: scale(1.2); }
            }
        }

        .skin-type-main-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 4px; }
        .skin-type-icon {
            flex: none; width: 44px; height: 44px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            background: var(--result-primary-tint); color: var(--result-primary);
        }
        .skin-type-icon svg { width: 24px; height: 24px; }
        .skin-type-main-card strong { display: block; font-size: 16.5px; margin-bottom: 4px; color: var(--result-text); }
        .skin-type-main-card p { font-size: 15.5px; line-height: 1.5; color: var(--result-text-secondary); margin: 0; min-width: 0; overflow-wrap: anywhere; }
        .skin-zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
        .skin-zone-grid > div { padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(var(--wash-rgb), 0.03); border: 1px solid var(--result-border); }
        .skin-zone-grid span { display: block; font-size: 12.5px; color: var(--result-text-muted); margin-bottom: 4px; }
        .skin-zone-grid strong { font-size: 16px; color: var(--result-text); }
        .skin-zone-summary { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--result-text-secondary); }

        .skin-report-progress {
            display: flex; gap: 16px; flex-wrap: wrap;
            font-size: 11px; color: var(--result-text-muted);
            padding-top: 12px; border-top: 1px solid var(--result-border);
        }

        .skin-report-insight-lead { font-size: 17px; line-height: 1.55; color: var(--result-text-secondary); margin: 0 0 12px; }
        .skin-report-insight-groups { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
        .skin-report-insight-group-card {
            border: 1px solid var(--result-border); border-left: 3px solid var(--result-border);
            border-radius: var(--radius-sm); background: var(--result-surface); padding: 12px 14px;
        }
        
        .skin-report-insight-group-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
        .skin-report-insight-group-title { display: flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--result-text); }
        .skin-report-insight-group-icon { flex: none; width: 17px; height: 17px; color: var(--result-text); opacity: 0.85; }
        
        .skin-report-insight-group-tag { flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 8px; border-radius: 5px; border: 1px solid; }
        .skin-report-insight-group-headline { font-size: 14.5px; font-weight: 600; line-height: 1.5; color: var(--result-text); margin: 0 0 10px; }
        .skin-report-insight-group-rows { display: flex; flex-direction: column; gap: 6px; }
        .skin-report-insight-group-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
        .skin-report-insight-group-row-label { flex: none; font-size: 12px; color: var(--result-text-muted); min-width: 56px; }
        .skin-report-insight-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
        .skin-report-insight-ai-list { margin-top: 16px; border: 1px solid var(--result-border); border-radius: 14px; padding: 4px 16px; background: var(--result-surface); }
        .skin-report-insight-ai-list-title { display: flex; align-items: center; gap: 6px; padding: 12px 0 8px; font-size: 13px; font-weight: 700; color: var(--result-primary); }
        .skin-report-insight-ai-row { display: grid; grid-template-columns: minmax(7.5em, 9.5em) minmax(0, 1fr); gap: 4px 14px; padding: 12px 0; border-top: 1px solid var(--result-border); }
        .skin-report-insight-ai-row-head { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
        .skin-report-insight-ai-row-head b { font-size: 14px; color: var(--result-text); }
        .skin-report-insight-ai-row p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--result-text-secondary); }
        @media (max-width: 600px) {
            .skin-report-insight-ai-row { grid-template-columns: minmax(0, 1fr); }
            .skin-report-insight-ai-row-head { flex-direction: row; align-items: center; gap: 8px; }
        }
        .skin-report-insight-chip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; }
        .skin-report-insight-group-interpretation {
            font-size: 13px; line-height: 1.5; color: var(--result-text-muted);
            margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--result-border);
        }
        .skin-report-insight-disclaimer {
            font-size: 12.5px; line-height: 1.5; color: var(--result-text-muted);
            padding-top: 8px; border-top: 1px solid var(--result-border);
        }

        
        .survey-hl { color: var(--survey-hl); }
        
        .key-hl {
            color: inherit; font-weight: 700; background: none;
            text-decoration-line: underline; text-decoration-color: var(--score-red);
            text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none;
        }
        .result-card .viz[data-band] .summary-box { border-left-color: var(--band); }
        html[dir="rtl"] .result-card .viz[data-band] .summary-box { border-right-color: var(--band); }
        
        .survey-ref { display: inline-flex; width: 0.95em; height: 0.95em; margin: 0 1px 0 3px; vertical-align: -0.12em; color: var(--survey-hl); }
        .survey-ref svg { width: 100%; height: 100%; }
        .survey-footnote { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding-top: 10px;
            border-top: 1px dashed var(--result-border); font-size: 12.5px; line-height: 1.5; color: var(--result-text-muted); }
        .survey-footnote > .survey-ref { width: 16px; height: 16px; margin: 1px 0 0; flex: none; }
        .survey-footnote-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
        .survey-footnote ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
        .survey-footnote li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
        .survey-footnote--one .survey-footnote-body { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 0; }
        .survey-footnote-a { display: inline-flex; align-items: center; gap: 6px; }
        .survey-footnote-a b { font-weight: 600; color: var(--survey-hl); border: 1px solid color-mix(in srgb, var(--survey-hl) 45%, transparent); border-radius: 999px; padding: 1px 10px; }
        .skin-report-advanced-lead { font-size: 15.5px; line-height: 1.7; color: var(--result-text); margin: 0 0 16px; }
        .skin-report-advanced-block { margin-bottom: 16px; }
        .skin-report-advanced-block-title { font-size: 17px; font-weight: 700; color: var(--result-text-muted); margin-bottom: 8px; }
        .skin-report-advanced-cards { display: flex; flex-direction: column; gap: 8px; }
        .skin-report-advanced-card { border: 1px solid var(--result-border); border-radius: var(--radius-sm); background: var(--result-surface); padding: 10px 12px; }
        .skin-report-advanced-card--positive { border-left: 3px solid var(--score-green); }
        .skin-report-advanced-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
        .skin-report-advanced-card-title { font-size: 16px; font-weight: 700; color: var(--result-primary); }
        .skin-report-advanced-rank {
            flex: none; display: inline-flex; align-items: center; justify-content: center;
            width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700;
            background: color-mix(in srgb, var(--result-primary) 20%, transparent); color: var(--result-primary);
        }
        .skin-report-advanced-card-text { font-size: 14.5px; line-height: 1.65; color: var(--result-text); margin: 0; }
        .skin-report-advanced-card-text + .skin-report-advanced-card-text { margin-top: 4px; }
        .skin-report-advanced-card-text--muted { color: var(--result-text-muted); }
        .skin-report-advanced-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
        .skin-report-advanced-step { display: flex; align-items: flex-start; gap: 10px; }
        .skin-report-advanced-step-order {
            flex: none; display: inline-flex; align-items: center; justify-content: center;
            width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; font-size: 12px; font-weight: 700;
            background: color-mix(in srgb, var(--result-primary) 20%, transparent); color: var(--result-primary);
        }
        .skin-report-advanced-retry {
            margin-top: 8px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer;
            background: rgba(var(--wash-rgb), 0.05); color: var(--result-text); border: 1px solid var(--result-border); border-radius: 999px;
        }
        .skin-report-advanced-retry:hover { background: rgba(var(--wash-rgb), 0.1); }

        .skin-report-advanced-concern-list { display: flex; flex-direction: column; gap: 8px; }
        .skin-report-advanced-concern-item {
            border-left: 3px solid var(--result-border); border-radius: var(--radius-sm);
            background: var(--result-surface); padding: 11px 13px;
        }
        .skin-report-advanced-concern-item--critical { border-left-color: var(--score-red); }
        .skin-report-advanced-concern-rows { display: flex; flex-direction: column; }
        .skin-report-advanced-concern-row { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--result-border); }
        .skin-report-advanced-concern-row:first-child { padding-top: 0; margin-top: 0; border-top: none; }
        .skin-report-advanced-concern-row-label { display: block; font-size: 16px; font-weight: 700; color: var(--result-text); margin-bottom: 2px; }
        .skin-report-advanced-concern-text { font-size: 14.5px; line-height: 1.6; color: var(--result-text); margin: 0; }

        .skin-report-ai-title { display: flex; align-items: center; gap: 6px; }
        .skin-report-ai-icon { flex: none; color: var(--result-primary); }

        
        .lite-lock { display: block; width: 100%; margin-top: 12px; padding: 12px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer;
            border: 1px dashed color-mix(in srgb, var(--result-primary) 50%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--result-primary) 4%, transparent); }
        .lite-lock:hover, .lite-lock:focus-visible { border-style: solid; background: color-mix(in srgb, var(--result-primary) 8%, transparent); }
        .lite-lock-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--result-primary); }
        .lite-lock-head svg { width: 14px; height: 14px; }
        .lite-lock-cta { margin-left: auto; font-size: 12px; border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
        .lite-blur { filter: blur(5px); user-select: none; pointer-events: none; margin: 4px 0 0; color: var(--result-text-secondary); line-height: 1.6; }
        .lite-lock .bar-row { margin-bottom: 10px; }
        .lite-lock .bar-row-pct { color: var(--result-text-muted); }
        .lite-bar { background: var(--result-text-muted) !important; opacity: .45; }
        .lite-lock .care-item { opacity: .9; }
        .lite-lock--advanced .skin-report-advanced-block { margin-top: 10px; }
        .skin-report-advanced-lead + .lite-lock { margin-bottom: 18px; }
        .lite-lock--advanced .skin-report-advanced-block-title { opacity: .85; }
        .lite-upsell { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 14px 16px; border-radius: 14px;
            border: 1px solid color-mix(in srgb, var(--result-primary) 45%, transparent); background: color-mix(in srgb, var(--result-primary) 8%, var(--result-bg)); }
        .lite-upsell-badge { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--result-primary);
            border: 1px solid color-mix(in srgb, var(--result-primary) 55%, transparent); border-radius: 999px; padding: 1px 9px; }
        .lite-upsell p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--result-text-secondary); }
        .lite-upsell .btn-primary { align-self: flex-start; }
        
        .free-sample { display: block; padding: 12px 14px; border-radius: 14px; cursor: pointer;
            border: 1px dashed color-mix(in srgb, var(--result-primary) 45%, transparent); background: color-mix(in srgb, var(--result-primary) 3%, transparent); }
        .free-sample:hover, .free-sample:focus-visible { border-style: solid; background: color-mix(in srgb, var(--result-primary) 7%, transparent); }
        .free-sample:focus-visible { outline: 2px solid var(--result-primary); outline-offset: 2px; }
        .free-sample + .free-sample { margin-top: 12px; }
        .free-blur { filter: blur(3.5px); opacity: .825; user-select: none; pointer-events: none; }

        .result-card {
            flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column;
            background: rgba(248, 247, 243, 0.98);
            border-color: rgba(var(--wash-rgb), 0.12);
            box-shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
        }
        .result-card-body { display: contents; }
        .result-card .result-head { order: 1; }
        .result-card .result-eyebrow { order: 1; }
        .result-card .result-title { order: 2; }
        .result-card .result-disclaimer { order: 3; }
        .result-card .overall-summary { order: 4; }
        .result-card #llm_status { order: 5; }
        .result-card .result-tabs { order: 6; }
        .result-card #llm_red_flags { order: 7; }
        .result-card .result-tab-panels { order: 8; }
        .result-tabs {
            flex: none; margin-top: 4px;
            display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
            width: 100%; padding: 4px;
            background: rgba(var(--wash-rgb), 0.025); border: 1px solid rgba(var(--wash-rgb), 0.07);
            border-radius: 14px;
        }
        .result-tabs[hidden] { display: none; }
        .result-tabs.result-tabs--4col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .result-tab {
            position: relative;
            display: flex; align-items: center; justify-content: center;
            min-height: 46px; margin: 0; padding: 0 14px;
            border: 0; border-radius: 10px;
            background: transparent; color: var(--color-text-muted);
            font-size: 14px; font-weight: 600; font-family: inherit;
            cursor: pointer;
            transition: color .18s ease, background .18s ease;
        }
        .result-tab[hidden] { display: none; }
        .result-tab:hover { color: var(--color-text); background: rgba(var(--wash-rgb), 0.045); }
        .result-tab.active { color: var(--result-text); background: rgba(var(--accent-rgb), 0.10); }
        .result-tab.active::after {
            content: ''; position: absolute; left: 50%; bottom: 5px;
            width: 28px; height: 2px; border-radius: 999px;
            background: var(--color-primary); transform: translateX(-50%);
        }
        .result-tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

        .photo-controls-wrap {
            flex: none; margin-top: 14px; min-width: 0; max-width: 100%;
            display: flex; flex-direction: column; align-items: center; gap: 10px;
        }
        .custom-select-wrap { position: relative; }
        .header-lang { display: none; flex: none; align-items: center; }
        
        body.home-view-open .header-lang,
        body.analyze-view-open:not(.report-lang-locked) .header-lang,
        body.has-photo-session:not(.report-lang-locked):not(.account-view-open) .header-lang { display: flex; }
        .header-lang .custom-select-trigger { padding: 7px 12px; background: rgba(var(--wash-rgb), 0.06); border-color: var(--color-dark-border); }
        .header-lang-icon { width: 15px; height: 15px; flex: none; }
        .custom-select-trigger {
            font-family: inherit; font-size: 13px; font-weight: 700;
            color: var(--color-on-dark);
            background: rgba(var(--accent-rgb), 0.14); border: 1px solid var(--color-primary-light);
            border-radius: 999px; padding: 7px 14px;
            display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
            max-width: 220px;
        }
        .custom-select-trigger:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.26); }
        .custom-select-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .custom-select-caret { font-size: 10px; opacity: 0.8; flex-shrink: 0; }
        .custom-select-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
        .custom-select-trigger:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
        .custom-select-list {
            position: absolute; top: calc(100% + 4px); left: 0; z-index: 560;
            list-style: none; margin: 0; padding: 4px;
            min-width: 160px; max-height: 260px; overflow-y: auto;
            background: var(--color-dark-surface-2); border: 1px solid var(--color-dark-border);
            border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
        }
        .custom-select-option {
            font-size: 12.5px; font-weight: 600; color: var(--color-on-dark);
            padding: 6px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap;
        }
        .custom-select-option:hover, .custom-select-option.is-focused { background: rgba(var(--wash-rgb), 0.08); }
        .custom-select-option.is-selected { background: var(--accent-fill); color: var(--on-accent); }
        .survey-modal-actions {
            display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px;
        }
        #survey_answer_skip_btn, #survey_answer_prev_btn,
        #survey_answer_start_btn, #survey_answer_submit_btn { min-width: 116px; }
        .survey-modal-body { color: var(--color-on-dark); font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
        
        .survey-ready-success { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
        .survey-ready-check {
            width: 56px; height: 56px; border-radius: 50%; margin-bottom: 8px; display: flex; align-items: center; justify-content: center;
            background: rgba(var(--wash-rgb), 0.08); color: var(--result-primary);
        }
        .survey-ready-check svg { width: 26px; height: 26px; }
        .survey-ready-title { margin: 0 0 4px; font-size: 21px; line-height: 1.35; font-weight: 700; color: var(--color-on-dark); text-wrap: balance; }
        .survey-ready-text { margin: 0; font-size: 14px; line-height: 1.65; color: var(--color-on-dark-muted); }
        #survey_answer_intro p { margin: 0 0 12px; }
        #survey_answer_intro p:last-child { margin-bottom: 0; }
        .sr-only {
            position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
            overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
        }
        .survey-answer-progress { flex: none; font-size: 16px; font-weight: 700; color: var(--color-on-dark); font-variant-numeric: tabular-nums; }
        .survey-answer-list {
            max-height: 55vh; overflow-y: auto; padding-right: 4px;
        }
        .survey-answer-question { padding: 14px 2px; border-bottom: 1px solid rgba(var(--wash-rgb), 0.06); }
        .survey-answer-question:last-child { border-bottom: none; }
        .survey-answer-question-title { font-size: 16px; font-weight: 700; color: var(--color-on-dark); margin-bottom: 10px; }
        .survey-answer-options { display: flex; flex-direction: column; gap: 8px; }
        .survey-answer-option {
            display: flex; align-items: flex-start; gap: 8px;
            font-size: 13.5px; color: var(--color-on-dark); cursor: pointer;
        }
        .survey-answer-option input { margin-top: 3px; flex: none; }
        .survey-answer-option input:disabled { cursor: not-allowed; }
        .survey-answer-option:has(input:disabled) { color: rgba(var(--wash-rgb), 0.3); }
        .survey-answer-followup {
            margin-top: 10px; padding: 10px 12px; background: rgba(var(--wash-rgb), 0.04);
            border-radius: var(--radius-sm); border: 1px solid var(--color-dark-border);
        }
        .survey-answer-followup .survey-answer-question { padding: 0; border-bottom: none; }
        #llm_red_flags { flex: none; margin-top: 10px; }
        #llm_red_flags:empty { display: none; margin: 0; }
        .result-tab-panels { flex: 1 1 auto; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-top: 14px; }
        .tab-panel { display: none; width: 100%; max-width: 100%; min-width: 0; }
        .tab-panel.active { display: block; }
        @media (prefers-reduced-motion: no-preference) {
            .tab-panel.active { animation: fadeInUp 260ms ease; }
            @keyframes fadeInUp {
                from { opacity: 0; transform: translateY(4px); }
                to { opacity: 1; transform: translateY(0); }
            }
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
                transition-duration: 0.001ms !important; scroll-behavior: auto !important;
            }
        }

        .photo-card {
            position: relative;
            flex: 1 1 auto; min-height: 0;
            border-radius: var(--radius-lg);
            background: var(--media-bg);
            border: 1.5px dashed var(--color-dark-border);
            box-shadow: inset 0 0 0 1px rgba(var(--wash-rgb), 0.02), 0 24px 70px rgba(0,0,0,0.38);
            display: flex; align-items: center; justify-content: center;
            overflow: hidden;
            container-type: inline-size;
            --overlay-legend-title-size: 11px;     
            --overlay-legend-item-size: 9px;       
            --overlay-annotation-title-size: 11px; 
            --overlay-annotation-value-size: 17px; 
            --overlay-annotation-unit-size: 8px;   
            --overlay-pad: 7px 10px;
        }
        @media (min-width: 821px) {
            .photo-card {
                flex: none;
                width: 100%;
                aspect-ratio: var(--desktop-photo-aspect);
                min-height: 0;
            }
            .photo-card:not(.has-image):not(.camera-active) {
                max-height: max(220px, calc(100dvh - var(--desktop-top-ui-height) - var(--desktop-photo-controls-height)));
            }
            .photo-card.has-image:not(.camera-active) {
                aspect-ratio: var(--current-photo-aspect, var(--desktop-photo-aspect));
                width: var(--desktop-photo-render-width, auto);
                height: auto;
                max-width: 100%;
                max-height: none;
                margin-inline: auto;
            }
            .photo-card.camera-active {
                max-height: max(220px, calc(100dvh - var(--desktop-top-ui-height) - var(--desktop-photo-controls-height)));
            }
        }
        .photo-card.has-image { border-style: solid; }
        @media (prefers-reduced-motion: no-preference) {
            .photo-card.is-analyzing::before {
                content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
                background: linear-gradient(100deg, transparent 42%, rgba(var(--accent-rgb), 0.07) 50%, transparent 58%);
                background-size: 250% 250%;
                animation: scanSweep 2.6s ease-in-out infinite;
            }
            @keyframes scanSweep {
                0% { background-position: 200% 0; }
                100% { background-position: -60% 0; }
            }
        }
        .photo-placeholder {
            position: absolute; inset: 0;
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
            color: var(--color-on-dark-muted); font-size: 13px; text-align: center; padding: 20px;
            pointer-events: none;
        }
        .photo-placeholder .icon {
            width: 56px; height: 56px; border-radius: 50%; background: var(--color-dark-surface-2);
            border: 1.5px solid var(--color-dark-border); display: flex; align-items: center; justify-content: center;
            font-size: 24px; color: var(--color-primary-light);
        }
        .photo-placeholder .icon svg { width: 28px; height: 28px; }
        
        .photo-placeholder.is-error { color: var(--color-on-dark); font-size: 16px; font-weight: 700; line-height: 1.5; padding: 20px 28px; }
        #result_canvas,
        #result_canvas_display { position: relative; z-index: 1; max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; border-radius: calc(var(--radius-lg) - 2px); }
        #result_canvas { display: none; }
        .photo-card:not(.has-image) #result_canvas_display { display: none; }
        .photo-card.has-image #result_canvas_display { display: block; }
        .photo-card.has-image .photo-placeholder { display: none; }

        .photo-card.detect-failed #result_canvas_display { filter: grayscale(0.85) brightness(0.55); }

        .photo-magnifier {
            position: fixed; z-index: 999;
            transform: translate(-50%, -50%);
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.35);
            box-shadow: 0 8px 24px rgba(0,0,0,0.45);
            pointer-events: none;
        }
        .photo-magnifier[hidden] { display: none; }
        @media (max-width: 820px), (hover: none) {
            .photo-magnifier { display: none !important; }
        }

        
        .photo-check-scan {
            position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none;
            border-radius: calc(var(--radius-lg) - 2px); 
        }
        .photo-check-scan[hidden] { display: none; }
        .photo-check-freeze { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: inherit; border-radius: inherit; }
        
        .photo-column:has(#photo_check_scan:not([hidden])) .photo-source-actions { visibility: hidden; }
        .photo-check-pill {
            position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
            border: 1px solid transparent; background: color-mix(in srgb, var(--result-surface) 85%, transparent);
            color: var(--result-text-muted); font-size: 12px; white-space: nowrap;
            -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
        }
        .detect-failed-overlay {
            position: absolute; inset: 0; z-index: 3;
            display: flex; align-items: center; justify-content: center;
            padding: 24px; pointer-events: none;
        }
        .detect-failed-overlay[hidden] { display: none; }
        
        .no-face-panel {
            position: absolute; inset: 0; z-index: 4; border-radius: inherit;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            padding: 24px; text-align: center; background: #EFE2D9; color: #313429;
        }
        :root:not([data-theme="linen"]) .no-face-panel { background: var(--color-surface); color: var(--color-text); }
        .no-face-panel[hidden] { display: none; }
        .photo-card.detect-failed .detect-failed-overlay { display: none; }
        .no-face-mirror {
            position: relative; width: min(60%, 240px); aspect-ratio: 10 / 13; border-radius: 50% / 38.5%;
            display: grid; place-items: center; margin-bottom: 28px; background: #F9D9C9; color: #313429;
            box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), 0 2px 6px rgba(49,52,41,.05), 0 24px 48px -18px rgba(49,52,41,.22);
        }
        :root:not([data-theme="linen"]) .no-face-mirror { background: #3A2A22; color: #ECEADF; box-shadow: inset 0 0 0 4px rgba(255,255,255,.06), 0 24px 48px -18px rgba(0,0,0,.6); }
        .no-face-title { margin: 0 0 8px; font-family: var(--font-head); font-weight: 400; font-size: 28px; line-height: 1.2; }
        .no-face-text { max-width: 400px; margin: 0; font-size: 15px; line-height: 1.6; color: #45473A; }
        :root:not([data-theme="linen"]) .no-face-text { color: #B3B1A1; }
        @media (max-width: 767px) {
            .no-face-mirror { width: min(52%, 200px); margin-bottom: 20px; }
            .no-face-title { font-size: 24px; }
            .no-face-text { font-size: 14px; }
        }
        
        .detect-failed-overlay.is-info .detect-failed-overlay-text {
            background: var(--overlay-bg); border-color: var(--overlay-border); color: var(--overlay-text);
        }
        .detect-failed-overlay-text {
            max-width: 80%;
            background: var(--overlay-danger-bg); border: 1px solid var(--overlay-danger-border);
            border-radius: var(--radius-sm); padding: 12px 20px;
            color: var(--overlay-danger-text); font-size: 15px; font-weight: 700; text-align: center; line-height: 1.5;
            box-shadow: var(--overlay-shadow);
        }

        .overlay-legend {
            position: absolute; z-index: 2;
            
            top: 8px; right: 8px;
            top: clamp(8px, 2cqw, 12px); right: clamp(8px, 2cqw, 12px);
            max-width: 132px;
            background: var(--overlay-bg); border: 1px solid var(--overlay-border);
            border-radius: var(--radius-sm); padding: var(--overlay-pad);
            pointer-events: none;
            box-shadow: var(--overlay-shadow);
        }
        :root[data-theme="linen"] :is(.overlay-legend, .eye-age-callout, .skin-age-badge) {
            -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
        }
        .overlay-legend[hidden] { display: none; }
        .overlay-legend-title {
            font-size: var(--overlay-legend-title-size); font-weight: 500; color: var(--overlay-text);
            line-height: 1.25; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 5px;
        }
        .overlay-legend-list { display: flex; flex-direction: column; gap: 4px; }
        .overlay-legend-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
        .overlay-legend-row-label { font-size: var(--overlay-legend-item-size); font-weight: 400; line-height: 1.3; color: var(--overlay-text-secondary); min-width: 0; overflow-wrap: anywhere; }
        .overlay-legend-swatch {
            flex: none; width: 8px; height: 8px; width: clamp(8px, 1.9cqw, 10px); height: clamp(8px, 1.9cqw, 10px); border-radius: 3px;
            border: 1px solid var(--overlay-swatch-border);
        }
        .overlay-legend-swatch--line {
            height: 0; border: 0; border-top: 2px solid; background: none; align-self: center;
        }
        .overlay-legend-symbol { flex: none; width: 8px; height: 8px; width: clamp(8px, 1.9cqw, 10px); height: clamp(8px, 1.9cqw, 10px); border-radius: 50%; border: 1px solid var(--overlay-swatch-border); box-sizing: border-box; }
        .overlay-legend-symbol--ring { background: none; border-width: 2px; }
        .overlay-legend-gradient { display: flex; flex-direction: column; align-items: center; gap: 4px; gap: clamp(4px, 1cqw, 5px); }
        .overlay-legend-gradient-bar {
            width: 8px; height: 38px; width: clamp(8px, 1.9cqw, 10px); height: clamp(38px, 9cqw, 50px); border-radius: 6px; border: 1px solid var(--overlay-gradient-border);
        }
        .overlay-legend-gradient-label { font-size: var(--overlay-legend-item-size); line-height: 1.3; text-align: center; color: var(--overlay-text-secondary); }
        .overlay-legend-note { margin-top: 5px; font-size: var(--overlay-legend-item-size); line-height: 1.4; color: var(--overlay-text-muted); }

        .eye-age-overlay { position: absolute; z-index: 2; pointer-events: none; }
        .eye-age-overlay[hidden] { display: none; }
        .eye-age-overlay-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
        .eye-age-overlay-lines circle { fill: #fff; }
        .eye-age-overlay-lines line { stroke: #fff; stroke-width: 1.5; }
        .eye-age-callout {
            position: absolute; top: 0; left: 0; width: max-content; max-width: 100px; max-width: min(130px, 30cqw);
            background: var(--overlay-bg); border: 1px solid var(--overlay-border);
            border-radius: var(--radius-sm);
            padding: 5px 8px;
            text-align: center; line-height: 1.2;
            box-shadow: var(--overlay-shadow);
        }
        
        .eye-age-callout-label {
            display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
            white-space: normal; text-wrap: balance; overflow-wrap: break-word;
            font-size: var(--overlay-annotation-title-size); font-weight: 500;
            letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.2;
            color: var(--overlay-text); margin-bottom: 2px;
        }
        .eye-age-callout-value {
            display: block; white-space: nowrap; font-variant-numeric: tabular-nums;
            font-size: var(--overlay-annotation-unit-size); font-weight: 400; line-height: 1.2;
            color: var(--overlay-text-secondary);
        }
        .eye-age-callout-value strong {
            display: block; font-size: var(--overlay-annotation-value-size); font-weight: 700;
            line-height: 1.05; color: var(--overlay-text); margin-bottom: 1px;
        }
        .eye-age-callout--left { transform: translate(0%, -50%); }
        .eye-age-callout--right { transform: translate(-100%, -50%); }

        .skin-age-badge {
            position: absolute; z-index: 2; pointer-events: none; box-sizing: border-box;
            bottom: 10px; left: 10px;
            bottom: clamp(10px, 2.4cqw, 16px); left: clamp(10px, 2.4cqw, 16px);
            width: clamp(74px, var(--skin-age-badge-size, 92px), 92px); height: clamp(74px, var(--skin-age-badge-size, 92px), 92px);
            border-radius: 50%;
            background: var(--overlay-bg); border: 3px solid var(--overlay-badge-ring);
            box-shadow: var(--overlay-shadow);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            text-align: center; padding: 6px; overflow: hidden;
        }
        .skin-age-badge[hidden] { display: none; }
        .skin-age-badge .eye-age-callout-label {
            max-width: 100%; font-size: min(var(--overlay-annotation-title-size), 10px);
            letter-spacing: 0.02em; line-height: 1.1; overflow-wrap: anywhere;
        }

        .upload-btn-wrap {
            flex: none; width: 100%; min-width: 0; max-width: 100%;
            display: flex; flex-direction: column; gap: 10px;
        }
        .photo-source-actions {
            display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%;
        }
        .photo-source-actions button.btn-primary, .photo-source-actions button.btn-secondary {
            width: 100%; min-width: 0;
        }
        .photo-view-actions {
            display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0;
        }
        .photo-view-actions .photo-view-toggle {
            flex: 1 1 auto; min-width: 0;
            display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
        }
        .photo-view-actions .magnifier-toggle-btn { flex: 0 0 40px; width: 40px; min-width: 40px; max-width: 40px; }

        button.btn-primary,
        button.btn-secondary,
        .view-toggle-btn,
        .magnifier-toggle-btn {
            white-space: nowrap; word-break: keep-all;
            writing-mode: horizontal-tb; text-orientation: mixed;
        }

        button.btn-primary {
            display: inline-flex; align-items: center; justify-content: center;
            flex: none; min-width: 116px;
            background: var(--accent-fill); color: var(--on-accent); border: none;
            padding: 12px 28px; border-radius: 999px; font-size: 14px; font-weight: 700;
            cursor: pointer; letter-spacing: 0.02em;
            box-shadow: none;
            transition: background .15s ease, transform .15s ease;
        }
        button.btn-primary:hover { background: var(--accent-fill-hover); transform: translateY(-1px); }
        button.btn-primary:active { transform: translateY(0); }
        button.btn-primary:disabled {
            background: var(--color-dark-border); color: var(--color-on-dark-muted);
            cursor: not-allowed; box-shadow: none;
        }
        button.btn-primary:disabled:hover { background: var(--color-dark-border); transform: none; }

        button.btn-secondary {
            display: inline-flex; align-items: center; justify-content: center;
            flex: none; min-width: 88px;
            background: transparent; color: var(--color-on-dark-muted); border: 1px solid var(--color-dark-border);
            padding: 11px 20px; border-radius: 999px; font-size: 13px; font-weight: 600;
            cursor: pointer; letter-spacing: 0.02em; transition: background .15s ease, color .15s ease;
        }
        button.btn-primary[hidden], button.btn-secondary[hidden] { display: none; }
        button.btn-secondary:hover:not(:disabled) { background: rgba(var(--wash-rgb), 0.06); color: var(--color-on-dark); }
        button.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }
        
        button.btn-secondary#button_download_pdf {
            color: var(--result-primary); border-color: var(--result-primary);
            background: color-mix(in srgb, var(--result-primary) 12%, transparent);
        }
        button.btn-secondary#button_download_pdf:hover:not(:disabled) {
            color: var(--result-primary); background: color-mix(in srgb, var(--result-primary) 22%, transparent);
        }
        button.btn-secondary#button_download_pdf:disabled { opacity: 0.72; cursor: progress; }

        .magnifier-toggle-btn {
            display: inline-flex; align-items: center; justify-content: center; flex: none;
            width: 40px; height: 40px;
            background: transparent; color: var(--color-on-dark-muted); border: 1px solid var(--color-dark-border);
            border-radius: 999px; cursor: pointer;
            transition: background .15s ease, color .15s ease, border-color .15s ease;
        }
        .magnifier-toggle-btn svg { width: 18px; height: 18px; }
        .magnifier-toggle-btn:hover:not(:disabled) { background: rgba(var(--wash-rgb), 0.06); color: var(--color-on-dark); }
        .magnifier-toggle-btn.active { background: rgba(var(--accent-rgb), 0.18); color: var(--result-primary); border-color: rgba(var(--accent-rgb), 0.5); }
        .magnifier-toggle-btn:disabled { opacity: 0.4; cursor: not-allowed; }

        .photo-view-toggle {
            flex: none;
            display: flex; background: rgba(var(--wash-rgb), 0.04); border: 1px solid var(--color-dark-border);
            border-radius: 999px; padding: 3px; gap: 2px;
        }
        .view-toggle-btn {
            display: inline-flex; align-items: center; justify-content: center;
            flex: none; min-width: 72px;
            background: transparent; border: none; color: var(--result-text-secondary);
            font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
            cursor: pointer; transition: all .15s ease; font-family: inherit;
        }
        .view-toggle-btn:hover:not(:disabled) { color: var(--color-on-dark); }
        .view-toggle-btn.active { background: rgba(var(--accent-rgb), 0.18); color: var(--result-primary); }
        .view-toggle-btn:disabled { opacity: 0.4; cursor: default; }

        .feature-region-picker {
            flex: none; width: 100%;
            display: flex; flex-wrap: wrap; background: rgba(var(--wash-rgb), 0.04); border: 1px solid var(--color-dark-border);
            border-radius: 999px; padding: 3px; gap: 2px;
        }
        .feature-region-picker[hidden] { display: none; }
        .feature-region-btn {
            display: inline-flex; align-items: center; justify-content: center;
            flex: 1 1 auto; min-width: 64px;
            background: transparent; border: none; color: var(--result-text-secondary);
            font-size: 12px; font-weight: 600; padding: 6px 8px; border-radius: 999px;
            cursor: pointer; transition: all .15s ease; font-family: inherit;
        }
        .feature-region-btn:hover { color: var(--color-on-dark); }
        .feature-region-btn.active { background: rgba(var(--accent-rgb), 0.18); color: var(--result-primary); }

        .view-toggle-btn { min-width: 0; padding: 8px 6px; font-size: 12.5px; }

        .feature-pill {
            display: flex; flex-direction: row; align-items: center; gap: 7px;
            flex: 0 0 auto;
            height: 37px; padding: 0 12px;
            background: transparent; border: 1.5px solid transparent; border-radius: 999px;
            font-size: 13px; font-weight: 600; color: var(--result-text-secondary); white-space: nowrap;
            cursor: pointer; transition: opacity .15s ease, background .15s ease, color .15s ease;
            position: relative; opacity: 0.6;
        }
        .feature-pill .swatch {
            position: relative;
            width: 20px; height: 20px; border-radius: 50%; flex: none;
            display: flex; align-items: center; justify-content: center;
            background: transparent;
            color: var(--feature-color, var(--color-primary));
            transition: background .15s ease;
        }
        .feature-pill .swatch svg { width: 12px; height: 12px; }
        .feature-pill:hover { opacity: 0.85; background: rgba(var(--wash-rgb), 0.06); }
        .feature-pill.active {
            opacity: 1; color: var(--result-text);
            background: rgba(var(--wash-rgb), 0.045);
        }
        .feature-pill.active .swatch { background: color-mix(in srgb, var(--feature-color, var(--color-primary)) 30%, transparent); }
        .feature-pill.active::after {
            content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px;
            border-radius: 999px; background: var(--feature-color, var(--color-primary-light));
        }
        .feature-pill.state-ready { opacity: 1; }
        .feature-pill:disabled { opacity: 0.28; cursor: not-allowed; background: transparent; }
        
        
        .feature-pill.state-ai-locked .swatch,
        .feature-pill.state-ai-locked .feature-pill-label { opacity: 0.45; filter: grayscale(1); }
        .feature-pill.state-ai-locked:hover .swatch,
        .feature-pill.state-ai-locked:hover .feature-pill-label { opacity: 0.7; }
        .feature-pill.state-ai-locked .feature-pill-label::after {
            content: ''; display: inline-block; width: 11px; height: 11px; margin-inline-start: 4px; vertical-align: -1px;
            background: currentColor; -webkit-mask: var(--lock-icon) center / contain no-repeat; mask: var(--lock-icon) center / contain no-repeat;
            --lock-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 0 1 8 0v2h1v8H3V7h1zm2 0h4V5a2 2 0 0 0-4 0v2z'/%3E%3C/svg%3E");
        }
        .feature-pill:disabled:hover { opacity: 0.28; background: transparent; transform: none; }

        .feature-pill-label { display: inline-block; }
        .feature-pill-meta {
            display: inline-flex; align-items: center; justify-content: center; flex: none;
            min-width: 24px; height: 20px; padding: 0 6px;
            border-radius: 999px;
            font-size: 10.5px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }
        .feature-pill-meta:empty { display: none; }
        .feature-pill-meta--score { min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; }
        .feature-pill-score-ring {
            --band-color: var(--severity-track);
            position: relative; display: inline-flex; align-items: center; justify-content: center;
            width: 24px; height: 24px; flex: none;
        }
        .feature-pill-score-arc {
            position: absolute; inset: 0; border-radius: 50%;
            background: var(--band-color);
            -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px + 1px));
                    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px + 1px));
        }
        .feature-pill-score-value {
            position: relative; z-index: 1;
            font-size: 9px; font-weight: 700; color: var(--result-text); font-variant-numeric: tabular-nums;
        }
        .feature-pill-meta--classification { color: var(--result-primary); background: rgba(var(--accent-rgb), 0.13); border: 1px solid rgba(var(--accent-rgb), 0.28); }
        .feature-pill-meta--retry { color: #fecaca; background: rgba(127,29,29,0.25); border: 1px solid rgba(248,113,113,0.3); }

        .feature-pill.state-busy .swatch::after,
        .feature-pill.state-error .swatch::after {
            content: ''; position: absolute; top: -1px; right: -1px;
            width: 7px; height: 7px; border-radius: 50%;
            border: 1.5px solid var(--color-bg);
        }
        .feature-pill.state-busy .swatch::after { background: var(--severity-dot); }
        .feature-pill.state-error .swatch::after { background: #fb7185; }

        .feature-pill[data-feature="skin_report"] { --feature-color: var(--color-primary-light); }
        .feature-pill[data-feature="dark_circle"] { --feature-color: #f4978e; }
        .feature-pill[data-feature="moisture"] { --feature-color: #38bdf8; }
        .feature-pill[data-feature="oiliness"] { --feature-color: #fb923c; }
        .feature-pill[data-feature="redness"] { --feature-color: #f87171; }
        .feature-pill[data-feature="texture"] { --feature-color: #a78bfa; }
        .feature-pill[data-feature="wrinkle"] { --feature-color: #4ade80; }
        .feature-pill[data-feature="age_spot"] { --feature-color: #60a5fa; }
        .feature-pill[data-feature="eye_bag"] { --feature-color: #c084fc; }
        .feature-pill[data-feature="firmness"] { --feature-color: #f472b6; }
        .feature-pill[data-feature="droopy_upper_eyelid"] { --feature-color: #e879f9; }
        .feature-pill[data-feature="droopy_lower_eyelid"] { --feature-color: #f0abfc; }
        .feature-pill[data-feature="acne"] { --feature-color: #22d3ee; }
        .feature-pill[data-feature="radiance"] { --feature-color: #fbbf24; }
        .feature-pill[data-feature="skin_type"] { --feature-color: #34d399; }
        .feature-pill[data-feature="pore"] { --feature-color: #4d8033; }
        .feature-pill[data-feature="teartrough"] { --feature-color: #f0bb00; }

        #llm_status { display: none !important; }
        #llm_status:not(.error):not(.ok):not(.idle):not(:empty)::before {
            content: ''; width: 13px; height: 13px; border-radius: 50%; flex: none;
            border: 2px solid var(--color-primary-light); border-top-color: transparent;
            animation: spin .7s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        #llm_status.error { color: var(--color-danger); }
        #llm_status.ok { color: var(--color-success); }
        #llm_status.idle { color: var(--color-text-muted); }

        .tab-panel { font-size: 16px; line-height: 1.52; color: var(--color-text); }
        #llm_tab_overview:empty::before,
        #llm_tab_overview_brief:empty::before { content: '尚未上傳照片'; color: var(--color-text-muted); font-size: 13px; }
        .tab-panel h1, .tab-panel h2, .tab-panel h3 { margin: 14px 0 6px; line-height: 1.3; }
        .tab-panel h1:first-child, .tab-panel h2:first-child, .tab-panel h3:first-child { margin-top: 0; }
        .tab-panel h3 { font-size: 16.5px; color: var(--color-primary-dark); }
        .tab-panel h2 { font-size: 18px; }
        .tab-panel h1 { font-size: 21px; }
        .tab-panel p { margin: 5px 0; }
        .tab-panel ul { margin: 4px 0; padding-left: 22px; }
        .tab-panel li { margin: 2px 0; }
        .tab-panel hr { border: none; border-top: 1px solid var(--color-border); margin: 12px 0; }
        .tab-panel strong { color: #111; }
        .viz { margin-bottom: 4px; width: 100%; max-width: 100%; min-width: 0; }
        .viz-dashboard {
            container-type: inline-size;
            width: 100%; max-width: 100%; min-width: 0;
            margin-bottom: 22px; padding-bottom: 4px;
            overflow: hidden;
        }
        .feature-score-summary { padding: 2px 0 14px; }
        .feature-score-top {
            display: grid;
            grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1fr) minmax(180px, 1.4fr);
            gap: 18px; align-items: start;
        }
        .feature-score-top > div + div { border-left: 1px solid var(--result-border); padding-left: 18px; }
        .feature-score-label { display: block; color: var(--result-text-muted); font-size: 12.5px; margin-bottom: 4px; }
        .feature-score-value { color: var(--result-text); font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
        .feature-score-severity-block { min-width: 0; }
        .feature-score-severity { display: block; color: var(--result-primary); font-size: 17px; margin-bottom: 2px; }
        .feature-score-status { color: var(--result-text-secondary); font-size: 14.5px; }
        .feature-score-region-block { min-width: 0; overflow-wrap: anywhere; }
        .feature-score-region-block strong { display: block; color: var(--result-text); font-size: 16.5px; font-weight: 650; line-height: 1.35; }
        .feature-score-region-block span { display: block; margin-top: 3px; color: var(--result-text-secondary); font-size: 14px; line-height: 1.45; }

        .feature-score-scale { margin-top: 16px; padding: 0 18px; }

        
        .feature-score-compact {
            display: grid; grid-template-columns: auto minmax(340px, 1fr) minmax(120px, auto);
            gap: 20px; align-items: center; padding: 4px 0 14px;
        }
        .feature-score-compact .feature-score-label { margin-bottom: 2px; }
        .feature-score-value-row { display: flex; align-items: center; gap: 10px; }
        .feature-score-compact .feature-score-value { font-size: 38px; line-height: 1; }
        .feature-score-verdict { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
        .feature-score-compact .feature-score-value-block, .feature-score-value-row { min-width: 0; }
        .feature-score-compact .feature-score-status { font-size: 13px; line-height: 1.35; max-width: 12em; }
        .feature-score-bands { min-width: 0; padding-top: 6px; }
        .feature-score-band-bars { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; align-items: center; }
        .feature-score-band-bars i { display: block; height: 5px; border-radius: 3px; }
        .feature-score-band-bars i.is-current { height: 9px; }
        .feature-score-band-marker {
            position: absolute; top: 50%; left: var(--pos); width: 4px; height: 18px; border-radius: 2px;
            background: var(--result-text); box-shadow: 0 0 0 2px var(--result-bg); transform: translate(-50%, -50%);
        }
        html[dir="rtl"] .feature-score-band-marker { left: auto; right: var(--pos); transform: translate(50%, -50%); }
        .feature-score-band-labels {
            display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-top: 6px;
            font-size: 15px; line-height: 1.3; color: var(--result-text-muted); text-align: center;
        }
        .feature-score-band-labels span { min-width: 0; overflow-wrap: break-word; }
        .feature-score-band-labels span.is-current { font-weight: 700; font-size: 16px; }
        
        .card.band-lock, .skin-zone-grid.band-lock { cursor: pointer; }
        .feature-pill-meta--locked { min-width: 0; padding: 0 2px; color: var(--result-text-muted); }
        .feature-pill-meta--locked svg { width: 12px; height: 12px; }
        .feature-score-compact .feature-score-region-block { border-left: 1px solid var(--result-border); padding-left: 18px; }
        html[dir="rtl"] .feature-score-compact .feature-score-region-block { border-left: 0; padding-left: 0; border-right: 1px solid var(--result-border); padding-right: 18px; }
        
        .feature-score-fit { container-type: inline-size; }
        @container (max-width: 800px) {
            .feature-score-compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
            .feature-score-compact .feature-score-bands { grid-column: 1 / -1; grid-row: 2; }
            .feature-score-compact .feature-score-region-block { grid-column: 2; grid-row: 1; border-top: 0; padding-top: 0; }
        }

        @media (max-width: 620px) {
            .feature-score-top { grid-template-columns: 1fr 1fr; gap: 16px; }
            .feature-score-region-block {
                grid-column: 1 / -1;
                border-left: 0 !important; padding-left: 0 !important;
                border-top: 1px solid var(--result-border); padding-top: 16px;
            }
            .feature-score-top > div:nth-child(2) { border-left: 1px solid var(--result-border); padding-left: 16px; }
        }

        .tag-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
        .tag {
            display: inline-flex; align-items: center;
            background: rgba(var(--wash-rgb), 0.06); color: var(--color-text-muted);
            font-size: 13px; padding: 4px 10px; border-radius: 999px; font-weight: 500;
            max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.35;
        }
        .viz-section { margin: 14px 0; }
        .viz-section-title { font-size: 13.5px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 7px; }
        .causes-subtitle { font-size: 12px; line-height: 1.5; color: var(--color-text-muted); margin: 0 0 12px; }
        .bar-row { margin-bottom: 16px; }
        .bar-row-top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
        .bar-row-rank {
            flex: none;
            display: inline-flex; align-items: center; justify-content: center;
            min-width: 30px; height: 22px; padding: 0 6px;
            border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), 0.20);
            font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
            background: rgba(var(--accent-rgb), 0.10); color: var(--result-primary, var(--color-primary));
        }
        .bar-row-name { font-weight: 600; font-size: 18px; flex: 1 1 auto; min-width: 0; }
        .bar-row-pct { color: var(--color-text-muted); font-size: 18px; flex: none; }
        .bar-track { background: #eef1f1; border-radius: 4px; height: 4px; overflow: hidden; }
        .bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary)); }
        
        .cause-intro { margin: -2px 0 12px; font-size: 13px; line-height: 1.5; color: var(--result-text-muted); }
        .cause-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }  
        .cause-card {
            display: flex; align-items: flex-start; gap: 12px; min-width: 0;
            padding: 13px 14px; border: 1px solid var(--result-border); border-radius: 14px;
            background: rgba(var(--wash-rgb), 0.025);
        }
        .cause-icon {
            width: 34px; height: 34px; border-radius: 50%; flex: none;
            display: flex; align-items: center; justify-content: center;
            color: var(--result-primary); background: rgba(var(--accent-rgb), 0.12);
        }
        .cause-icon svg { width: 17px; height: 17px; }
        .cause-body { min-width: 0; }
        .result-card .cause-name { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--result-text); }
        .result-card .cause-text { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--result-text-secondary); }
        .lite-lock .cause-grid { margin-top: 10px; }
        .lite-lock .cause-name { color: var(--result-text-secondary); }
        .bar-mechanism { font-size: 14.5px; color: var(--color-text-muted); margin-top: 4px; line-height: 1.45; }
        .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
        .card-grid.card-grid--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        @media (max-width: 480px) {
            .card-grid, .card-grid.card-grid--3col { grid-template-columns: 1fr; }
        }
        .card-grid > .card { width: 100%; height: 100%; margin-top: 0; }
        .card-grid > .card + .card { margin-top: 0; }
        .viz .card { min-width: 0; background: #fafcfc; box-shadow: none; padding: 12px 14px; }
        .card-title { font-size: 13.5px; font-weight: 700; color: var(--color-text-muted); margin-bottom: 4px; }
        .card-value { font-size: 16.5px; font-weight: 700; color: var(--color-primary-dark); min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
        .card-desc { font-size: 14.5px; color: var(--color-text-muted); margin-top: 5px; line-height: 1.45; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
        .insight-card-tag {
            display: inline-block; margin-bottom: 6px;
            font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
            color: var(--result-primary, var(--color-primary));
            background: rgba(var(--accent-rgb), 0.12);
            padding: 2px 9px; border-radius: 999px;
        }
        .care-group { margin-bottom: 16px; }
        .care-group:last-child { margin-bottom: 0; }
        .care-group-title { font-size: 16.5px; font-weight: 700; color: var(--color-primary-dark); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
        .care-grid { display: flex; flex-direction: column; }
        .care-item {
            display: flex; gap: 14px; align-items: flex-start;
            background: transparent; border: 0; border-radius: 0;
            padding: 10px 0; font-size: 16.5px;
        }
        .care-item + .care-item { border-top: 1px solid var(--color-border); }
        .care-num { flex: none; width: 22px; font-size: 15px; font-weight: 700; color: var(--color-text-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
        .care-body { min-width: 0; }
        .care-cat { font-weight: 700; color: var(--color-primary); font-size: 16.5px; margin-bottom: 2px; }
        .care-suggestion { color: var(--color-text); line-height: 1.48; }
        .warning-box { background: var(--color-danger-bg); border: 1px solid #fecaca; color: #991b1b; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14.5px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
        .warning-box ul { margin: 4px 0 0; padding-left: 18px; }
        .warning-box li { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
        .kv-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
        .kv-table td { padding: 6px 6px; border-bottom: 1px solid #f1f4f4; vertical-align: top; }
        .kv-table td:first-child { font-weight: 600; color: var(--color-text-muted); white-space: nowrap; width: 30%; }
        .badge-yes { color: var(--color-danger); font-weight: 700; }
        .badge-no { color: var(--color-success); }
        .badge-warn, .badge-ok { display: inline-block; font-size: 14.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
        .badge-warn { color: #991b1b; background: var(--color-danger-bg); }
        .badge-ok { color: var(--color-text-muted); background: rgba(0,0,0,0.04); }
        .summary-box {
            font-size: 16px; line-height: 1.55; color: var(--result-text-secondary);
            background: transparent; border: 0; border-left: 2px solid rgba(var(--accent-rgb), 0.45);
            border-radius: 0; padding: 2px 0 2px 16px;
            min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word;
        }
        .summary-bullet-list {
            list-style: none; margin: 0; padding: 0;
            display: flex; flex-direction: column; gap: 6px;
        }
        .summary-bullet-list li {
            position: relative; padding-left: 18px;
            font-size: 16px; line-height: 1.48; color: var(--result-text-secondary);
            min-width: 0; overflow-wrap: anywhere; word-break: break-word;
        }
        .summary-bullet-list li::before {
            content: ''; position: absolute; left: 0; top: 0.62em;
            width: 6px; height: 6px; border-radius: 50%;
            background: rgba(var(--accent-rgb), 0.7);
        }
        .summary-brief { display: flex; flex-direction: column; gap: 10px; }
        @media (max-width: 820px) {
        }
        .severity-list { display: flex; flex-direction: column; }
        .severity-list-compact { gap: 2px; }
        .severity-row { padding: 11px 0; }
        .severity-row + .severity-row { border-top: 1px solid var(--result-border); }
        .severity-row-main {
            display: grid;
            grid-template-columns: minmax(100px, 1fr) 96px minmax(72px, auto);
            gap: 14px; align-items: center;
        }
        .severity-name-wrap { min-width: 0; }
        .severity-name { color: var(--result-text); font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
        .severity-meta { margin-top: 3px; color: var(--result-text-muted); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
        .severity-scale { position: relative; width: 96px; height: 18px; }
        .severity-track {
            position: absolute; left: 0; right: 0; top: 50%; height: 2px;
            border-radius: 999px; background: var(--severity-track); transform: translateY(-50%);
        }
        .severity-dot {
            position: absolute; top: 50%; left: var(--severity-position, 0%);
            width: 9px; height: 9px; border-radius: 50%;
            background: var(--severity-dot); border: 2px solid var(--result-bg);
            transform: translate(-50%, -50%);
        }
        .severity-text { color: var(--result-text-secondary); font-size: 13px; text-align: right; white-space: nowrap; }
        .severity-level-0 { opacity: 0.62; }
        .severity-level-0 .severity-dot { background: var(--severity-none); }
        @media (max-width: 480px) {
            .severity-row-main { grid-template-columns: minmax(86px, 1fr) 68px minmax(62px, auto); gap: 9px; }
            .severity-scale { width: 68px; }
        }

        .compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
        .compare-col { min-width: 0; }
        .compare-col + .compare-col { border-left: 1px solid var(--result-border); padding-left: 18px; }
        .compare-col-title { font-size: 13px; font-weight: 700; color: var(--result-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 7px; }
        @media (max-width: 480px) {
            .compare-grid { grid-template-columns: 1fr; gap: 14px; }
            .compare-col + .compare-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--result-border); padding-top: 14px; }
        }

        .viz-divider { border: none; border-top: 1px dashed var(--color-border); margin: 18px 0; }
        .hint { color: var(--color-text-muted); font-size: 12px; line-height: 1.6; }


        .result-card {
            background: var(--result-bg);
            border-color: var(--result-border);
            color: var(--result-text);
            box-shadow: 0 24px 70px rgba(0,0,0,0.46);
            padding: 22px 24px;
        }
        .result-eyebrow { color: var(--result-primary); }
        .result-title { color: var(--result-text); }
        #llm_result_feature_name { color: var(--result-text); }
        .result-disclaimer { color: var(--result-text-muted); margin-bottom: 10px; }
        .result-tabs {
            margin-top: 0;
            display: flex; gap: 8px; grid-template-columns: none;
            padding: 4px 0; background: none; border: none; border-radius: 0;
            overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
            scrollbar-width: none; -ms-overflow-style: none;
        }
        .result-tabs::-webkit-scrollbar { display: none; }
        .result-tab {
            flex: 0 0 auto; max-width: 11em; min-height: 42px; padding: 6px 12px;
            border-radius: 999px; background: rgba(var(--wash-rgb), 0.07);
            color: var(--result-text-muted); font-size: 13.5px; line-height: 1.25;
            white-space: normal; text-align: center;
        }
        .result-tab:hover { color: var(--result-text); background: rgba(var(--wash-rgb), 0.11); }
        .result-tab.active { color: var(--on-accent); background: var(--accent-fill); font-weight: 700; }
        :root:not([data-theme="dark"]) .result-tab:not(.active) { color: var(--result-text-secondary); background: rgba(var(--wash-rgb), 0.09); }
        .result-tab.active::after { display: none; }
        .result-tab:focus-visible { outline-color: var(--result-primary); }
        .tab-panel { color: var(--result-text-secondary); }
        .tab-panel strong { color: var(--result-text); }
        .tab-panel h1, .tab-panel h2 { color: var(--result-text); }
        .tab-panel h3 { color: var(--result-primary); }
        .tab-panel hr { border-top-color: var(--result-border); }
        #llm_tab_overview:empty::before,
        #llm_tab_overview_brief:empty::before { color: var(--result-text-muted); }
        #llm_red_flags { margin-top: 14px; margin-bottom: 14px; }

        .tag { background: rgba(var(--wash-rgb), 0.055); color: var(--result-text-muted); border: 1px solid rgba(var(--wash-rgb), 0.07); }

        .viz-section-title { color: var(--result-text-muted); }
        
        :root:not([data-theme="dark"]) .result-card .viz-section-title { color: var(--result-text); }

        .bar-row-name { color: var(--result-text); }
        .bar-row-pct, .bar-mechanism { color: var(--result-text-muted); }
        .bar-track { background: var(--severity-track); }
        .bar-fill { background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary)); }

        .viz .card { background: var(--result-surface); border-color: var(--result-border); }
        .care-item + .care-item { border-top-color: var(--result-border); }
        .care-num { color: var(--result-text-muted); }
        .care-cat { color: var(--result-text-muted); }
        .care-group-title { color: var(--result-text-muted); }
        .card-value { color: var(--result-text); }
        .care-suggestion, .card-desc { color: var(--result-text-secondary); }
        .card-title { color: var(--result-text-muted); }

        .kv-table td { border-bottom-color: var(--result-border); }
        .kv-table td:first-child { color: var(--result-text-muted); }

        .warning-box { background: rgba(127,29,29,0.24); border-color: rgba(248,113,113,0.38); color: #fecaca; }
        .badge-warn { background: rgba(127,29,29,0.30); color: #fca5a5; }
        .badge-ok { background: rgba(var(--wash-rgb), 0.06); color: var(--result-text-muted); }

        .result-tab-panels { scrollbar-color: rgba(var(--wash-rgb), 0.3) transparent; }
        .result-tab-panels::-webkit-scrollbar { width: 8px; }
        .result-tab-panels::-webkit-scrollbar-track { background: transparent; }
        .result-tab-panels::-webkit-scrollbar-thumb { background: rgba(var(--wash-rgb), 0.25); border-radius: 999px; }
        .result-tab-panels::-webkit-scrollbar-thumb:hover { background: rgba(var(--wash-rgb), 0.38); }

        .result-card,
        .result-card .tab-panel,
        .result-card p,
        .result-card li,
        .result-card .care-suggestion {
            color: var(--result-text-secondary);
        }
        .result-card h1,
        .result-card h2,
        .result-card strong,
        .result-card .bar-row-name {
            color: var(--result-text);
        }
        .result-card .result-disclaimer,
        .result-card .hint,
        .result-card .viz-section-title,
        .result-card .card-title,
        .result-card .card-desc {
            color: var(--result-text-muted);
        }
        .viz-dashboard[data-band] .feature-score-value,
        .viz-dashboard[data-band] .feature-score-severity { color: color-mix(in srgb, var(--band) 82%, var(--result-text)); }
        .viz-dashboard[data-band="average"] .feature-score-value,
        .viz-dashboard[data-band="average"] .feature-score-severity { color: var(--score-yellow-ink); }
        .result-card .bar-row-pct { color: var(--result-text-muted); font-variant-numeric: tabular-nums; }
        .result-card .bar-mechanism { color: var(--result-text-secondary); line-height: 1.5; }

        :is(#llm_tab_care, #llm_tab_products) .care-group-title { color: var(--result-text); font-size: 16.5px; font-weight: 650; }
        :is(#llm_tab_care, #llm_tab_products) .care-num { color: var(--severity-dot); font-size: 15px; font-weight: 700; }
        :is(#llm_tab_care, #llm_tab_products) .care-cat { color: var(--result-primary); font-size: 16.5px; font-weight: 650; }
        :is(#llm_tab_care, #llm_tab_products) .care-suggestion { color: var(--result-text-secondary); font-size: 16.5px; line-height: 1.45; }
        :is(#llm_tab_care, #llm_tab_products) .care-item + .care-item { border-top: 1px solid rgba(var(--wash-rgb), 0.065); }

        .result-card #llm_status { color: var(--result-text-muted); }
        .result-card #llm_status.ok { color: #4ade80; }
        .result-card #llm_status.error { color: #f87171; }

        @media (min-width: 821px) {
            .result-card { padding: 16px 18px; }
            .result-eyebrow { margin-bottom: 4px; }
            .result-title { margin-bottom: 4px; }
            .result-disclaimer { margin: 3px 0 10px; }
            #llm_status:empty { margin: 0; min-height: 0; }
            .result-tabs { margin-top: 2px; }
            .result-tab { min-height: 40px; }
            .result-tab-panels { padding-top: 10px; }
            .photo-controls-wrap { margin-top: 10px; }
            
            .result-card:has(> #overall_summary:not([hidden])) { overflow-y: auto; overflow-x: hidden; scrollbar-color: rgba(var(--wash-rgb), 0.3) transparent; }
            .result-card:has(> #overall_summary:not([hidden])) > *,
            .result-card:has(> #overall_summary:not([hidden])) .result-card-body > * { flex-shrink: 0; }
            .result-card:has(> #overall_summary:not([hidden])) .result-tab-panels { flex: none; overflow: visible; min-height: auto; }
            
            .result-card:has(> #overall_summary:not([hidden])) .result-head {
                position: sticky; top: -16px; z-index: 6; margin: -16px -18px 0; padding: 16px 18px 0; background: var(--result-bg);
            }
        }

        
        @media (min-width: 821px) {
            body.app-page-open:not(.analyze-view-open) .app-main { align-items: start; }
            body.app-page-open:not(.analyze-view-open) .result-card {
                height: max(400px, calc(100dvh - var(--desktop-top-ui-height, 170px) - 42px));
            }
        }

        @media (min-width: 821px) and (max-height: 760px) {
            html, body { height: auto; min-height: 100%; }
            body {
                height: auto; min-height: 100dvh;
                overflow-y: auto; overflow-x: hidden;
            }
            .app-main { flex: none; min-height: 0; align-items: start; }
            .photo-column, .results-column { min-height: 0; }
            .result-card { height: max(400px, calc(100dvh - 32px)); }
        }

        @media (max-width: 820px) {
            html, body { height: auto; }
            body {
                display: block; overflow-y: auto; overflow-x: hidden;
                padding-bottom: var(--mobile-feature-bar-height, 64px);
            }
            .app-header {
                padding: calc(10px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) 10px calc(14px + env(safe-area-inset-left, 0px)); gap: 8px;
            }
            .app-brand { flex: 0 1 auto; min-width: 0; }
            .app-brand > span:last-child { min-width: 0; }
            .brand-mark { display: none; }
            .brand-title { font-family: var(--font-sans); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
            .brand-subtitle { font-size: 11px; }
            .app-header-actions { display: flex; flex: none; gap: 5px; margin-left: auto; }
            .app-header-actions > :first-child { margin-left: 0; }
            .app-header-actions > button:not(.header-nav-link) {
                width: 32px; height: 32px; padding: 0; gap: 0; justify-content: center; border-radius: 50%;
            }
            .header-nav-link { padding: 6px 8px; }
            .app-header-actions > button > span:not(.theme-toggle-icon) {
                position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
                overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
            }
            .app-header-actions .cost-btn-icon { width: 16px; height: 16px; }
            
            .header-lang .custom-select-trigger { width: 32px; height: 32px; padding: 0; justify-content: center; gap: 0; }
            .header-lang .custom-select-trigger-label, .header-lang .custom-select-caret { display: none; }
            
            #auth_button_avatar[hidden] + .auth-signin-icon { display: block; }

            .feature-strip-wrap { padding: 0; border-bottom: none; }
            .feature-scroll-shell { display: none; }

            .feature-bottom-bar { display: block; }

            .app-main {
                flex: none; min-height: 0; display: block;
                padding: 12px calc(12px + env(safe-area-inset-right, 0px)) 12px calc(12px + env(safe-area-inset-left, 0px));
            }
            .photo-column, .results-column { display: block; min-height: 0; max-width: none; width: 100%; }
            .photo-column { margin-bottom: 18px; }
            .photo-card { flex: none; min-height: 360px; background: var(--media-bg); }
            #result_canvas_display { max-height: none; }
            
            body:not(.analyze-view-open) .photo-card.has-image:not(.camera-active) {
                width: 100%; aspect-ratio: auto; height: auto; min-height: 0;
                background: transparent; border-color: transparent; box-shadow: none;
            }
            body:not(.analyze-view-open) .photo-card.has-image:not(.camera-active) #result_canvas_display { width: 75%; height: auto; max-width: 75%; max-height: none; }
            
            .photo-card {
                --overlay-legend-title-size: 9px; --overlay-legend-item-size: 8px;
                --overlay-annotation-title-size: 9px; --overlay-annotation-value-size: 14px; --overlay-annotation-unit-size: 7px;
                --overlay-pad: 5px 7px;
            }
            .overlay-legend { max-width: 108px; }
            .eye-age-callout { padding: 4px 6px; }
            
            :is(.overlay-legend, .eye-age-callout) { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
            .skin-age-badge { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
            .skin-age-badge { width: 60px; height: 60px; padding: 4px; border-width: 2px; }

            .photo-card.camera-active.camera-portrait { width: 100%; aspect-ratio: 3 / 4; min-height: 0; }

            .result-card { flex: none; display: block; border-radius: 20px; }
            .result-tab-panels { flex: none; overflow: visible; max-height: none; padding-top: 14px; }

            .result-title { font-size: 19px; }

            .skin-report-advanced-card-text { font-size: 14px; }
            .skin-report-advanced-concern-text { font-size: 14px; }

            .tab-panel { font-size: 15.5px; line-height: 1.5; }
            .summary-box { font-size: 15.5px; line-height: 1.52; }

            .skin-report-stat-value { font-size: 27px; }
            .skin-report-hero { gap: 16px; }
            .skin-radar-label-name { font-size: 38px; }
            .skin-radar-label-value { font-size: 36px; }
            .skin-zone-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

            .upload-btn-wrap {
                display: flex; flex-direction: column; width: 100%; gap: 10px;
                overflow: visible;
            }
            .upload-btn-wrap > * { flex: none; width: 100%; }

            .photo-source-actions {
                display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%;
            }
            .photo-source-actions button.btn-primary, .photo-source-actions button.btn-secondary {
                width: 100%; min-width: 0; min-height: 46px;
                padding: 6px 5px; font-size: var(--photo-action-font, 12px); line-height: 1.2; letter-spacing: 0;
                white-space: normal; word-break: normal; overflow-wrap: anywhere;
                -webkit-hyphens: auto; hyphens: auto;
                text-align: center;
            }

            .photo-view-actions { width: 100%; }
            .photo-view-actions .photo-view-toggle {
                width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
            }
            .photo-view-actions .view-toggle-btn {
                min-width: 0; padding: 8px 6px; font-size: 12.5px;
            }

            .magnifier-toggle-btn { display: none !important; }

            .photo-column { display: flex; flex-direction: column; align-items: stretch; gap: 10px; position: relative; }
            .photo-controls-wrap, .upload-btn-wrap { display: contents; }
            .upload-btn-wrap[hidden] { display: none; }
            .photo-source-actions { order: -1; }
            .photo-card { order: 0; }
            .photo-view-actions { order: 1; }
            .feature-region-picker { order: 2; }

            .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-placeholder { padding-bottom: 120px; }
            .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-source-actions {
                position: absolute; z-index: 4; left: 50%; top: calc(50% + 24px); transform: translateX(-50%);
                display: flex; justify-content: center; gap: 10px; width: max-content; max-width: calc(100% - 32px);
            }
            .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-source-actions button.btn-primary {
                width: auto; min-width: 0; min-height: 40px; padding: 9px 20px;
                font-size: 13px; white-space: nowrap;
            }
            .photo-column:has(.photo-card:not(.has-image)) #button_download_pdf,
            .photo-column:has(.photo-card:not(.has-image)) .photo-view-actions { display: none; }

            body:has(.photo-card:not(.has-image)) .feature-bottom-bar { display: none; }
            body:has(.photo-card:not(.has-image)) { padding-bottom: 0; }

            .result-card { display: flex; flex-direction: column; }

            body:has(.photo-card.has-image) .result-card {
                background: none; border: none; box-shadow: none; border-radius: 0; padding: 0; gap: 12px;
            }
            body:has(.photo-card.has-image) .result-card .overall-summary {
                order: 1; margin: 0; padding: 16px 18px;
                background: var(--result-bg); border: 1px solid var(--result-border); border-radius: 20px;
                box-shadow: var(--shadow-card);
            }
            body:has(.photo-card.has-image) .result-card-body {
                order: 3; display: block; padding: 20px 22px;
                background: var(--result-bg); border: 1px solid var(--result-border); border-radius: 20px;
                box-shadow: var(--shadow-card);
            }

            .result-tabs {
                position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;
                width: auto; margin: 0 -22px; padding: 8px 22px;
                background: var(--result-bg);
            }
            .result-tab { max-width: 10em; min-height: 44px; padding: 6px 16px; font-size: 13px; }
        }

        .lang-switch-wrap { position: relative; flex: none; }
        .lang-switch-btn {
            flex: none; display: inline-flex; align-items: center; gap: 5px;
            padding: 7px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
            background: rgba(var(--accent-rgb), 0.14); color: var(--color-on-dark); border: 1px solid var(--color-primary-light);
            border-radius: 999px;
        }
        .lang-switch-btn:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.26); border-color: var(--color-primary-light); }
        .lang-switch-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .lang-switch-icon { width: 14px; height: 14px; flex: none; opacity: 0.9; }

        .lang-switch-dropdown {
            position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
            background: var(--result-surface); border: 1px solid var(--result-border);
            border-radius: var(--radius-md); box-shadow: var(--shadow-card);
            padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 130px;
        }
        .lang-switch-dropdown[hidden] { display: none; }
        .lang-switch-option {
            padding: 9px 14px; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
            background: transparent; color: var(--result-text); border: none;
            border-radius: var(--radius-sm);
        }
        .lang-switch-option:hover { background: var(--result-surface-hover); color: var(--result-primary); }

        .app-header-actions > :first-child { margin-left: auto; }
        .cost-btn-icon { width: 14px; height: 14px; flex: none; opacity: 0.9; }

        .changelog-btn {
            flex: none; display: inline-flex; align-items: center; gap: 6px;
            padding: 7px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
            background: rgba(var(--wash-rgb), 0.06); color: var(--color-on-dark); border: 1px solid var(--color-dark-border);
            border-radius: 999px;
        }
        .changelog-btn:hover { background: rgba(var(--wash-rgb), 0.12); }
        .changelog-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .changelog-btn[hidden] { display: none; }  
        .auth-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
        .auth-avatar[hidden] { display: none; }
        .auth-signin-icon { display: none; width: 16px; height: 16px; flex: none; }
        .auth-btn-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        
        .cost-modal.auth-modal {
            max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
            border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.28); padding: 28px 30px 26px;
        }
        .auth-modal .cost-modal-header { align-items: flex-start; gap: 16px; margin-bottom: 14px; font-size: 20px; line-height: 24px; letter-spacing: -0.01em; }
        .auth-modal-x {
            flex: none; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
            border-radius: 50%; border: 1px solid var(--color-dark-border); background: none; color: var(--color-on-dark-muted);
        }
        .auth-modal-x:hover { background: rgba(var(--wash-rgb), 0.06); color: var(--color-on-dark); }
        .auth-modal-x svg { width: 16px; height: 16px; }
        #auth_view_signed_out { gap: 0; }
        .auth-desc, .auth-unlock-note { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--color-on-dark-muted); }
        .auth-unlock-note { color: var(--color-on-dark); }
        .auth-unlock-note[hidden] { display: none; }
        .auth-sso { display: grid; gap: 10px; margin: 8px 0 16px; }
        .auth-sso-btn {
            display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 16px;
            border-radius: 999px; border: 1px solid var(--color-dark-border); background: rgba(var(--wash-rgb), 0.02);
            color: var(--color-on-dark); font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer;
        }
        .auth-sso-btn:hover { background: rgba(var(--wash-rgb), 0.05); }
        .auth-fine { margin: 0; font-size: 12px; line-height: 16px; color: var(--color-on-dark-muted); }
        .auth-fine a { color: var(--color-on-dark); text-decoration: underline; }
        @media (max-width: 600px) { .cost-modal.auth-modal { padding: 22px 20px; } }
        .auth-view { display: flex; flex-direction: column; gap: 10px; }
        .auth-view[hidden] { display: none; }
        .auth-provider-btn { justify-content: center; padding: 11px 16px; font-size: 14px; }
        .auth-provider-btn svg { width: 18px; height: 18px; flex: none; }
        
        .account-menu-wrap { position: relative; display: flex; }
        .account-menu {
            position: absolute; right: 0; top: calc(100% + 8px); z-index: 450; min-width: 220px; padding: 6px;
            background: var(--chrome-bg); border: 1px solid var(--color-dark-border); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,0.14);
        }
        .account-menu[hidden] { display: none; }
        .account-menu-head { padding: 10px 12px 8px; font-size: 12px; line-height: 16px; color: var(--color-on-dark-muted); }
        .account-menu-head b { display: block; color: var(--color-on-dark); font-size: 14px; line-height: 20px; word-break: break-all; }
        .account-menu-sep { height: 1px; background: var(--color-dark-border); margin: 6px 4px; }
        .account-menu-item {
            display: flex; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px;
            background: none; color: var(--color-on-dark); font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: start; cursor: pointer;
        }
        .account-menu-item:hover, .account-menu-item:focus-visible { background: rgba(var(--wash-rgb), 0.06); outline: none; }

        
        .account-view { z-index: 401; --account-danger: #f08a7a; --account-ok: #8fc46b; --account-warn: #e39a6f; }
        :root[data-theme="linen"] .account-view { --account-danger: #a8402f; --account-ok: #4f6b3a; --account-warn: #b0532a; }
        body.account-view-open { overflow: hidden !important; }
        .account-page { max-width: 1120px; margin: 0 auto; padding: clamp(28px, 4vw, 56px) 40px clamp(70px, 8vw, 110px); }
        .account-title { color: var(--home-ink); font-size: 40px; line-height: 46px; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 16px; }
        .account-tabs {
            display: inline-flex; flex-wrap: wrap; margin: 34px 0 26px; padding: 4px; border-radius: 999px;
            background: rgba(var(--wash-rgb), 0.06); border: 1px solid var(--home-line);
        }
        .account-tabs button {
            min-height: 36px; padding: 8px 14px; border: 0; border-radius: 999px; background: none; cursor: pointer;
            color: var(--home-muted); font: inherit; font-size: 12px; line-height: 15px; font-weight: 600; letter-spacing: -0.01em;
        }
        .account-tabs button.is-on { background: var(--home-panel); color: var(--home-ink); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
        .account-panel[hidden] { display: none; }
        .account-table-wrap { overflow-x: auto; margin-top: 8px; border: 1px solid var(--home-line); border-radius: 12px; }
        .account-table { width: 100%; min-width: 520px; border-collapse: collapse; }
        .account-table th, .account-table td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--home-line); color: var(--home-ink); font-size: 14px; line-height: 20px; }
        .account-table th { font-size: 12px; font-weight: 800; color: var(--home-muted); background: rgba(var(--wash-rgb), 0.03); }
        .account-table tr:last-child td { border-bottom: 0; }
        .account-link-btn {
            padding: 0; border: 0; background: none; cursor: pointer;
            color: var(--home-ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
        }
        .account-link-btn:disabled { cursor: default; }
        .account-note { margin: 14px 0 0; color: var(--home-muted); font-size: 13px; line-height: 1.8; }
        .account-kv {
            display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px 20px; margin: 0; padding: 22px 24px;
            background: var(--home-panel); border: 1px solid var(--home-line); border-radius: 16px; color: var(--home-ink); font-size: 14px; line-height: 20px;
        }
        .account-kv dt { color: var(--home-muted); }
        .account-kv dd { margin: 0; word-break: break-all; }
        .account-danger-zone { margin-top: 26px; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--account-danger) 40%, var(--home-line)); border-radius: 16px; }
        .account-danger-zone h3 { margin: 0 0 6px; color: var(--account-danger); font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.01em; }
        .account-danger-zone p { margin: 0 0 16px; color: var(--home-muted); font-size: 14px; line-height: 20px; }
        .account-danger-btn {
            display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
            background: var(--account-danger); color: #fff; font: inherit; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em;
        }
        
        .account-view .history-item { gap: 20px; padding: 18px; background: var(--home-panel); border-color: var(--home-line); color: var(--home-ink); }
        .account-view .history-item-thumb { border-color: var(--home-line); border-radius: 10px; }
        .account-view .history-item-body { gap: 6px; }
        .account-view .history-item-title { font-size: 20px; line-height: 24px; letter-spacing: -0.01em; color: var(--home-ink); }
        .account-view .history-item-lines { gap: 2px; font-size: 14px; line-height: 20px; color: var(--home-muted); }
        .account-view .history-item-lines .is-warning { color: var(--account-warn); font-weight: 600; }
        
        .account-view .history-item-lines .is-note { margin-top: 6px; color: var(--home-ink); }
        .account-view .history-badge { padding: 4px 9px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--home-ink); background: rgba(var(--wash-rgb), 0.06); }
        .account-view .history-badge.is-unlocked { color: var(--account-ok); }
        .account-view .history-badge.is-failed { color: var(--account-danger); }
        .account-view .history-badge.is-expired { color: var(--home-muted); background: transparent; border-color: var(--home-line); }
        .account-view .history-btn {
            min-height: 36px; padding: 7px 14px; font-size: 12px; line-height: 15px; font-weight: 600; letter-spacing: -0.01em;
            color: var(--home-ink); background: rgba(var(--wash-rgb), 0.06); border-color: var(--home-line);
        }
        .account-view .history-btn:hover:not(:disabled) { background: rgba(var(--wash-rgb), 0.12); border-color: var(--home-line); }
        .account-view .history-btn.is-primary { color: var(--on-accent); background: var(--accent-fill); border-color: transparent; }
        .account-view .history-btn.is-primary:hover:not(:disabled) { background: var(--accent-fill-hover); }
        .account-view .history-btn.is-danger { color: var(--account-danger); }
        .account-delete-modal { max-width: 400px; }
        .account-delete-body { display: flex; align-items: flex-start; gap: 12px; }
        .account-delete-body p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--color-on-dark-muted); }
        .account-delete-icon {
            flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
            color: var(--score-red); background: color-mix(in srgb, var(--score-red) 15%, transparent);
        }
        .account-delete-icon svg { width: 20px; height: 20px; }
        .account-delete-error { margin: 12px 0 0; font-size: 12.5px; font-weight: 600; color: var(--score-red); }
        .account-delete-error[hidden] { display: none; }
        .account-delete-modal .settings-modal-footer { justify-content: flex-end; }
        .account-delete-modal .account-danger-btn { --account-danger: var(--score-red); min-height: 40px; padding: 9px 20px; }
        .account-delete-modal button:disabled { opacity: 0.5; cursor: not-allowed; }
        .account-toast {
            position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); z-index: 600; transform: translateX(-50%);
            padding: 10px 18px; border-radius: 999px; background: var(--color-on-dark); color: var(--chrome-bg);
            font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
        }
        .account-toast[hidden] { display: none; }
        @media (max-width: 820px) {
            .account-page { padding-left: 20px; padding-right: 20px; }
            .account-title { font-size: 30px; line-height: 36px; }
        }
        @media (max-width: 600px) {
            .account-kv { grid-template-columns: 1fr; }
            .account-view .history-item { gap: 12px 14px; padding: 14px; }
        }
        .auth-status-text { font-size: 14px; color: var(--color-on-dark); text-align: center; padding: 8px 0; }
        .auth-error-text { font-size: 13px; line-height: 1.5; color: var(--color-on-dark); }
        .auth-error-code { font-size: 12px; color: var(--color-on-dark-muted); font-family: ui-monospace, monospace; word-break: break-all; }
        .buy-credits-modal { max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; }
        .buy-credits-actions { display: flex; gap: 8px; }
        .buy-credits-actions .changelog-btn { flex: 1; justify-content: center; padding: 11px 16px; font-size: 14px; }
        .buy-credits-stripe-target { min-height: 40px; }
        .buy-credits-stripe-target[hidden] { display: none; }
        #buy_credits_embedded_checkout { background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
        .buy-credits-us-billing { display: flex; flex-direction: column; gap: 10px; }
        .buy-credits-us-billing[hidden] { display: none; }
        .buy-credits-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .buy-credits-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--color-on-dark); }
        .buy-credits-field input {
            min-height: 42px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 400; color: var(--color-on-dark);
            background: rgba(var(--wash-rgb), 0.04); border: 1px solid var(--color-dark-border); border-radius: var(--radius-sm); outline: none;
        }
        .buy-credits-field input:focus-visible { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(var(--wash-rgb), 0.12); }
        .buy-credits-field-hint { margin-top: -4px; font-size: 12px; color: var(--color-on-dark-muted); }
        .buy-credits-field-error { font-size: 12px; color: #ef6b6b; }
        .buy-credits-field-error:empty { display: none; }
        .buy-credits-summary {
            display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
            background: rgba(var(--wash-rgb), 0.04); border: 1px solid var(--color-dark-border); border-radius: var(--radius-sm);
        }
        .buy-credits-summary[hidden] { display: none; }
        .buy-credits-totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 13px; color: var(--color-on-dark-muted); }
        .buy-credits-totals[hidden] { display: none; }
        .buy-credits-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--color-on-dark); }
        .buy-credits-totals .is-total { font-weight: 700; color: var(--color-on-dark); }
        .buy-credits-totals.is-total-row { padding-top: 10px; border-top: 1px solid var(--color-dark-border); }
        
        .buy-credits-promo [hidden] { display: none; }
        .buy-credits-promo-add { align-self: flex-start; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: rgba(var(--wash-rgb), 0.08); color: var(--color-on-dark); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
        .buy-credits-promo-field { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 12px; border: 1px solid var(--color-dark-border); border-radius: 6px; background: rgba(var(--wash-rgb), 0.04); }
        .buy-credits-promo-field:focus-within { border-color: var(--color-on-dark); }
        .buy-credits-promo-field.is-err { border-color: #ef6b6b; }
        .buy-credits-promo-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--color-on-dark); font: inherit; font-size: 14px; outline: none; text-transform: uppercase; }
        .buy-credits-promo-input::placeholder { text-transform: none; color: var(--color-on-dark-muted); }
        .buy-credits-promo-apply { min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--color-on-dark); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
        .buy-credits-promo-err { margin: 6px 0 0; font-size: 12px; line-height: 16px; color: #ef6b6b; }
        .buy-credits-promo-err:empty { display: none; }
        .buy-credits-promo-on { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; font-size: 14px; line-height: 20px; color: var(--color-on-dark); }
        .buy-credits-promo-on small { display: block; margin-top: 4px; font-size: 12px; color: var(--color-on-dark-muted); font-weight: 500; }
        .buy-credits-promo-discount { padding-top: 6px; color: var(--color-on-dark-muted); font-variant-numeric: tabular-nums; }
        .buy-credits-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 2px 2px 10px; border-radius: 6px; background: rgba(var(--wash-rgb), 0.08); font-size: 13px; font-weight: 700; color: var(--color-on-dark); }
        .buy-credits-chip > svg { width: 14px; height: 14px; color: var(--color-on-dark-muted); }
        .buy-credits-chip-x { width: 28px; height: 28px; border: 0; border-radius: 4px; background: none; color: var(--color-on-dark-muted); cursor: pointer; display: grid; place-items: center; }
        .buy-credits-chip-x svg { width: 14px; height: 14px; }
        .buy-credits-promo-apply:disabled, .buy-credits-chip-x:disabled { opacity: .5; cursor: default; }
        .buy-credits-checkout-error { font-size: 13px; color: #ef6b6b; }
        .buy-credits-checkout-error:empty { display: none; }
        
        .buy-credits-ack { margin: 14px 0 4px; text-align: center; font-size: 12.5px; line-height: 1.55; color: var(--color-text-muted); }
        .buy-credits-ack:empty { display: none; }
        .buy-credits-ack-link { background: none; border: 0; padding: 0; font: inherit; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
        
        #legal_disclaimer_overlay { z-index: 510; }
        #buy_credits_status_text.is-error { color: #ef6b6b; }

        
        .history-list { display: flex; flex-direction: column; gap: 12px; }
        .history-item {
            display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 18px;
            padding: 16px 18px; color: var(--color-on-dark); background: rgba(var(--wash-rgb), 0.04);
            border: 1px solid var(--color-dark-border); border-radius: 16px;
        }
        .history-item.is-busy { opacity: 0.5; pointer-events: none; }
        .history-item-thumb {
            width: 76px; height: 76px; border-radius: 12px; object-fit: cover;
            background: rgba(var(--wash-rgb), 0.08); border: 1px solid var(--color-dark-border);
            display: flex; align-items: center; justify-content: center; color: var(--color-on-dark-muted);
        }
        
        img.history-item-thumb { object-fit: contain; background: #000; }
        .history-item-thumb svg { width: 28px; height: 28px; }
        .history-item-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
        .history-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
        .history-item-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; }
        .history-badge {
            padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
            color: var(--color-on-dark); background: rgba(var(--wash-rgb), 0.08);
        }
        .history-badge.is-unlocked { color: var(--result-primary); }
        .history-badge.is-expired { color: var(--color-on-dark-muted); background: transparent; border: 1px dashed var(--color-dark-border); }
        .history-badge.is-failed { color: var(--score-red); }
        .history-item-lines { display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.45; color: var(--color-on-dark-muted); font-variant-numeric: tabular-nums; }
        .history-item-lines p { margin: 0; }
        .history-item-lines p[hidden] { display: none; }
        .history-item-lines .is-warning { color: var(--history-warn); font-weight: 700; }
        .history-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
        .history-btn {
            padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
            color: var(--color-on-dark); background: rgba(var(--wash-rgb), 0.06); border: 1px solid var(--color-dark-border);
            transition: border-color 0.15s, background 0.15s;
        }
        .history-btn:hover:not(:disabled) { border-color: var(--result-primary); background: var(--result-surface-hover); }
        .history-btn:focus-visible { outline: 2px solid var(--result-primary); outline-offset: 2px; }
        .history-btn:disabled { cursor: default; opacity: 0.45; }
        .history-btn.is-primary { color: var(--on-accent); background: var(--accent-fill); border-color: var(--accent-fill); }
        .history-btn.is-primary:hover:not(:disabled) { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
        .history-btn.is-danger { color: var(--score-red); }
        
        @media (max-width: 600px) {
            .history-item { grid-template-columns: 56px minmax(0, 1fr); gap: 12px 14px; padding: 14px; }
            .history-item-thumb { width: 56px; height: 56px; align-self: start; }
            .history-item-title { font-size: 16px; }
            .history-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
        }
        .history-skeleton {
            height: 90px; border-radius: 14px; border: 1px solid var(--color-dark-border);
            background: linear-gradient(90deg, rgba(var(--wash-rgb), 0.03), rgba(var(--wash-rgb), 0.09), rgba(var(--wash-rgb), 0.03));
            background-size: 200% 100%; animation: history-shimmer 1.2s ease-in-out infinite;
        }
        @keyframes history-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
        @media (prefers-reduced-motion: reduce) { .history-skeleton { animation: none; } }
        .history-empty {
            display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 12px;
            color: var(--color-on-dark-muted); font-size: 14px; text-align: center;
        }
        .history-empty svg { width: 40px; height: 40px; opacity: 0.6; }
        .history-empty strong { font-size: 16px; color: var(--color-on-dark); }
        .history-empty span { max-width: 32em; line-height: 1.5; }
        .history-empty .btn-primary { margin-top: 6px; }
        .history-status { margin-top: 12px; font-size: 13px; color: var(--color-on-dark-muted); text-align: center; }
        .history-status:empty { display: none; }

        .header-toggle-label {
            flex: none; font-size: 11px; font-weight: 600; color: var(--color-on-dark-muted);
            margin-right: 4px;
        }

        .cost-modal-overlay {
            position: fixed; inset: 0; z-index: 500;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
            display: flex; align-items: center; justify-content: center;
            padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
                     max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
            
            overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
        }
        .cost-modal-overlay[hidden] { display: none; }
        .cost-modal {
            
            margin: auto;
            width: 100%; max-width: 520px;
            background: var(--chrome-bg); border: 1px solid var(--color-dark-border); border-radius: var(--radius-md);
            box-shadow: var(--shadow-card); padding: 20px;
        }
        .cost-modal-header {
            display: flex; align-items: center; justify-content: space-between;
            font-size: 16px; font-weight: 700; color: var(--color-on-dark); margin-bottom: 16px;
        }
        .cost-modal-close {
            flex: none; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
            font-size: 18px; line-height: 1; cursor: pointer;
            background: transparent; color: var(--color-on-dark-muted); border: none; border-radius: 999px;
        }
        .cost-modal-close:hover { background: rgba(var(--wash-rgb), 0.08); color: var(--color-on-dark); }
        .cost-modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
        .cost-modal-stat {
            display: flex; flex-direction: column; gap: 4px;
            padding: 12px 14px; background: rgba(var(--wash-rgb), 0.04); border: 1px solid var(--color-dark-border);
            border-radius: var(--radius-sm);
        }
        .cost-modal-stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--color-on-dark-muted); }
        .cost-modal-stat-value { font-size: 20px; font-weight: 700; color: var(--color-on-dark); font-variant-numeric: tabular-nums; }

        .restore-loading-card {
            display: flex; flex-direction: column; align-items: center; gap: 14px;
            padding: 28px 36px;
            background: var(--chrome-bg); border: 1px solid var(--color-dark-border); border-radius: var(--radius-md);
            box-shadow: var(--shadow-card);
        }
        .restore-loading-spinner {
            width: 30px; height: 30px; border-radius: 50%; flex: none;
            border: 3px solid rgba(var(--wash-rgb), 0.15); border-top-color: var(--result-primary);
            animation: restore-loading-spin 0.8s linear infinite;
        }
        @keyframes restore-loading-spin { to { transform: rotate(360deg); } }
        .restore-loading-text { color: var(--color-on-dark); font-size: 14px; font-weight: 600; text-align: center; }
        
        #restore_loading_overlay.is-payment-return { background: var(--color-bg); backdrop-filter: none; }
        body:has(#buy_credits_modal_overlay:not([hidden])) #restore_loading_overlay.is-payment-return .restore-loading-card,
        body:has(#survey_answer_modal_overlay:not([hidden])) #restore_loading_overlay.is-payment-return .restore-loading-card { visibility: hidden; }

        .home-view {
            position: fixed; top: 0; left: 0; right: 0; z-index: 400;
            height: 100vh; height: 100dvh;
            background: var(--color-bg);
            padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
            overflow-y: auto;
            overscroll-behavior: contain;
            padding-top: max(var(--app-header-height, 70px), calc(env(safe-area-inset-top, 0px) + 56px));
            box-sizing: border-box;
        }
        .home-view[hidden] { display: none; }
        body.home-view-open, body.pricing-view-open { overflow: hidden !important; }
        body.home-view-open .feature-strip-wrap,
        body.home-view-open .app-main { display: none; }
        .home-hero {
            max-width: 1360px; margin: 0 auto; width: 100%;
            padding: 48px 40px 40px;
            display: grid;
            grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
            gap: clamp(40px, 5vw, 72px);
            align-items: center;
        }
        .home-hero-copy { min-width: 0; }
        .home-eyebrow {
            font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
            color: var(--result-primary); margin: 0 0 18px; display: flex; align-items: center; gap: 8px;
        }
        .home-eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--result-primary); flex: none; }
        .home-hero h1 {
            font-size: clamp(28px, 3.2vw, 44px); line-height: 1.32; font-weight: 800; margin: 0 0 20px;
            color: var(--result-text); text-wrap: balance;
        }
        .home-headline-mobile-break { display: none; }
        @media (max-width: 640px) {
            .home-headline-comma { display: none; }
            .home-headline-mobile-break { display: block; }
        }
        .home-intro {
            font-size: 16px; line-height: 1.85; color: var(--result-text-secondary);
            margin: 0 0 26px; max-width: 660px; text-wrap: pretty;
        }
        .home-cta {
            display: inline-flex; align-items: center; gap: 8px;
            background: var(--accent-fill); color: var(--on-accent); font-weight: 700; font-size: 15px;
            border: none; border-radius: 999px; padding: 15px 30px; cursor: pointer;
            box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.32);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        .home-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(var(--accent-rgb), 0.42); }
        .home-cta svg { width: 16px; height: 16px; flex: none; }
        .home-trust-row {
            display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px;
            font-size: 13px; color: var(--result-text-muted);
        }
        .home-trust-row span { display: inline-flex; align-items: center; gap: 6px; }
        .home-trust-row svg { width: 16px; height: 16px; flex: none; color: var(--result-primary); }

        .home-hero-photo {
            margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--result-bg);
            aspect-ratio: 3 / 4; width: min(100%, 380px); justify-self: end;
            box-shadow: var(--shadow-card); position: relative;
        }
        .home-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .home-hero-photo-mask { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; pointer-events: none; }

        .home-preview-section { max-width: 1360px; margin: 0 auto; width: 100%; padding: 8px 40px 24px; }
        .home-preview-title {
            font-size: 20px; font-weight: 700; color: var(--result-text); margin: 0 0 18px;
            text-align: center;
        }
        .home-preview-grid {
            display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
        }
        .home-preview-item {
            flex: 0 0 calc((100% - 40px) / 5);
            
            display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px;
            padding: 20px 16px; border-radius: var(--radius-sm); background: rgba(var(--wash-rgb), 0.03);
            border: 1px solid var(--result-border);
            font-family: var(--font-sans);
            min-width: 0;
        }
        .home-preview-item svg { width: 34px; height: 34px; color: var(--result-primary); flex: none; }
        .home-preview-item span { font-size: 17px; font-weight: 700; color: var(--result-text-secondary); text-align: start; line-height: 1.3; min-width: 0; overflow-wrap: break-word; }
        .home-preview-item .home-preview-paren { display: inline-block; max-width: 100%; }
        @media (min-width: 901px) and (max-width: 1200px) {
            .home-preview-item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 12px; }
            .home-preview-item span { font-size: 15px; }
        }

        .home-value-section { max-width: 1360px; margin: 0 auto; width: 100%; padding: 16px 40px 80px; }
        .home-value-section h2 {
            text-align: center; font-size: 21px; font-weight: 700; color: var(--result-text);
            margin: 0 0 32px; text-wrap: balance;
        }
        .home-value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
        .home-value-card {
            background: var(--result-surface); border: 1px solid var(--result-border); border-radius: var(--radius-md);
            padding: 24px; display: flex; gap: 16px; align-items: flex-start;
        }
        .home-value-icon {
            width: 38px; height: 38px; flex: none; border-radius: 10px;
            background: var(--result-primary-tint); color: var(--result-primary);
            display: flex; align-items: center; justify-content: center;
        }
        .home-value-icon svg { width: 20px; height: 20px; }
        .home-value-card h3 { font-size: 15.5px; font-weight: 700; color: var(--result-text); margin: 0 0 5px; }
        .home-value-card p { font-size: 13px; color: var(--result-text-muted); margin: 0; line-height: 1.65; }

        @media (max-width: 900px) {
            .home-hero { grid-template-columns: 1fr; padding-top: 28px; gap: 32px; }
            .home-hero-photo { width: 100%; max-width: 420px; margin: 0 auto; justify-self: center; }
            .home-value-grid { grid-template-columns: 1fr; }
            .home-preview-item { flex-basis: calc((100% - 30px) / 4); flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 10px; }
            .home-preview-item svg { width: 30px; height: 30px; }
            .home-preview-item span { font-size: 14px; }
            
            .home-hero-copy { text-align: center; }
            .home-eyebrow, .home-trust-row { justify-content: center; }
        }
        @media (max-width: 640px) {
            .home-preview-item { flex-basis: calc((100% - 20px) / 3); }
            .home-preview-item svg { width: 28px; height: 28px; }
            .home-preview-item span { font-size: 13px; }
            
            .home-hero, .home-preview-section, .home-value-section { padding-left: 20px; padding-right: 20px; }
        }
        @media (max-width: 820px) {
            .home-preview-item { align-items: center; }
            .home-preview-item span { text-align: center; }
            .home-eyebrow::before { display: none; }
        }
        .home-bottom-cta { display: none; }
        @media (max-width: 820px) {
            .home-value-section { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
            .home-bottom-cta { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 28px; }
            .home-bottom-cta-title { font-size: 17px; font-weight: 700; color: var(--result-text); margin: 0 0 6px; text-wrap: balance; }
            .home-bottom-cta-note { font-size: 13px; color: var(--result-text-muted); margin: 0 0 16px; }
        }

        .skin-feel-note {
            margin: 10px 0 0; padding: 8px 12px; font-size: 12.5px; line-height: 1.6; color: var(--result-text-secondary);
            border-left: 3px solid var(--result-primary); background: rgba(var(--wash-rgb), 0.04); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        }
        .skin-indicator-intro { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.6; color: var(--result-text-muted); }
        
        .skin-indicator-section { container-type: inline-size; }
        .skin-indicator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
        .skin-indicator-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
        @container (max-width: 520px) {
            .skin-indicator-grid { grid-template-columns: minmax(0, 1fr); }
            
            .skin-indicator-grid { display: flex; flex-direction: column; align-items: stretch; }
            .skin-indicator-col { display: contents; }
        }
        .skin-indicator-group { margin: 0; padding: 12px 14px; border: 1px solid var(--result-border); border-radius: var(--radius-sm); background: rgba(var(--wash-rgb), 0.03); }
        .skin-indicator-group h4 { margin: 0 0 6px; font-size: 14px; color: var(--result-text); }
        .skin-indicator-group dl { margin: 0; }
        .skin-indicator-group dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--result-border); font-size: 13px; }
        .skin-indicator-group dt { color: var(--result-text-secondary); min-width: 0; }
        .skin-indicator-group dd { margin: 0; white-space: nowrap; font-weight: 700; color: var(--result-text); font-variant-numeric: tabular-nums; }
        
        .skin-indicator-group dl > div.band-lock { cursor: pointer; }
        .skin-indicator-group dl > div.band-lock:hover dt, .skin-indicator-group dl > div.band-lock:focus-visible dt { color: var(--result-primary); }
        .skin-indicator-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--result-text-muted) !important; }
        .skin-indicator-locked svg { width: 13px; height: 13px; color: var(--result-primary); }

        .analyze-only { display: none; }
        body.analyze-view-open .analyze-only { display: block; }
        body.analyze-view-open .feature-strip-wrap,
        body.analyze-view-open .results-column,
        body.analyze-view-open .feature-bottom-bar,
        body.analyze-view-open #button_download_pdf,
        body.analyze-view-open .photo-view-actions,
        body.analyze-view-open .feature-region-picker { display: none !important; }
        body.analyze-view-open .app-main {
            display: block; max-width: 560px;
            padding-top: 20px; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
        }
        body.analyze-view-open .photo-column { width: 100%; }
        body.analyze-view-open .photo-source-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        #button_retake_upload { display: none; }
        body:not(.analyze-view-open) .photo-column:has(.photo-card.has-image) #button_retake_upload { display: inline-flex; }
        body:not(.analyze-view-open) .photo-column:has(.photo-card.has-image) :is(#button_load_photo, #button_take_photo) { display: none; }
        body:not(.analyze-view-open) .photo-column:has(.photo-card.has-image) .photo-source-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        @media (min-width: 821px) {
            body.analyze-view-open .photo-card:not(.has-image):not(.camera-active) { max-height: min(52vh, 480px); }
            body.analyze-view-open { height: auto; min-height: 100dvh; overflow-y: auto; }
        }
        body.analyze-view-open .photo-card.has-image:not(.camera-active) {
            width: 100%; height: clamp(320px, 56vh, 480px); min-height: 0; max-height: none;
            aspect-ratio: auto;
        }
        body.analyze-view-open .photo-card.has-image #result_canvas_display { max-width: 100%; max-height: 100%; }
        .upload-preview {
            position: absolute; inset: 0; z-index: 6;
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
            padding: 20px; border-radius: inherit; background: var(--result-surface);
        }
        .upload-preview[hidden] { display: none; }
        .upload-preview img, .upload-preview canvas {
            display: block; min-height: 0; max-width: 100%; max-height: calc(100% - 64px);
            object-fit: contain; border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
        }
        
        .upload-preview img[hidden] { display: none; }
        .upload-preview-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
        .upload-preview-actions button { width: auto; min-width: 0; min-height: 44px; padding: 11px 24px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
        .photo-column:has(.upload-preview:not([hidden])) .photo-source-actions { display: none !important; }
        .photo-column:has(.upload-preview:not([hidden])) .photo-placeholder { visibility: hidden; }
        .analyze-view-head { margin-bottom: 14px; }
        .analyze-back-link {
            background: none; border: none; padding: 4px 0; margin: 0 0 8px; cursor: pointer;
            font: inherit; font-size: 13px; font-weight: 600; color: var(--result-text-muted);
        }
        .analyze-back-link:hover { color: var(--result-text); }
        .analyze-title { font-size: 20px; font-weight: 700; color: var(--result-text); margin: 0; line-height: 1.35; }
        .analyze-view-foot { margin-top: 16px; }
        .analyze-photo-guide {
            padding: 14px 16px; border-radius: var(--radius-sm);
            background: rgba(var(--wash-rgb), 0.03); border: 1px solid var(--result-border);
        }
        .analyze-photo-guide strong { display: block; font-size: 13.5px; color: var(--result-text); margin-bottom: 6px; }
        .analyze-photo-guide ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.55; color: var(--result-text-secondary); }
        .analyze-photo-guide li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; }
        .analyze-photo-guide li svg { width: 18px; height: 18px; margin-top: 1px; color: var(--result-primary); }
        .analyze-subtitle { margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--result-text-muted); }
        
        @media (min-width: 821px) {
            body.analyze-view-open .app-main {
                display: grid; max-width: 1040px; align-items: start; align-content: start;
                grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 24px;
            }
            body.analyze-view-open .analyze-view-head { grid-column: 1 / -1; }
            
            body.analyze-view-open .analyze-view-head { margin-bottom: 26px; }
            body.analyze-view-open .analyze-title { font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: -0.01em; }
            body.analyze-view-open .analyze-subtitle { margin-top: 12px; font-size: 15px; }
            body.analyze-view-open .analyze-view-foot { margin-top: 0; align-self: stretch; display: flex; }
            body.analyze-view-open .photo-card:not(.has-image):not(.camera-active) {
                height: clamp(340px, 46vh, 420px); max-height: none;
                background: var(--result-surface); box-shadow: none;
                border: 1.5px dashed color-mix(in srgb, var(--result-primary) 45%, transparent);
            }
            body.analyze-view-open .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) { position: relative; }
            body.analyze-view-open .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-placeholder { padding-bottom: 104px; }
            body.analyze-view-open .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-controls-wrap {
                position: absolute; z-index: 4; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); margin-top: 0;
            }
            body.analyze-view-open .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-source-actions {
                display: flex; justify-content: center; gap: 10px; width: max-content;
            }
            body.analyze-view-open .photo-column:has(.photo-card:not(.has-image):not(.camera-active)) .photo-source-actions button.btn-primary {
                width: auto; min-width: 0; min-height: 44px; padding: 11px 26px; white-space: nowrap;
            }
            .analyze-photo-guide { flex: 1; display: flex; flex-direction: column; padding: 26px 28px; border-radius: var(--radius-md); background: var(--result-surface); }
            .analyze-photo-guide strong { font-size: 18px; margin-bottom: 14px; }
            
            .analyze-photo-guide ul { flex: 1; justify-content: space-evenly; gap: 12px; font-size: 14.5px; }
        }
        @media (max-width: 820px) {
            body.analyze-view-open { padding-bottom: 0; }
            body.analyze-view-open .app-main { padding-top: 16px; }
            body.analyze-view-open .photo-column { margin-bottom: 0; }
            body.analyze-view-open .photo-source-actions { order: 1; }
            .analyze-title { font-size: 18px; }
        }

        .consent-modal:focus { outline: none; }
        .consent-modal { max-width: 600px; max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; }
        .consent-box { position: relative; flex: 1 1 auto; min-height: 150px; max-height: 300px; display: flex; border: 1px solid var(--color-dark-border); border-radius: 16px; background: rgba(var(--wash-rgb), 0.03); overflow: hidden; }
        .consent-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 20px; scrollbar-width: thin; }
        .consent-scroll:focus-visible { outline: 2px solid var(--result-primary); outline-offset: -2px; border-radius: 16px; }
        .consent-scroll p { margin: 0 0 14px; font-size: 14px; line-height: 22px; color: var(--color-on-dark); }
        .consent-scroll p:last-child { margin-bottom: 0; }
        .consent-scroll h3 { margin: 18px 0 8px; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: .02em; color: var(--color-on-dark); }
        .consent-keep { margin: 0 0 16px; border: 1px solid var(--color-dark-border); border-radius: 12px; background: var(--chrome-bg); }
        .consent-keep > div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 12px; padding: 9px 14px; }
        .consent-keep > div + div { border-top: 1px solid var(--color-dark-border); }
        .consent-keep dt { font-size: 13px; line-height: 20px; color: var(--color-on-dark-muted); }
        .consent-keep dd { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 600; color: var(--color-on-dark); }
        .consent-box.is-more::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--chrome-bg) 82%); }
        .consent-more { position: absolute; z-index: 1; left: 50%; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--color-on-dark); color: var(--chrome-bg); font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .14); }
        .consent-more[hidden] { display: none; }
        .consent-more svg { width: 13px; height: 13px; }
        .consent-checks { margin-top: 14px; display: grid; }
        .consent-check { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--color-on-dark); }
        .consent-check + .consent-check { border-top: 1px solid var(--color-dark-border); }
        .consent-check[hidden] { display: none; }
        .consent-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--result-primary); cursor: pointer; }
        .consent-check a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
        .consent-hint { margin-right: auto; align-self: center; font-size: 13px; line-height: 18px; color: var(--color-on-dark-muted); }
        @media (max-width: 600px) {
            .consent-box { max-height: none; min-height: 180px; }
            .consent-scroll { padding: 16px 16px 18px; }
            .consent-keep > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
            .consent-hint { flex: 1 1 100%; }
        }
        .consent-modal .settings-modal-footer { justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
        .consent-modal .btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
        .settings-modal-footer {
            display: flex; justify-content: center; gap: 10px;
            border-top: 1px solid rgba(var(--wash-rgb), 0.06);
            margin-top: 16px; padding-top: 16px;
        }
        .settings-modal-confirm-message {
            font-size: 13.5px; line-height: 1.6; color: var(--color-on-dark);
            margin: 4px 0 20px;
        }
        
        #unlock_ai_modal_overlay .settings-modal-confirm-message { margin-bottom: 8px; }
        .photo-quality-modal-list {
            margin: 4px 0 20px; padding-left: 20px;
            font-size: 14.5px; line-height: 1.6; color: var(--color-on-dark);
        }
        .photo-quality-modal-list li + li { margin-top: 8px; }
        .analysis-progress-view {
            position: fixed; top: 0; left: 0; right: 0; z-index: 390;
            height: 100vh; height: 100dvh; overflow-y: auto;
            padding: calc(var(--app-header-height, 64px) + 8px) 16px 48px;
            background: var(--color-bg);
        }
        .analysis-progress-view[hidden] { display: none; }
        
        .analysis-progress-shell {
            display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: stretch; gap: 40px;
            max-width: 1080px; margin: 0 auto; padding-top: 8px;
            height: calc(100dvh - var(--app-header-height, 64px) - 64px); min-height: 520px; max-height: 760px;
        }
        
        .analysis-progress-stage {
            position: relative; min-height: 0; overflow: hidden; isolation: isolate;
            border: 1px solid var(--result-border); border-radius: 24px; 
            width: auto; max-width: 100%; justify-self: center; aspect-ratio: 3 / 4;
        }
        
        .analysis-progress-check { width: 144px; height: 144px; opacity: 0; transform: scale(.6); }
        @media (min-width: 768px) { .analysis-progress-check { width: 176px; height: 176px; } }
        .analysis-progress-check circle { fill: var(--accent-fill); }
        .analysis-progress-check path { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 70; stroke-dashoffset: 70; }
        .analysis-progress-view.is-done .analysis-progress-check { opacity: 1; transform: scale(1); transition: opacity .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
        .analysis-progress-view.is-done .analysis-progress-check path { stroke-dashoffset: 0; transition: stroke-dashoffset .4s ease .25s; }

        .analysis-progress-panel { display: flex; flex-direction: column; justify-content: center; gap: 20px; min-width: 0; min-height: 0; }
        .analysis-progress-copy { display: flex; flex-direction: column; }
        .analysis-progress-eyebrow {
            margin: 0; color: var(--result-primary); font-size: 13px; font-weight: 800;
            letter-spacing: .12em; text-transform: uppercase;
        }
        .analysis-progress-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 12px; }
        .analysis-progress-title {
            margin: 0; color: var(--result-text); font-family: var(--font-serif);
            font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; text-wrap: balance;
        }
        .analysis-progress-percent {
            flex: none; margin: 0; color: var(--result-text); font-size: 40px; font-weight: 700; line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        
        .analysis-progress-percent span { display: inline-block; min-width: 3ch; text-align: right; }
        .analysis-progress-percent small { margin-left: 4px; color: var(--result-text-muted); font-size: 16px; font-weight: 600; }
        .analysis-progress-bar { height: 4px; margin-bottom: 14px; overflow: hidden; border-radius: 999px; background: var(--result-border); }
        .analysis-progress-bar-fill {
            height: 100%; border-radius: inherit; background: var(--result-primary);
            transform: scaleX(0); transform-origin: left; transition: none;
        }
        .analysis-progress-sub { min-height: 3.4em; margin: 0; color: var(--result-text-muted); font-size: 15px; line-height: 1.7; }
        .analysis-progress-sub[hidden] { display: none; }
        
        .analysis-progress-slow { margin: 0; color: var(--result-primary); font-size: 14px; line-height: 1.6; }
        .analysis-progress-slow[hidden] { display: none; }
        .analysis-progress-sub.is-entering { animation: analysis-progress-in .45s ease; }
        @keyframes analysis-progress-in { from { opacity: 0; transform: translateY(4px); } }

        
        .analysis-progress-ready {
            display: grid; place-content: center; justify-items: center; gap: 16px;
            min-height: calc(100dvh - var(--app-header-height, 64px) - 64px); padding: 0 24px; text-align: center;
            animation: analysis-progress-fade .4s ease both;
        }
        .analysis-progress-ready[hidden] { display: none; }
        .analysis-progress-view.is-done .analysis-progress-shell { display: none; }
        @keyframes analysis-progress-fade { from { opacity: 0; } }
        .analysis-progress-ready-head { display: grid; justify-items: center; gap: 16px; }
        .analysis-progress-done-title {
            margin: 0; color: var(--result-text); font-family: var(--font-serif);
            font-size: clamp(28px, 3.4vw, 38px); font-weight: 700;
        }
        .analysis-progress-note { max-width: 30rem; margin: 0; color: var(--result-text-muted); font-size: 15px; line-height: 1.6; }
        .analysis-progress-ready .btn-primary {
            width: min(calc(100vw - 3rem), 26rem); min-height: 48px; margin-top: 16px;
            border-radius: 999px; font-size: 16px;
        }

        .analysis-progress-steps-card {
            position: relative; flex: 1 1 auto; width: 100%; min-height: 220px; max-height: 420px; overflow: hidden;
            border: 1px solid var(--result-border); border-radius: 24px;
            background: var(--result-surface); box-shadow: var(--shadow-card);
        }
        
        .analysis-progress-steps-card.is-scrolled {
            -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 18%);
        }
        .analysis-progress-steps {
            position: relative; display: flex; flex-direction: column; gap: 18px;
            margin: 0; padding: 28px; list-style: none; text-align: left;
            transition: transform .45s ease;
        }
        .analysis-progress-step {
            position: relative; min-height: 22px; padding-left: 36px;
            color: var(--result-text-muted); font-size: 15px; line-height: 22px; transition: color .3s ease;
        }
        .analysis-progress-step::before {
            content: ""; position: absolute; top: 0; left: 0; box-sizing: border-box;
            width: 22px; height: 22px; border: 1.5px solid var(--result-border); border-radius: 50%;
            background: var(--result-surface); transition: background-color .3s ease, border-color .3s ease;
        }
        
        .analysis-progress-step.is-active { color: var(--result-text); -webkit-text-stroke: 0.45px currentColor; }
        .analysis-progress-step.is-active::before { border-color: var(--result-primary); }
        
        .analysis-progress-step { isolation: isolate; }
        .analysis-progress-ring {
            display: none; position: absolute; top: 0; left: 0; z-index: -1; width: 22px; height: 22px; border-radius: 50%;
            background: var(--result-primary-tint); pointer-events: none;
        }
        .analysis-progress-step.is-active .analysis-progress-ring { display: block; animation: analysis-progress-pulse 1.6s ease-out infinite; }
        
        .analysis-progress-step.is-active::after {
            content: ""; position: absolute; top: 6px; left: 6px; width: 10px; height: 10px; border-radius: 50%;
            background: var(--result-primary);
            animation: analysis-progress-blink 0.9s ease-in-out infinite;
        }
        @keyframes analysis-progress-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .15; transform: scale(.7); } }
        
        @keyframes analysis-progress-pulse { 0% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.818); } }
        .analysis-progress-step.is-done::before { border-color: var(--result-primary-dark); background: var(--result-primary-tint); }
        .analysis-progress-step.is-done::after {
            content: ""; position: absolute; top: 0; left: 0; width: 22px; height: 22px;
            background: var(--result-primary);
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.75 11.25l2.9 2.9 5.6-5.8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.75 11.25l2.9 2.9 5.6-5.8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
        }
        @media (max-width: 900px) {
            .analysis-progress-shell { display: flex; flex-direction: column; gap: 20px; max-width: 560px; height: auto; min-height: 0; max-height: none; padding-top: 0; }
            .analysis-progress-stage { flex: none; align-self: center; height: min(46vh, 420px); }
            .analysis-progress-steps-card { flex: none; height: 260px; min-height: 0; }
        }
        @media (max-width: 640px) {
            
            .analysis-progress-view { padding-bottom: 16px; }
            .analysis-progress-shell { height: auto; min-height: calc(100dvh - var(--app-header-height, 64px) - 24px); gap: 16px; }
            .analysis-progress-stage {
                flex: none; align-self: stretch; min-height: 0; height: auto; width: auto; max-width: none;
                aspect-ratio: 3 / 4; margin: 0 -4px; border: none; border-radius: var(--radius-lg);
            }
            .analysis-progress-panel { flex: 1 1 auto; height: auto; min-height: 260px; gap: 12px; justify-content: flex-start; }
            .analysis-progress-copy { flex: none; }
            .analysis-progress-slow { font-size: 12.5px; line-height: 1.45; }
            .analysis-progress-title-row { margin: 6px 0 10px; }
            .analysis-progress-title { font-size: 20px; }
            .analysis-progress-percent { font-size: 32px; }
            .analysis-progress-bar { margin-bottom: 10px; }
            
            .analysis-progress-sub {
                height: 3em; min-height: 0; overflow: hidden; font-size: 14px; line-height: 1.5;
                display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
            }
            
            .analysis-progress-steps-card { flex: 1 1 0; height: auto; min-height: 98px; max-height: none; border-radius: 20px; }
            .analysis-progress-steps { gap: 14px; padding: 18px 20px; }
        }
        @media (prefers-reduced-motion: reduce) {
            .analysis-progress-step.is-active::before, .analysis-progress-step.is-active::after { animation: none; }
            .analysis-progress-step.is-active .analysis-progress-ring { display: none; }
            .analysis-progress-steps, .analysis-progress-sub.is-entering, .analysis-progress-ready { transition: none; animation: none; }
        }

        .unlock-ai-modal-balance { margin: 10px 0 0; font-size: 13px; color: var(--color-on-dark-muted); }
        .unlock-ai-modal-balance.is-insufficient { color: var(--result-primary); font-weight: 700; }
        .unlock-ai-modal-list {
            margin: 0 0 4px; padding-left: 20px; font-size: 13.5px; line-height: 1.8; color: var(--color-on-dark);
        }

        .camera-stage {
            position: absolute; inset: 0; z-index: 2;
            display: flex; align-items: center; justify-content: center;
            background: #050606;
            overflow: hidden;
        }
        .camera-stage[hidden] { display: none; }
        #camera_video.camera-source-hidden {
            position: absolute; width: 1px; height: 1px;
            opacity: 0; pointer-events: none;
        }
        #camera_video.is-mirrored { transform: scaleX(-1); }

        .camera-preview-canvas,
        .camera-freeze-canvas {
            position: absolute; inset: 0;
            width: 100%; height: 100%;
            object-position: center;
            background: #050606;
            border-radius: calc(var(--radius-lg) - 2px);
        }
        .camera-preview-canvas { z-index: 2; }
        .camera-freeze-canvas { z-index: 5; }
        .camera-freeze-canvas[hidden] { display: none; }
        .photo-card.camera-portrait .camera-preview-canvas,
        .photo-card.camera-portrait .camera-freeze-canvas { object-fit: cover; }
        .photo-card.camera-landscape .camera-preview-canvas,
        .photo-card.camera-landscape .camera-freeze-canvas { object-fit: contain; }
        .camera-stage.has-frozen-frame .camera-preview-canvas { visibility: hidden; }

        .camera-face-guide {
            position: absolute; left: 50%; top: 52%;
            aspect-ratio: 0.72;
            transform: translate(-50%, -50%);
            border: 1.5px solid rgba(255,255,255,0.42);
            border-radius: 48% 48% 44% 44% / 42% 42% 56% 56%;
            pointer-events: none; z-index: 4;
        }
        .camera-portrait .camera-face-guide { width: min(62%, 300px); }
        .camera-landscape .camera-face-guide { width: min(42%, 260px); }

        .photo-card.camera-active.camera-landscape { aspect-ratio: auto; min-height: 360px; }
        @media (min-width: 821px) {
            .photo-card.camera-active.camera-landscape {
                aspect-ratio: 3 / 4;
                min-height: 0;
            }
        }

        button.btn-upload {
            background: var(--color-dark-surface); color: var(--color-on-dark);
            border: 1.5px solid var(--color-dark-border);
            box-shadow: none;
        }
        button.btn-upload:hover:not(:disabled) { background: var(--color-dark-surface-2); transform: translateY(-1px); }

        .camera-hint-overlay {
            position: absolute; z-index: 6;
            top: clamp(18px, 8%, 52px); left: 50%;
            transform: translateX(-50%);
            display: flex; align-items: center; justify-content: center; gap: 10px;
            max-width: calc(100% - 32px); min-height: 46px; padding: 10px 16px;
            border: 1px solid rgba(255,255,255,0.14); border-radius: 999px;
            background: rgba(8,12,12,0.76);
            backdrop-filter: blur(10px);
            color: #f2f6f4; font-size: 14px; font-weight: 650; text-align: center;
            pointer-events: none;
        }
        .camera-hint-overlay[hidden] { display: none; }
        
        .camera-hint-overlay.is-error { top: 50%; transform: translate(-50%, -50%); border-radius: 16px; line-height: 1.5; }
        .camera-quality-indicator {
            width: 16px; height: 16px; flex: none; border-radius: 50%;
            border: 3px solid rgba(255,255,255,0.12);
            background: #8f9b98;
            transition: background-color .2s ease, box-shadow .2s ease;
        }
        .camera-quality-indicator.is-bad { background: #fb7185; }
        .camera-quality-indicator.is-ok { background: #fbbf24; }
        .camera-quality-indicator.is-good { background: #4ade80; box-shadow: 0 0 0 5px rgba(74,222,128,0.12); }

        .camera-close-button, .camera-switch-button {
            position: absolute; z-index: 6;
            width: 44px; height: 44px; border-radius: 50%;
            background: rgba(8,12,12,0.6); border: 1px solid rgba(255,255,255,0.16);
            color: #fff; display: flex; align-items: center; justify-content: center;
            cursor: pointer; padding: 0; line-height: 1;
        }
        .camera-close-button {
            top: 10px; right: 12px;
            font-size: 22px;
        }
        .camera-switch-button { right: 12px; bottom: 12px; }
        .camera-switch-button svg { width: 20px; height: 20px; }
        .camera-switch-button[hidden] { display: none; }

        .theme-toggle-btn {
            flex: none; display: inline-flex; align-items: center; gap: 6px;
            padding: 7px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
            background: rgba(var(--wash-rgb), 0.06); color: var(--color-on-dark); border: 1px solid var(--color-dark-border);
            border-radius: 999px; font-family: inherit;
        }
        .theme-toggle-btn:hover { background: rgba(var(--wash-rgb), 0.12); }
        .theme-toggle-btn:focus-visible { outline: 2px solid var(--color-primary-light); outline-offset: 2px; }
        .theme-toggle-icon { width: 14px; font-size: 14px; line-height: 1; text-align: center; color: var(--result-primary); }

        :root[data-theme="linen"] .feature-scroll-button { box-shadow: 0 4px 14px rgba(39,34,20,0.12); }
        :root[data-theme="linen"] .global-analysis-status[data-phase="detect-error"] .global-analysis-count { color: #dc2626; }
        :root[data-theme="linen"] .result-card,
        :root[data-theme="linen"] .photo-card { box-shadow: var(--shadow-card); }
        :root[data-theme="linen"] .warning-box { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
        :root[data-theme="linen"] .badge-warn { background: #fee2e2; color: #b91c1c; }
        :root[data-theme="linen"] .feature-pill-meta--retry { color: #b91c1c; background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.3); }
        :root[data-theme="linen"] .cost-modal-overlay { background: rgba(39,34,20,0.35); }

        .theme-toggle-icon svg { display: block; width: 15px; height: 15px; }

        
        .pricing-view { z-index: 401; }
        .pricing-page { max-width: 1120px; margin: 0 auto; padding: clamp(28px, 4vw, 56px) 40px clamp(70px, 8vw, 110px); }
        .pricing-back {
            display: inline-flex; align-items: center; gap: 6px; margin: 0 0 clamp(24px, 3vw, 40px); padding: 6px 0;
            background: none; border: 0; color: var(--home-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
        }
        .pricing-back:hover { color: var(--home-ink); }
        .pricing-title { color: var(--home-ink); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 16px; text-wrap: balance; }
        .pricing-intro { color: var(--home-muted); font-size: 16px; line-height: 1.75; margin: 0; max-width: 680px; }
        .pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 34px; }
        .pricing-card {
            background: var(--home-panel); border: 1px solid var(--home-line); border-radius: 20px;
            padding: 30px 32px 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 18px 45px rgba(0, 0, 0, .05);
        }
        .pricing-card.is-featured { border-color: color-mix(in srgb, var(--home-gold) 70%, var(--home-line)); box-shadow: 0 22px 50px rgba(0, 0, 0, .11); }
        .pricing-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; color: var(--home-ink); font-size: 18px; font-weight: 800; }
        .pricing-badge {
            flex: none; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--home-gold);
            border: 1px solid color-mix(in srgb, var(--home-gold) 55%, transparent); padding: 4px 9px; border-radius: 999px;
        }
        .pricing-sub { color: var(--home-muted); font-size: 13px; margin-top: -10px; }
        .pricing-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; color: var(--home-ink); }
        .pricing-amount strong { font-size: clamp(34px, 3.4vw, 42px); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
        .pricing-amount span { color: var(--home-muted); font-size: 14px; font-weight: 500; }
        .pricing-amount span[hidden] { display: none; }
        .pricing-card .home-cta { align-self: stretch; justify-content: center; }
        .pricing-btn-outline {
            display: inline-flex; align-items: center; justify-content: center; align-self: stretch;
            padding: 14px 30px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--home-ink) 35%, transparent);
            background: transparent; color: var(--home-ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
        }
        .pricing-btn-outline:hover { background: rgba(var(--wash-rgb), .06); }
        .pricing-card button:focus-visible, .pricing-back:focus-visible, .pricing-legal a:focus-visible { outline: 2px solid var(--home-gold); outline-offset: 3px; }
        .pricing-list { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--home-line); display: grid; gap: 11px; }
        .pricing-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; color: var(--home-ink); font-size: 14px; line-height: 1.55; }
        .pricing-list svg { width: 18px; height: 18px; margin-top: 1px; color: var(--home-gold); }
        .pricing-legal { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 22px 0 0; color: var(--home-muted); font-size: 13px; }
        .pricing-legal a { color: var(--home-muted); text-decoration: underline; text-underline-offset: 3px; }
        .pricing-legal a:hover { color: var(--home-ink); }
        .pricing-legal [hidden] { display: none; }
        .pricing-sub-h { color: var(--home-ink); font-size: clamp(22px, 2vw, 26px); line-height: 1.3; font-weight: 700; margin: 64px 0 18px; }
        .pricing-cmp-wrap { overflow-x: auto; border: 1px solid var(--home-line); border-radius: 18px; background: var(--home-panel); }
        .pricing-cmp { width: 100%; min-width: 520px; border-collapse: collapse; }
        .pricing-cmp th, .pricing-cmp td { padding: 15px 22px; text-align: start; border-bottom: 1px solid var(--home-line); font-size: 14px; line-height: 20px; color: var(--home-ink); }
        .pricing-cmp th { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--home-muted); }
        .pricing-cmp .c { width: 160px; text-align: center; }
        .pricing-cmp tr:last-child td { border-bottom: 0; }
        .pricing-cmp svg { width: 18px; height: 18px; color: var(--home-gold); vertical-align: middle; }
        .pricing-dash { color: var(--home-muted); }
        .pricing-note { margin: 12px 0 0; color: var(--home-muted); font-size: 13px; line-height: 20px; }
        @media (max-width: 820px) {
            .pricing-page { padding: 20px 16px 64px; }
            .pricing-grid { grid-template-columns: 1fr; }
            .pricing-card { padding: 24px 20px; }
            .pricing-cmp th, .pricing-cmp td { padding: 12px 14px; }
            .pricing-cmp .c { width: 110px; }
        }

        
        .header-nav-link {
            flex: none; padding: 7px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer;
            font-family: inherit; font-size: 13px; font-weight: 700; color: var(--color-on-dark); white-space: nowrap;
        }
        .header-nav-link:hover, .header-nav-link.is-current { background: rgba(var(--wash-rgb), 0.06); }
        .header-nav-link.is-current { box-shadow: inset 0 -2px 0 var(--result-primary); border-radius: 8px 8px 0 0; }
        .header-nav-link:focus-visible { outline: 2px solid var(--color-primary-light); outline-offset: 2px; }


        
        :where(a.app-brand, a.header-nav-link, a.yb-d-link, .footer-col a[data-footer-action]) { text-decoration: none; color: inherit; }
        :where(a.header-nav-link) { display: inline-flex; align-items: center; }
        :where(a.yb-d-link) { display: block; }
        
        .custom-select-option a { display: block; color: inherit; text-decoration: none; }
