body {
                font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
                margin: 0;
                padding: 0;
                overflow: hidden;
            }
            #wpadminbar {
                display: none !important;
            }
            html,
            body {
                margin-top: 0 !important;
            }

            #map {
                height: 100vh;
                width: 100%;
                position: relative;
            }
            .map-loading-badge {
                position: absolute;
                top: 16px;
                right: 16px;
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 8px 12px;
                border-radius: 999px;
                border: 1px solid rgba(26, 115, 232, 0.18);
                background: rgba(255, 255, 255, 0.96);
                box-shadow: 0 10px 24px rgba(32, 33, 36, 0.18);
                color: #1f1f1f;
                font-size: 0.82rem;
                font-weight: 600;
                letter-spacing: 0.01em;
                pointer-events: none;
                z-index: 12;
                opacity: 0;
                transform: translateY(-6px);
                transition: opacity 0.18s ease, transform 0.18s ease;
            }
            .map-loading-badge.is-visible {
                opacity: 1;
                transform: translateY(0);
            }
            .map-loading-badge__spinner {
                width: 14px;
                height: 14px;
                border: 2px solid #d2e3fc;
                border-top-color: #1a73e8;
                border-radius: 50%;
                animation: cc-loading-spin 0.7s linear infinite;
                flex: 0 0 auto;
            }

            /* --- SIDEBAR --- */
            #sidebar {
                position: absolute;
                top: 10px;
                left: 10px;
                width: 300px;
                background: rgba(255, 255, 255, 0.98);
                border-radius: 8px;
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
                z-index: 10;
                max-height: 90vh;
                display: flex;
                flex-direction: column;
            }
            .header {
                padding: 15px;
                background: #fff;
                border-bottom: 1px solid #eee;
                border-radius: 8px 8px 0 0;
            }
            .header h2 {
                margin: 0;
                font-size: 1.1rem;
                color: #202124;
            }
            .header small {
                color: #5f6368;
                font-size: 0.75rem;
            }
            .header-top {
                display: flex;
                justify-content: space-between;
                gap: 8px;
                align-items: flex-start;
            }
            .header-brand {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
                min-width: 0;
            }
            .header-logo {
                max-height: 52px;
                max-width: 190px;
                width: auto;
                object-fit: contain;
                border-radius: 4px;
                background: #fff;
            }
            .header-close-btn {
                background: #fff;
                border: 1px solid #dadce0;
                color: #3c4043;
                padding: 6px 10px;
                font-size: 0.8rem;
                font-weight: 600;
                flex: 0 0 auto;
            }
            .header-close-btn:hover {
                background: #f1f3f4;
            }
            .header-cemetery {
                margin-top: 10px;
            }
            .header-cemetery label {
                margin-bottom: 4px;
                font-size: 0.65rem;
            }
            .header-cemetery select {
                width: 100%;
                margin-bottom: 0;
            }
            .viewer-structure-controls {
                margin-top: 12px;
                padding-top: 12px;
                border-top: 1px solid #eee;
            }
            .viewer-structure-controls__title {
                margin-bottom: 8px;
                color: #5f6368;
                font-size: 0.65rem;
                font-weight: 700;
                letter-spacing: 0.5px;
                text-transform: uppercase;
            }
            .viewer-structure-controls__grid {
                display: grid;
                grid-template-columns: 1fr;
                gap: 8px;
            }
            .viewer-structure-controls__actions {
                margin-top: 10px;
            }
            .viewer-structure-toggle {
                display: flex;
                align-items: center;
                gap: 8px;
                margin: 0;
                color: #3c4043;
                font-size: 0.82rem;
                font-weight: 600;
                letter-spacing: 0;
                text-transform: none;
                cursor: pointer;
            }
            .viewer-structure-toggle input {
                width: 16px;
                height: 16px;
                margin: 0;
                accent-color: #1a73e8;
                cursor: pointer;
                flex: 0 0 auto;
            }
            .viewer-structure-toggle span {
                color: inherit;
                font: inherit;
                user-select: none;
            }
            .viewer-structure-toggle input:disabled + span {
                color: #5f6368;
            }
            .viewer-structure-toggle input:disabled,
            .viewer-structure-toggle input:disabled + span {
                cursor: not-allowed;
                opacity: 0.7;
            }
            .viewer-print-btn {
                width: 100%;
                justify-content: center;
                gap: 8px;
                font-weight: 600;
            }
            .viewer-print-btn .material-icons {
                font-size: 1rem;
            }
            #printPreviewOverlay {
                position: fixed;
                inset: 0;
                z-index: 30;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.14s ease;
            }
            #printPreviewOverlay.is-visible {
                opacity: 1;
            }
            .print-preview-frame {
                position: absolute;
                border: 2px dashed rgba(26, 115, 232, 0.95);
                border-radius: 8px;
                box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.18);
                background: rgba(255, 255, 255, 0.04);
            }
            .print-preview-frame__label {
                position: absolute;
                top: 10px;
                right: 10px;
                padding: 4px 8px;
                border-radius: 999px;
                background: rgba(15, 23, 42, 0.82);
                color: #fff;
                font-size: 0.72rem;
                font-weight: 700;
                letter-spacing: 0.02em;
                white-space: nowrap;
            }

            .content {
                padding: 15px;
                overflow-y: auto;
                flex: 1;
            }

            label {
                display: block;
                font-size: 0.75rem;
                font-weight: 700;
                color: #5f6368;
                margin-bottom: 5px;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }

            select {
                width: 100%;
                padding: 8px 10px;
                border: 1px solid #dadce0;
                border-radius: 4px;
                box-sizing: border-box;
                font-size: 0.9rem;
                margin-bottom: 10px;
                background: #fff;
            }
            select:focus {
                outline: none;
                border-color: #1a73e8;
                box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
            }

            .search-fields {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 8px;
                margin-bottom: 10px;
            }
            .search-advanced-toggle {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                margin: -2px 0 10px;
                color: #1a73e8;
                font-size: 0.8rem;
                font-weight: 600;
                text-decoration: none;
            }
            .search-advanced-toggle:hover {
                text-decoration: underline;
            }
            .search-advanced-toggle::after {
                content: '+';
                font-size: 0.95rem;
                line-height: 1;
            }
            .search-advanced-toggle[aria-expanded="true"]::after {
                content: '-';
            }
            .search-advanced-fields {
                display: none;
            }
            .search-advanced-fields.open {
                display: grid;
            }
            .search-field {
                display: flex;
                flex-direction: column;
                gap: 3px;
            }
            .search-field label {
                font-size: 0.65rem;
                margin-bottom: 0;
            }
            .search-field input {
                padding: 6px 8px;
                border: 1px solid #dadce0;
                border-radius: 4px;
                box-sizing: border-box;
                font-size: 0.82rem;
                background: #fff;
                width: 100%;
            }
            .search-field input:focus {
                outline: none;
                border-color: #1a73e8;
                box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
            }
            .search-actions {
                display: flex;
                gap: 5px;
                margin-bottom: 10px;
            }

            button {
                padding: 8px 12px;
                border: none;
                border-radius: 4px;
                cursor: pointer;
                font-weight: 500;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 6px;
                transition: background 0.2s;
                font-size: 0.85rem;
            }

            .btn-primary {
                background: #1a73e8;
                color: white;
            }
            .btn-primary:hover {
                background: #1557b0;
            }

            .btn-secondary {
                background: #fff;
                border: 1px solid #dadce0;
                color: #3c4043;
            }
            .btn-secondary:hover {
                background: #f1f3f4;
            }

            .btn-reset {
                background: #f1f3f4;
                color: #3c4043;
                border: 1px solid #dadce0;
                width: 100%;
                margin-top: 8px;
            }
            .btn-reset:hover {
                background: #e8eaed;
            }

            .search-results {
                margin-top: 10px;
                font-size: 0.85rem;
                color: #5f6368;
                padding: 8px;
                background: #f8f9fa;
                border-radius: 4px;
                display: none;
            }
            .search-results.visible {
                display: block;
            }
            .search-results strong {
                color: #202124;
            }

            /* Results list */
            .result-list {
                margin-top: 8px;
                max-height: 300px;
                overflow-y: auto;
            }
            .result-pagination {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 8px;
                margin-top: 10px;
                padding-top: 8px;
                border-top: 1px solid #e5e7eb;
            }
            .result-pagination__summary {
                font-size: 0.72rem;
                color: #5f6368;
            }
            .result-pagination__actions {
                display: flex;
                gap: 6px;
            }
            .result-pagination button {
                width: auto;
                margin: 0;
                padding: 6px 10px;
                font-size: 0.75rem;
            }
            .result-item {
                padding: 8px 10px;
                border-bottom: 1px solid #eee;
                cursor: pointer;
                transition: background 0.15s;
                border-radius: 4px;
            }
            .result-item:hover {
                background: #e8f0fe;
            }
            .result-item:last-child {
                border-bottom: none;
            }
            .result-item .name {
                font-weight: 600;
                color: #202124;
                font-size: 0.85rem;
            }
            .result-item .location {
                font-size: 0.75rem;
                color: #5f6368;
                margin-top: 2px;
            }
            .result-item .status-badge {
                display: inline-block;
                padding: 1px 6px;
                border-radius: 3px;
                font-size: 0.7rem;
                font-weight: 600;
                color: white;
                text-transform: uppercase;
            }

            .hidden {
                display: none !important;
            }

            body.viewer-modal-open {
                overflow: hidden;
            }

            .cemetery-modal {
                position: fixed;
                inset: 0;
                z-index: 10001;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 20px;
            }
            .cemetery-modal__backdrop {
                position: absolute;
                inset: 0;
                background: rgba(15, 23, 42, 0.58);
            }
            .cemetery-modal__dialog {
                position: relative;
                width: min(100%, 420px);
                padding: 24px;
                border-radius: 14px;
                background: #fff;
                box-shadow: 0 20px 44px rgba(15, 23, 42, 0.28);
            }
            .cemetery-modal__dialog h2 {
                margin: 0 0 10px;
                color: #202124;
                font-size: 1.25rem;
            }
            .cemetery-modal__dialog p {
                margin: 0 0 16px;
                color: #5f6368;
                line-height: 1.5;
                font-size: 0.92rem;
            }
            .cemetery-modal__dialog select {
                margin-bottom: 0;
            }
            .cemetery-modal__actions {
                display: flex;
                justify-content: flex-end;
                margin-top: 16px;
            }
            .cemetery-modal__actions .btn-primary[disabled] {
                cursor: not-allowed;
                opacity: 0.7;
            }

            .loading-overlay {
                position: fixed;
                inset: 0;
                background: rgba(0, 0, 0, 0.35);
                z-index: 10000;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .loading-dialog {
                min-width: 240px;
                max-width: 90%;
                background: #fff;
                border-radius: 8px;
                padding: 16px 18px;
                display: flex;
                align-items: center;
                gap: 12px;
                box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
                color: #3c4043;
                font-size: 0.95rem;
                font-weight: 600;
            }
            .loading-spinner {
                width: 20px;
                height: 20px;
                border-radius: 50%;
                border: 3px solid #d2d8e1;
                border-top-color: #1a73e8;
                animation: cc-loading-spin 0.7s linear infinite;
                flex: 0 0 auto;
            }
            @keyframes cc-loading-spin {
                to { transform: rotate(360deg); }
            }

            /* Loading spinner */
            .search-loading {
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 12px 0;
                color: #5f6368;
                font-size: 0.85rem;
            }
            .search-loading .spinner {
                width: 18px;
                height: 18px;
                border: 2px solid #dadce0;
                border-top-color: #1a73e8;
                border-radius: 50%;
                animation: spin 0.7s linear infinite;
            }
            @keyframes spin {
                to { transform: rotate(360deg); }
            }

            /* Label sobre mapa */
            .map-label {
                color: white;
                font-weight: bold;
                font-family: sans-serif;
                text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
                font-size: 12px;
                white-space: nowrap;
                line-height: 1.2;
            }
            .map-label--area {
                padding: 2px 7px;
                border-radius: 999px;
                border: 1px solid rgba(207, 216, 220, 0.55);
                background: rgba(55, 71, 79, 0.82);
                letter-spacing: 0.08em;
                text-transform: uppercase;
            }
            .map-label--manzana {
                padding: 4px 10px;
                border-radius: 999px;
                border: 1px solid rgba(255, 235, 156, 0.72);
                background: rgba(118, 89, 0, 0.92);
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
            }
            .map-label--tablon {
                padding: 2px 7px;
                border-radius: 999px;
                border: 1px solid rgba(222, 190, 164, 0.55);
                background: rgba(74, 50, 44, 0.86);
            }
            .map-label--sepultura {
                text-shadow: 0 0 3px rgba(0, 0, 0, 0.95);
            }

            .static-image-overlay {
                position: absolute;
                transform-origin: 0 0;
                pointer-events: none;
                z-index: 0;
            }

            .static-image-overlay img {
                width: 100%;
                height: 100%;
                display: block;
                user-select: none;
                pointer-events: none;
            }

            /* Map Control Icon */
            .map-type-icon-btn {
                background: #fff; border: 2px solid #fff; border-radius: 4px;
                box-shadow: 0 1px 4px -1px rgba(0,0,0,0.3);
                margin: 10px; width: 40px; height: 40px;
                cursor: pointer; color: #565656;
                display: flex; align-items: center; justify-content: center;
            }
            .map-type-icon-btn:hover { background: #ebebeb; }
            .map-hd-toggle-btn {
                background: #1a73e8;
                border: 2px solid #1a73e8;
                border-radius: 999px;
                box-shadow: 0 1px 4px -1px rgba(0,0,0,0.3);
                margin: 20px auto 0;
                min-height: 40px;
                padding: 0 16px;
                cursor: pointer;
                color: #fff;
                font-size: 0.82rem;
                font-weight: 700;
                white-space: nowrap;
                transition: background 0.2s, border-color 0.2s;
            }
            .map-hd-toggle-btn:hover {
                background: #1557b0;
                border-color: #1557b0;
            }

            /* --- INFO PANEL (top-right) --- */
            #info-panel {
                position: absolute;
                top: 10px;
                right: 60px;
                width: 280px;
                background: rgba(255, 255, 255, 0.98);
                border-radius: 8px;
                box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
                z-index: 10;
                display: none;
                border: 1px solid #ddd;
                overflow: hidden;
            }
            #info-panel.visible {
                display: block;
            }

            .info-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 12px 15px;
                border-bottom: 1px solid #eee;
            }
            .info-header h3 {
                margin: 0;
                font-size: 0.95rem;
                color: #202124;
            }
            .info-close {
                background: none;
                border: none;
                cursor: pointer;
                color: #5f6368;
                padding: 0;
                display: flex;
                align-items: center;
            }
            .info-close:hover {
                color: #202124;
            }

            .info-body {
                padding: 15px;
            }
            .info-row {
                display: flex;
                align-items: baseline;
                margin-bottom: 8px;
            }
            .info-row:last-child { margin-bottom: 0; }
            .info-label {
                font-size: 0.7rem;
                font-weight: 700;
                color: #5f6368;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                width: 90px;
                flex-shrink: 0;
            }
            .info-value {
                font-size: 0.9rem;
                color: #202124;
                word-break: break-word;
            }
            .info-associated {
                margin-top: 12px;
                padding-top: 12px;
                border-top: 1px solid #eee;
            }
            .info-associated__title {
                font-size: 0.7rem;
                font-weight: 700;
                color: #5f6368;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                margin-bottom: 8px;
            }
            .info-associated__empty {
                color: #5f6368;
                font-size: 0.85rem;
            }
            .info-associated__list {
                display: flex;
                flex-direction: column;
                border: 1px solid #e2e3e5;
                border-radius: 6px;
                overflow: hidden;
                background: #fff;
            }
            .info-associated__item {
                padding: 10px 12px;
            }
            .info-associated__item + .info-associated__item,
            .info-associated__item + .info-associated__loading {
                border-top: 1px solid #eceff1;
            }
            .info-associated__item-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 8px;
            }
            .info-associated__item-title {
                color: #202124;
                font-weight: 600;
                font-size: 0.88rem;
                word-break: break-word;
            }
            .info-associated__status {
                padding: 2px 8px;
                border-radius: 999px;
                background: #f1f3f4;
                color: #3c4043;
                font-size: 0.7rem;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.3px;
                white-space: nowrap;
            }
            .info-associated__meta {
                display: flex;
                flex-wrap: wrap;
                gap: 8px 12px;
                margin-top: 6px;
            }
            .info-associated__meta-item {
                display: flex;
                gap: 4px;
                font-size: 0.78rem;
                color: #3c4043;
            }
            .info-associated__meta-key {
                color: #5f6368;
                font-weight: 600;
            }
            .info-associated__meta-value {
                color: #202124;
                word-break: break-word;
            }
            .info-associated__actions {
                margin-top: 8px;
            }
            .info-associated__link {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-height: 30px;
                padding: 0 10px;
                border-radius: 4px;
                background: #1a73e8;
                color: #fff;
                text-decoration: none;
                font-size: 0.78rem;
                font-weight: 600;
            }
            .info-associated__link:hover {
                background: #1557b0;
            }
            .info-associated__link,
            .info-associated__link:visited,
            .info-associated__link:hover {
                color: #fff;
            }
            .info-associated__loading {
                padding: 10px 12px;
                color: #5f6368;
                font-size: 0.8rem;
                background: #fafbfc;
            }
            .extra-graves-list {
                display: flex;
                flex-direction: column;
                gap: 8px;
                width: 100%;
            }
            .extra-grave-item {
                background: #f8f9fa;
                border: 1px solid #e2e3e5;
                border-radius: 4px;
                padding: 8px;
                font-size: 0.8rem;
                line-height: 1.35;
            }
            .extra-grave-item div {
                margin-bottom: 3px;
            }
            .extra-grave-item div:last-child {
                margin-bottom: 0;
            }
            .extra-grave-title {
                font-weight: 600;
                color: #202124;
            }
            .extra-grave-id {
                color: #5f6368;
                font-weight: 500;
            }
            .extra-grave-location {
                color: #5f6368;
            }
            .extra-grave-meta {
                color: #5f6368;
            }
            .extra-grave-item a {
                color: #1a73e8;
                text-decoration: none;
            }
            .extra-grave-item a:hover {
                text-decoration: underline;
            }

            .info-status-bar {
                height: 4px;
                border-radius: 8px 8px 0 0;
            }

            /* Legend */
            .legend {
                margin-top: 15px;
                padding-top: 12px;
                border-top: 1px solid #eee;
            }
            .legend-title {
                font-size: 0.7rem;
                font-weight: 700;
                color: #5f6368;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                margin-bottom: 8px;
            }
            .legend-items {
                display: flex;
                flex-direction: column;
                gap: 4px;
            }
            .legend-item {
                display: flex;
                align-items: center;
                gap: 6px;
                font-size: 0.8rem;
                color: #3c4043;
                cursor: pointer;
                padding: 3px 6px;
                border-radius: 4px;
                transition: opacity 0.2s, background 0.2s;
                user-select: none;
            }
            .legend-item:hover {
                background: #f1f3f4;
            }
            .legend-item.active {
                background: #e8f0fe;
                font-weight: 600;
            }
            .legend-dot {
                width: 12px;
                height: 12px;
                border-radius: 3px;
                box-sizing: border-box;
                flex-shrink: 0;
            }

            .btn-link {
                display: none;
                align-items: center;
                justify-content: center;
                gap: 6px;
                margin-top: 12px;
                padding: 8px 0;
                background: #1a73e8;
                color: #fff;
                border-radius: 4px;
                text-decoration: none;
                font-size: 0.85rem;
                font-weight: 500;
                transition: background 0.2s;
            }
            .btn-link:hover {
                background: #1557b0;
            }

#wpadminbar {
                display: none !important;
            }
            html,
            body,
            body.admin-bar {
                margin-top: 0 !important;
                padding-top: 0 !important;
            }

            @page {
                margin: 8mm;
            }

            @media print {
                html,
                body,
                body.admin-bar {
                    margin: 0 !important;
                    padding: 0 !important;
                    overflow: visible !important;
                    background: #fff !important;
                    -webkit-print-color-adjust: exact;
                    print-color-adjust: exact;
                }

                #map {
                    height: 100vh !important;
                    width: 100% !important;
                }

                .map-loading-badge,
                .map-type-icon-btn,
                .map-hd-toggle-btn,
                #info-panel,
                #loading-modal,
                .loading-overlay,
                .cemetery-modal,
                #sidebar .content,
                #sidebar .header-actions,
                #sidebar .viewer-structure-controls,
                #printPreviewOverlay {
                    display: none !important;
                }

                #sidebar {
                    top: 8mm !important;
                    left: 8mm !important;
                    width: auto !important;
                    max-height: none !important;
                    min-width: 0 !important;
                    background: #fff !important;
                    border: 1px solid rgba(32, 33, 36, 0.2);
                    border-radius: 0 !important;
                    box-shadow: none !important;
                }

                #sidebar .header {
                    padding: 6px 8px !important;
                    background: #fff !important;
                    border: 0 !important;
                    border-radius: 0 !important;
                }

                #sidebar .header-top {
                    gap: 0 !important;
                }

                #sidebar .header-brand {
                    gap: 0 !important;
                }

                #sidebar .header-brand > div {
                    display: none !important;
                }

                #sidebar .header-brand .header-logo.hidden + div {
                    display: block !important;
                }

                #sidebar .header-logo {
                    display: block !important;
                    max-width: 120px !important;
                    max-height: 42px !important;
                    border-radius: 0 !important;
                }

                #sidebar .header-brand .header-logo.hidden {
                    display: none !important;
                }

                .map-label {
                    font-size: 11px !important;
                    font-weight: 700 !important;
                    line-height: 1.1 !important;
                    text-shadow:
                        0 0 2px rgba(0, 0, 0, 0.98),
                        0 1px 1px rgba(0, 0, 0, 0.9) !important;
                }

                .map-label--area {
                    padding: 2px 6px !important;
                    border-color: rgba(207, 216, 220, 0.95) !important;
                    background: rgba(55, 71, 79, 0.96) !important;
                }

                .map-label--manzana {
                    padding: 3px 8px !important;
                    border-color: rgba(255, 235, 156, 0.95) !important;
                    background: rgba(118, 89, 0, 0.96) !important;
                    box-shadow: none !important;
                }

                .map-label--tablon {
                    padding: 2px 6px !important;
                    border-color: rgba(222, 190, 164, 0.95) !important;
                    background: rgba(74, 50, 44, 0.96) !important;
                }

                .map-label--sepultura {
                    font-size: 10px !important;
                    text-shadow:
                        0 0 2px rgba(0, 0, 0, 0.98),
                        0 1px 1px rgba(0, 0, 0, 0.92) !important;
                }

                .gm-style,
                .gm-style img,
                .gm-style canvas {
                    -webkit-print-color-adjust: exact;
                    print-color-adjust: exact;
                }
            }
