/* Phone frame: reserve the in-game top and bottom bars. */
        :root { --phone-viewport-height: 100vh; --phone-safe-height: calc(var(--phone-viewport-height, 100dvh) - 70px); --phone-modal-center: calc(var(--phone-viewport-top, 0px) + 50px + var(--phone-safe-height) / 2); }
        html { height: 100%; scroll-padding-top: 130px; }
        @supports (height: 100dvh) { :root { --phone-viewport-height: 100dvh; } }
        .phone-page { width: 100%; min-height: 100%; }
        body { margin: 0; padding: 50px 0 20px; box-sizing: border-box; height: 100%; min-height: 100%; }
        /* Keep scrolling content below the in-game notch and status bar. */
        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 50px;
            background: #fff;
            z-index: 1001;
            pointer-events: none;
        }
        .header { position: sticky; top: 50px; padding-top: 0; background: var(--white, #fff); backdrop-filter: none; transition: none; }
        .header .logo img, .header.scrolled .logo img { height: 80px; transition: none; }
        .header-content, .header-actions, .container, .product-card, .product-info, .input-group { min-width: 0; }
        .hero { margin-top: 0; min-height: calc(100vh - 180px); min-height: calc(100svh - 180px); }
        .filters-section { top: calc(50px + var(--phone-header-height, 110px)); }
        .modal-overlay, .cart-overlay { top: calc(var(--phone-viewport-top, 0px) + 50px); bottom: auto; height: var(--phone-safe-height); }
        #phoneLoginModal, #quantityModal, #checkoutModal { top: var(--phone-modal-center); width: calc(100% - 24px); max-height: calc(var(--phone-safe-height) - 16px); overflow-y: auto; overscroll-behavior: contain; }
        #companySettingsModal, #companyRemoveModal { position: fixed; top: var(--phone-modal-center); left: 50%; right: auto; bottom: auto; margin: 0; transform: translate(-50%, -50%); width: calc(100% - 24px); max-height: calc(var(--phone-safe-height) - 16px); overflow-y: auto; overscroll-behavior: contain; }
        #companySettingsModal { max-width: 720px; }
        #companyRemoveModal { max-width: 430px; }
        #companySettingsModal[open] { animation: none; }
        .cart-sidebar { top: calc(var(--phone-viewport-top, 0px) + 50px); height: var(--phone-safe-height); max-height: var(--phone-safe-height); }
        .cart-items { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
        .cart-header, .cart-summary { flex-shrink: 0; }
        #notificationContainer { top: calc(var(--phone-viewport-top, 0px) + 62px); max-width: calc(100% - 24px); }
        .notification { max-width: 100%; overflow-wrap: anywhere; }
        @media (max-width: 768px) {
            .header-content { padding: 10px 14px; gap: 10px; }
            .header .logo img, .header.scrolled .logo img { height: 48px; }
            .header-actions { gap: 8px; }
            .nav-desktop { display: none; }
            .menu-toggle { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
            .nav-mobile { padding: 8px 14px; transition: none; }
            .nav-mobile.active { max-height: calc(var(--phone-safe-height) - 90px); overflow-y: auto; overscroll-behavior: contain; }
            .nav-link-mobile { min-height: 44px; display: flex; align-items: center; }
            .container { padding-left: 14px; padding-right: 14px; }
            .header-actions .btn-primary { font-size: .8rem; padding: 9px 11px; min-height: 44px; }
            .hero { padding: 28px 0; min-height: calc(100vh - 138px); min-height: calc(100svh - 138px); }
            .hero-content { padding: 24px 14px; width: 100%; }
            .hero-title { font-size: clamp(1.85rem, 8vw, 2.8rem); line-height: 1.2; overflow-wrap: anywhere; }
            .hero-subtitle { font-size: 1rem; }
            .hero-buttons { flex-direction: column; gap: 12px; }
            .hero-buttons > * { width: 100%; min-height: 44px; }
            .page-header { min-height: 180px; padding: 30px 14px; }
            .page-title { font-size: clamp(1.65rem, 7vw, 2.25rem); overflow-wrap: anywhere; }
            .page-subtitle { font-size: .95rem; }
            .section-title { font-size: 1.7rem; }
            .featured-products, .values, .how-it-works { padding: 36px 0; }
            .values-grid, .steps-grid, .footer-content { grid-template-columns: minmax(0, 1fr); }
            .filters-section { position: static; padding: 18px 0; }
            .filters-container { gap: 8px; }
            .filter-btn { min-height: 44px; min-width: 0; flex: 1 1 calc(50% - 8px); padding: 8px; white-space: normal; }
            .search-box, .search-container { max-width: 100%; min-width: 0; }
            .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
            .product-info { padding: 12px 10px; }
            .product-name, .product-info h3 { font-size: .95rem; overflow-wrap: anywhere; }
            .product-price { font-size: 1.1rem; }
            .product-footer { gap: 6px; flex-wrap: wrap; }
            .btn-add-to-cart { min-width: 44px; min-height: 44px; flex-shrink: 0; }
            .product-image { height: 125px; }
            input, select, textarea, .input-group .input, .company-settings-fields input, .modal-qty-input, .quantity-input { font-size: 16px; min-width: 0; }
            .input-group .input, .company-settings-fields input, select.input { width: 100%; }
            button, a { touch-action: manipulation; }
            #phoneLoginModal { padding: 20px; }
            #phoneLoginModal .modal-header h2 { font-size: 1.35rem; }
            #phoneLoginModal .modal-header { gap: 10px; }
            #phoneLoginModal .phone-account-button { padding: 13px; min-height: 48px; }
            #quantityModal .modal-header, #checkoutModal .modal-header, #quantityModal .modal-body, #checkoutModal .modal-body { padding: 16px; }
            #quantityModal .modal-header h2, #checkoutModal .modal-header h2 { font-size: 1.3rem; min-width: 0; overflow-wrap: anywhere; }
            .btn-close, .btn-close-cart { flex-shrink: 0; min-width: 44px; min-height: 44px; }
            .quantity-product-info { gap: 12px; padding: 12px; margin-bottom: 18px; }
            .quantity-product-info > div { min-width: 0; }
            .quantity-product-info img { width: 56px; height: 56px; flex-shrink: 0; }
            .quantity-product-info h3 { font-size: 1.1rem; overflow-wrap: anywhere; }
            .qty-product-price { font-size: .9rem; }
            .quantity-input-group { gap: 10px; }
            .modal-qty-input { width: min(100px, 40%); }
            .btn-qty-modal { width: 44px; height: 44px; flex-shrink: 0; }
            .checkout-item { gap: 12px; align-items: start; }
            .checkout-item > :first-child { min-width: 0; overflow-wrap: anywhere; }
            .checkout-item > :last-child { flex-shrink: 0; white-space: nowrap; }
            .cart-sidebar { width: 100%; max-width: 100%; }
            .cart-header, .cart-summary { padding: 14px; }
            .cart-header h2 { font-size: 1.4rem; }
            .cart-items { padding: 14px; }
            .cart-item { flex-wrap: wrap; gap: 12px; padding: 12px; }
            .cart-item-info { min-width: 0; flex: 1 1 150px; gap: 10px; }
            .cart-item-details { min-width: 0; }
            .cart-item-details h4 { overflow-wrap: anywhere; }
            .cart-item-actions { margin-left: auto; gap: 8px; }
            .quantity-input { width: 68px; padding: 8px; min-height: 44px; }
            .btn-remove { width: 44px; height: 44px; }
            .company-settings-heading, .company-settings-body { padding: 18px; }
            .company-settings-heading h2 { font-size: 1.35rem; }
            .company-settings-close { min-width: 44px; min-height: 44px; }
            .company-settings-fields { grid-template-columns: minmax(0, 1fr); }
            .company-employee-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'details' 'permissions' 'actions'; padding: 12px; }
            .company-employee-actions { justify-self: end; }
            .company-employee-actions button { min-height: 44px; }
            .company-permission-switch { min-height: 44px; }
            .company-employees-toolbar { align-items: stretch; }
            .company-action-primary, .company-action-secondary, .company-form-back { min-height: 44px; white-space: normal; }
            .company-form-actions { flex-wrap: wrap; }
            .company-form-actions > button { flex: 1 1 140px; }
            #companyRemoveModal { padding: 20px; }
            #companyRemoveModal h2 { font-size: 1.35rem; }
            .admin-grid { grid-template-columns: minmax(0, 1fr); }
            .admin-form { padding: 20px; }
            .admin-card-heading { padding: 20px; }
            .card-title { font-size: 1.35rem; }
            .admin-footer-content { grid-template-columns: minmax(0, 1fr); }
            .admin-footer-links a { min-height: 44px; }
            #notificationContainer { left: 12px; right: 12px; }
            .notification { min-width: 0; }
        }
        @media (max-width: 360px) {
            .products-grid { grid-template-columns: minmax(0, 1fr); }
            .admin-form { grid-template-columns: minmax(0, 1fr); }
            .admin-form .form-group-half { grid-column: 1 / -1; }
            .header-actions .btn-primary { padding: 8px; font-size: .75rem; }
        }
