/* ════════════════════════════════════════════════════ */
        /*              MOBILE BOTTOM SHEET                    */
        /* ════════════════════════════════════════════════════ */

        @media (max-width: 767px) and (orientation: portrait) {
            .tracking-container {
                flex-direction: column;
                height: 100dvh;
                overflow: hidden;
            }

            .media-frame {
                height: 100dvh;
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                z-index: 1;
                overflow: hidden;
            }

            #osm-map {
                height: 100%;
            }

            .header {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                padding: 20px 16px 10px;
                z-index: 100;
                pointer-events: none;
            }

            .header>* {
                pointer-events: auto;
            }

            .btn-round {
                width: 40px;
                height: 40px;
                border-radius: 12px;
            }

            .header-title-badge {
                min-width: 60px;
                    padding: 6px 12px;
            }

            .header-title-badge h1 {
                font-size: 14px;
            }

            /* ── tracking card: bottom sheet ── */
            .tracking-card {
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                margin-top: 0;
                border-radius: 32px 32px 0 0;
                padding: 0 20px 20px;
                z-index: 50;
                min-height: 10dvh;
                max-height: 92dvh;
                overflow: hidden;
                box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
                transition: height 0.5s cubic-bezier(0.32, 0.72, 0, 1),
                    transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
                    border-radius 0.5s cubic-bezier(0.32, 0.72, 0, 1);
                will-change: height, transform;
                touch-action: none;
                height: 55dvh;
            }

            .tracking-card.dragging {
                transition: none !important;
                touch-action: none;
            }

            .tracking-card.expanded {
                height: 88dvh;
                border-radius: 28px 28px 0 0;
            }

            /* drag handle - always visible on mobile */
            .drag-handle-wrapper {
                display: flex !important;
                height: 24px;
                padding: 8px 0 6px;
                margin: 0 0 -1px;
                cursor: grab;
                touch-action: none;
                flex-shrink: 0;
                position: relative;
                z-index: 30;
                background: var(--card);
            }

            .drag-handle-wrapper:active {
                cursor: grabbing;
            }

            .drag-handle-bar {
                width: 44px;
                height: 4px;
                border-radius: 4px;
                background: #CBD5E1;
                transition: background 0.2s ease, transform 0.2s ease;
                flex-shrink: 0;
            }

            .drag-handle-wrapper:active .drag-handle-bar {
                transform: scale(1.2);
                background: var(--blue);
            }

            /* card inner scroll */
            .card-scroll-content {
                flex: 1;
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                padding: 0 0 8px;
                margin: 0;
                margin-top: 0;
                min-height: 0;
            }

            .card-scroll-content>*:last-child {
                margin-bottom: 0;
            }

            .card-sticky-header {
                margin-left: -20px;
                margin-right: -20px;
                margin-top: 0;
                padding: 8px 20px 8px 20px;
                border-radius: 0;
                flex-shrink: 0;
                position: sticky;
                top: 0;
                background: var(--card);
                border-bottom: 1px solid transparent;
            }

            .order-header {
                margin-bottom: 8px;
            }

            .order-number {
                font-size: 18px;
            }

            .status-badge {
                font-size: 10px;
                    padding: 6px 12px;
            }

            .divider {
                margin: 10px 0 0 0;
            }

            .toggle-control-bar {
                padding: 4px 0 10px;
                flex-wrap: wrap;
                gap: 8px;
            }

            .toggle-control-container {
                gap: 10px;
                flex: 1;
                min-width: 0;
            }

            .toggle-control-container span {
                font-size: 11px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .toggle-control-container span strong {
                font-size: 12px;
                display: inline;
            }

            .btn-toggle {
                font-size: 11px;
                padding: 4px 10px;
                min-width: 80px;
            }

            .info-table td {
                padding: 8px 0;
            }

            .info-text-sub {
                font-size: 13px;
            }

            .placeholder-block {
                padding: 12px 8px;
            }

            .progress-steps-row::before {
                top: 14px;
            }

            .progress-line-fill {
                top: 14px;
            }

            .step-icon-wrapper {
                width: 28px;
                height: 28px;
            }

            .step-icon-wrapper svg {
                width: 12px;
                height: 12px;
            }

            .step-label {
                font-size: 9px;
                margin-top: 4px;
            }

            .tracker-delivery-time-row {
                padding: 8px 10px;
            }

            .tracker-delivery-label {
                font-size: 10px;
            }

            .tracker-delivery-value {
                font-size: 11px;
            }

            .details-grid {
                padding: 12px;
                gap: 12px;
            }

            .details-value {
                font-size: 13px;
            }

            .details-label {
                font-size: 11px;
            }

            /* ── fullscreen button on mobile ── */
            .btn-fullscreen {
                bottom: calc(55dvh + 20px);
                right: 16px;
                min-width: 44px;
                max-width: 44px;
                height: 44px;
                padding: 0;
                border-radius: 50%;
                display: none;
                align-items: center;
                justify-content: center;
                gap: 0;
                overflow: hidden;
                background: rgba(0, 0, 0, 0.65);
                backdrop-filter: blur(6px);
                -webkit-backdrop-filter: blur(6px);
                border: 1px solid rgba(255, 255, 255, 0.2);
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
                opacity: 1;
                transform: translateY(0);
            }

            .tracking-container.show-image .btn-fullscreen {
                display: flex;
                bottom: calc(55dvh + 20px);
            }

            .btn-fullscreen .fullscreen-label {
                display: none !important;
            }

            .btn-fullscreen svg {
                width: 20px;
                height: 20px;
                flex-shrink: 0;
            }

            /* expanded state overrides */
            .tracking-card.expanded {
                height: 88dvh !important;
            }

            .tracking-card.expanded~.btn-fullscreen {
                bottom: calc(88dvh + 20px);
            }

            .tracking-container.show-image .tracking-card.expanded~.btn-fullscreen {
                bottom: calc(88dvh + 20px);
            }

            .image-modal {
                padding: 14px;
            }

            .image-modal-content,
            .image-modal-photo {
                max-height: calc(100dvh - 28px);
            }

            .image-modal-close {
                top: 12px;
                right: 12px;
                width: 40px;
                height: 40px;
            }

            .toggle-content-placeholder {
                overflow: hidden;
            }

            .toggle-section {
                overflow: visible;
            }

            /* small screens */
            @media (max-width: 480px) {
                .tracking-card {
                    padding: 0 16px 16px;
                }

                .card-sticky-header {
                    margin-left: -16px;
                    margin-right: -16px;
                    margin-top: 0;
                    padding: 8px 16px 8px 16px;
                    border-radius: 0;
                }

                .order-number {
                    font-size: 16px;
                }

                .header-title-badge {
                    min-width: 50px;
                    padding: 2px 10px;
                }

                .header-title-badge h1 {
                    font-size: 12px;
                }

                .btn-round {
                    width: 34px;
                    height: 34px;
                }

                .btn-round svg {
                    width: 16px;
                    height: 16px;
                }

                .btn-fullscreen {
                    bottom: calc(55dvh + 16px);
                    right: 12px;
                    min-width: 40px;
                    max-width: 40px;
                    height: 40px;
                }

                .tracking-container.show-image .btn-fullscreen {
                    bottom: calc(55dvh + 16px);
                }

                .tracking-card.expanded~.btn-fullscreen {
                    bottom: calc(88dvh + 16px);
                }

                .tracking-container.show-image .tracking-card.expanded~.btn-fullscreen {
                    bottom: calc(88dvh + 16px);
                }
            }

            @media (max-width: 380px) {
                .order-number {
                    font-size: 14px;
                }

                .status-badge {
                    font-size: 9px;
                    padding: 3px 8px;
                }

                .btn-toggle {
                    font-size: 10px;
                    padding: 3px 8px;
                    min-width: 60px;
                }

                .toggle-control-container span {
                    font-size: 10px;
                }

                .btn-fullscreen {
                    bottom: calc(55dvh + 12px);
                    right: 10px;
                    min-width: 36px;
                    max-width: 36px;
                    height: 36px;
                }

                .tracking-container.show-image .btn-fullscreen {
                    bottom: calc(55dvh + 12px);
                }

                .tracking-card.expanded~.btn-fullscreen {
                    bottom: calc(88dvh + 12px);
                }

                .tracking-container.show-image .tracking-card.expanded~.btn-fullscreen {
                    bottom: calc(88dvh + 12px);
                }
            }
        }

        /* ════════════════════════════════════════════════════ */
        /*              DESKTOP (≥ 768px)                      */
        /* ════════════════════════════════════════════════════ */

        @media (min-width: 768px), (max-width: 767px) and (orientation: landscape) {
            .drag-handle-wrapper {
                display: none !important;
            }

            .tracking-container {
                flex-direction: row;
                height: 100dvh;
                overflow: hidden;
            }

            .header {
                position: absolute;
                top: 0;
                right: 0;
                left: auto;
                width: 55%;
                padding: 24px 40px;
            }

            .media-frame {
                position: relative;
                width: 55%;
                height: 100%;
                order: 2;
            }

            #osm-map {
                height: 100%;
            }

            .tracking-card {
                width: 45%;
                height: 100%;
                max-height: 100dvh;
                border-radius: 0;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                box-shadow: 12px 0 30px rgba(0, 0, 0, 0.04);
                order: 1;
                padding: 0 40px 40px;
                margin-top: 0;
                overflow-y: auto;
                overflow-x: hidden;
                transition: none;
                position: relative;
                bottom: auto;
                left: auto;
                right: auto;
                width: 45%;
                height: 100%;
                min-height: unset;
                max-height: 100dvh;
            }

            .card-scroll-content {
                flex: 1;
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                padding: 0;
            }

            .card-sticky-header {
                margin-left: -40px;
                margin-right: -40px;
                padding: 20px 40px 4px 40px;
                border-radius: 0;
                position: sticky;
                top: 0;
                background: var(--card);
                border-bottom: 1px solid transparent;
            }

            .order-header {
                margin-top: 20px;
                margin-bottom: 24px;
            }

            .placeholder-block {
                padding: 22px 16px;
            }

            .progress-steps-row::before {
                top: 21px;
            }

            .progress-line-fill {
                top: 21px;
            }

            .step-icon-wrapper {
                width: 42px;
                height: 42px;
            }

            .step-icon-wrapper svg {
                width: 18px;
                height: 18px;
            }

            .step-label {
                margin-top: 8px;
                font-size: 12px;
            }

            .tracker-delivery-time-row {
                padding: 12px 16px;
            }

            .tracker-delivery-label {
                font-size: 13px;
            }

            .info-table td {
                padding: 18px 0;
            }

            .info-text-sub {
                display: inline-block;
                margin-top: 0;
                margin-left: 6px;
            }

            .toggle-control-bar {
                padding: 8px 0 16px;
            }

            /* ── fullscreen button desktop ── */
            .btn-fullscreen {
                position: absolute;
                bottom: 24px;
                right: 24px;
                min-width: 48px;
                max-width: 48px;
                height: 48px;
                padding: 0;
                border-radius: 50%;
                display: none;
                align-items: center;
                justify-content: center;
                gap: 0;
                overflow: hidden;
                background: rgba(0, 0, 0, 0.6);
                backdrop-filter: blur(8px);
                -webkit-backdrop-filter: blur(8px);
                border: 1px solid rgba(255, 255, 255, 0.18);
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
                transition: opacity 0.3s ease, transform 0.3s ease, max-width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    border-radius 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    padding 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    gap 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    background 0.25s ease,
                    box-shadow 0.25s ease,
                    transform 0.2s ease;
                transform: scale(1);
                will-change: max-width, padding, border-radius, gap, opacity, transform;
                opacity: 1;
            }

            .tracking-container.show-image .btn-fullscreen {
                display: flex;
            }

            .btn-fullscreen .fullscreen-label {
                display: inline;
                max-width: 0;
                opacity: 0;
                overflow: hidden;
                white-space: nowrap;
                font-size: 13px;
                font-weight: 600;
                color: #fff;
                letter-spacing: 0.3px;
                margin-left: 0;
                transition: max-width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    opacity 0.3s ease 0.05s,
                    margin-left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                flex-shrink: 0;
            }

            .btn-fullscreen:hover {
                max-width: 220px;
                border-radius: 50px;
                padding: 0 18px 0 14px;
                gap: 6px;
                background: rgba(0, 0, 0, 0.78);
                box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
                transform: scale(1.04);
            }

            .btn-fullscreen:hover .fullscreen-label {
                max-width: 140px;
                opacity: 1;
                margin-left: 4px;
            }

            .btn-fullscreen:active {
                transform: scale(0.95);
            }

            .btn-fullscreen svg {
                flex-shrink: 0;
                width: 18px;
                height: 18px;
            }

            .header-title-badge {
                min-width: 120px;
                padding: 8px 20px;
            }
        }

        /* ── fullscreen label always hidden on mobile ── */
        @media (max-width: 767px) and (orientation: portrait) {
            .btn-fullscreen .fullscreen-label {
                display: none !important;
            }
        }





        @media (max-width: 767px) {
            .map-route-loader {
                min-height: 46px;
                padding: 11px 14px;
                border-radius: 12px;
                gap: 10px;
                font-size: 12px;
                line-height: 20px;
            }

            .map-route-loader-spinner {
                width: 16px;
                height: 16px;
                border-width: 2px;
            }
        }



