:root {
    --primary: #60a5fa;
    --primary-dark: #2563eb;
    --accent: #fb7185;
    --bg: #07111f;
    --bg-2: #0f172a;
    --surface: rgba(255,255,255,0.12);
    --surface-strong: rgba(255,255,255,0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: rgba(255,255,255,0.18);
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(circle at top left, #10223d 0%, var(--bg) 45%, var(--bg-2) 100%);
    color: var(--text);
    min-height: 100vh;
}
.admin-page {
    overflow: hidden;
    background: #ffffff;
}
.admin-page .admin-main,
.admin-page .admin-tab-panels { overflow-x: hidden; }
.admin-page .admin-main { height: 100vh; min-height: 0; overflow: hidden; }
.admin-page .admin-tab-panels { height: 100vh; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 32px; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, rgba(96,165,250,0.16), transparent 35%, rgba(251,113,133,0.16));
    pointer-events: none;
}

header {
    background: transparent;
    color: white;
    padding: 24px 28px 0;
}

header h1 { margin: 0 0 8px; font-size: 1.8rem; }
header p { margin: 0; opacity: 0.95; }

main { padding: 0; height: 100%; }

.header-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.brand-group { display: flex; align-items: center; gap: 14px; }
.brand-icon { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,0.16); display: grid; place-items: center; font-size: 24px; color: white; border: 1px solid rgba(255,255,255,0.18); }
.header-bar h1 { margin: 0; font-size: 1.6rem; }
.header-bar p { margin: 0; color: rgba(255,255,255,0.8); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-btn { padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.18); color: white; text-decoration: none; font-weight: 600; box-shadow: 0 10px 24px rgba(0,0,0,0.16); transition: transform 0.2s ease; }
.header-btn:hover { transform: translateY(-2px); }

.map-overlay-top { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; gap: 16px; z-index: 5; }
.map-search-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 12px;
    background: rgba(255,255,255,0.96);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    width: min(400px, 100%);
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: border-radius 0.2s ease, box-shadow 0.2s ease;
}
.map-search-card.has-results {
    border-radius: 22px 22px 0 0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
.map-search-card input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
    color: #1f2937;
    font-size: 15px;
    min-width: 140px;
    font-weight: 500;
}
.map-search-card input::placeholder {
    color: rgba(31, 41, 55, 0.7);
    font-size: 15px;
    font-weight: 500;
}
.map-search-card button {
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: rgba(31, 41, 55, 0.9);
    cursor: pointer;
    font-size: 14px;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.search-results-dropdown {
    overflow-y: auto;
    max-height: 300px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

.search-no-results {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-top: none;
    border-radius: 0 0 18px 18px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.search-results-dropdown::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.search-highlight {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    padding: 0 2px;
}
.map-action-buttons { display: flex; gap: 10px; align-items: center; }
.map-action-buttons button,
.map-action-buttons #open-360-tour-btn,
.map-action-buttons .map-admin-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: none; border-radius: 999px; background: rgba(255,255,255,0.18); color: white; cursor: pointer; font: 600 1rem/1.2 Arial, sans-serif; white-space: nowrap; box-shadow: 0 10px 22px rgba(0,0,0,0.18); text-decoration: none; transition: transform 0.2s ease; }
.map-action-buttons button:hover,
.map-action-buttons #open-360-tour-btn:hover,
.map-action-buttons .map-admin-btn:hover { transform: translateY(-2px); }
.map-logout-form { margin: 0; }
.map-logout-btn { font: 600 1rem/1.2 Arial, sans-serif; }
.map-action-buttons #buildings-toggle-btn,
.map-action-buttons #directory-toggle-btn,
.map-action-buttons #open-360-tour-btn,
.map-action-buttons .map-admin-btn {
    background: #FFFFFF;
    color: #1F1F1F;
}

.report-issue-btn {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18) !important;
}

.report-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}

.report-modal.hidden {
    display: none;
}

.unsaved-changes-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.unsaved-changes-modal.hidden {
    display: none;
}

.unsaved-changes-box {
    width: min(760px, 100%);
    background: rgba(31, 41, 55, 0.9);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
    padding: 28px 32px 20px;
    color: #f8fafc;
}

.unsaved-changes-message {
    font-size: clamp(1.05rem, 1.5vw, 1.8rem);
    line-height: 1.4;
    text-align: center;
    margin-bottom: 24px;
    color: #f8fafc;
    font-weight: 500;
}

.unsaved-changes-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.unsaved-changes-actions button {
    border: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 10px 8px;
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

.unsaved-changes-actions button:hover {
    opacity: 0.9;
}

.unsaved-save-btn {
    color: #22c55e;
}

.unsaved-quit-btn {
    color: #f97316;
}

.unsaved-back-btn {
    color: #38bdf8;
}

.report-modal-box {
    width: min(560px, 100%);
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
    padding: 20px;
    color: white;
}

.report-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.report-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.report-close-btn {
    border: none;
    background: rgba(255,255,255,0.08);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 1.5rem;
    cursor: pointer;
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.report-form label {
    font-weight: 600;
    color: #e2e8f0;
}

.report-form textarea,
.report-form input[type="file"] {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.8);
    color: white;
    border-radius: 10px;
    padding: 12px 14px;
}

.report-form textarea {
    resize: vertical;
    min-height: 120px;
}

.report-form small {
    color: rgba(226, 232, 240, 0.8);
    display: block;
    margin-top: 6px;
}

.report-form select,
.report-form input[type="text"] {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.8);
    color: white;
    border-radius: 10px;
    padding: 12px 14px;
}

.report-category-custom {
    display: block;
}

.report-upload-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.report-category-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #bfdbfe;
    font-size: 0.68rem;
    font-weight: 700;
}

.report-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 160px;
    overflow: auto;
}

.report-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: white;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.fullpage-tour-editor {
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    margin: 0;
    max-width: 100vw;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: #111111;
    color: #f3f3f3;
}

.fullpage-tour-editor .tour-editor-card,
.fullpage-tour-editor .manage-scenes-card,
.fullpage-tour-editor .scene-upload-panel .admin-card,
.fullpage-tour-editor .tour-editor-settings .admin-card,
.fullpage-tour-editor .uploaded-scene-list-card {
    background: rgba(17, 17, 17, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18) !important;
}

.fullpage-tour-editor .tour-page-topbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 8px 16px;
    margin: 0;
    min-height: 46px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #000000 !important;
}

.fullpage-tour-editor .tour-page-topbar h1,
.fullpage-tour-editor .tour-page-topbar a,
.fullpage-tour-editor .settings-field label,
.fullpage-tour-editor .settings-value,
.fullpage-tour-editor #selected-hotspot-label,
.fullpage-tour-editor .viewer-settings-toggle,
.fullpage-tour-editor .btn-secondary,
.fullpage-tour-editor .scene-list-item,
.fullpage-tour-editor .scene-list button,
.fullpage-tour-editor .scene-list .scene-item-actions,
.fullpage-tour-editor .scene-list .scene-delete-btn,
.fullpage-tour-editor textarea,
.fullpage-tour-editor input,
.fullpage-tour-editor select,
.fullpage-tour-editor .scene-list-item-title,
.fullpage-tour-editor .scene-list-item-name {
    color: #f3f3f3 !important;
}

.fullpage-tour-editor .btn-secondary,
.fullpage-tour-editor .viewer-settings-toggle {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    padding: 6px 12px;
    font-size: 0.8rem;
    line-height: 1.2;
    min-height: 30px;
}

.fullpage-tour-editor textarea,
.fullpage-tour-editor input,
.fullpage-tour-editor select {
    background: #111111 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f3f3f3 !important;
}

.fullpage-tour-editor .scene-list-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.fullpage-tour-editor .scene-list-item.selected,
.fullpage-tour-editor .scene-list-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.fullpage-tour-editor .uploaded-scene-list-card {
    overflow: visible;
    position: relative;
    z-index: 8;
    height: auto;
    background: rgba(17, 17, 17, 0.96) !important;
.fullpage-tour-editor .tour-page-topbar {
    background: #000000 !important;
}
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    pointer-events: auto;
}

.fullpage-tour-editor .scene-list {
    overflow: visible;
    position: relative;
    z-index: 1010;
}

.tour-page-topbar a {
    margin: 0;
    text-decoration: none;
}

.fullpage-tour-editor .tour-page-topbar a,
.fullpage-tour-editor .btn-secondary,
.fullpage-tour-editor .viewer-settings-toggle {
    text-decoration: none;
}

.fullpage-tour-editor .tour-page-topbar,
.fullpage-tour-editor .tour-page-topbar h1,
.fullpage-tour-editor .tour-page-topbar a,
.fullpage-tour-editor .tour-editor-card,
.fullpage-tour-editor .tour-editor-settings .admin-card,
.fullpage-tour-editor .scene-upload-panel .admin-card,
.fullpage-tour-editor .uploaded-scene-list-card,
.fullpage-tour-editor .btn-secondary,
.fullpage-tour-editor .viewer-settings-toggle,
.fullpage-tour-editor textarea,
.fullpage-tour-editor input,
.fullpage-tour-editor select {
    background-color: #111111 !important;
    color: #f3f3f3 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.tour-page-topbar h1 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    flex: 1;
    text-align: center;
}

.tour-editor-card {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    background: rgba(255,255,255,0.06);
    border-radius: 0;
    padding: 0 !important;
    border: none;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    height: 100vh;
    min-height: auto;
}

.tour-editor-card > .tour-editor-grid {
    width: 100%;
    height: 100%;
    padding: 0;
    flex: 1;
    min-height: 0;
}

.tour-editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.tour-editor-grid.settings-open {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 0;
    height: calc(100vh - 46px);
}

.manage-scenes-card {
    width: 100%;
    max-height: 100%;
    overflow: hidden;
}

.tour-editor-settings {
    display: none;
    width: 100%;
    box-sizing: border-box;
    height: calc(100vh - 46px);
    max-height: calc(100vh - 46px);
    overflow: hidden;
}

.tour-editor-grid.settings-open .tour-editor-settings {
    display: block;
}

.tour-editor-main {
    width: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    height: 100%;
    min-height: 0;
    overflow: visible !important;
    position: relative;
}

.panorama-viewer-shell {
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    background: #111111;
    pointer-events: auto;
    transition: height 180ms ease;
}

.fullpage-tour-editor .panorama-viewer-shell.thumbnail-bar-visible {
    height: 100%;
}

.fullpage-tour-editor .panorama-viewer-shell.thumbnail-bar-collapsed {
    height: 100%;
}

.admin-panorama-viewer,
.fullpage-tour-editor .pnlm-container,
.fullpage-tour-editor .pnlm-render-container,
.fullpage-tour-editor .pnlm-panorama-image {
    width: 100% !important;
    height: 100% !important;
    background: #111111 !important;
}

button#toggle-hotspot-settings,
button#toggle-hotspot-settings:hover,
button#toggle-hotspot-settings:focus,
button#toggle-hotspot-settings:focus-visible,
.viewer-settings-toggle,
.viewer-settings-toggle:hover,
.viewer-settings-toggle:focus,
.viewer-settings-toggle:focus-visible {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    padding: 8px 12px;
    border-radius: 0 !important;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text);
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    min-width: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    outline: none;
    transform: none !important;
}

button#toggle-hotspot-settings:hover,
button#toggle-hotspot-settings:focus-visible,
.viewer-settings-toggle:hover,
.viewer-settings-toggle:focus-visible {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.18);
}

/* Sharp button edges for Pannellum controls */
.pnlm-controls {
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    left: 0 !important;
    top: 0 !important;
    gap: 0 !important;
}

.pnlm-controls button {
    border-radius: 0 !important;
    margin: 0 !important;
    border-top: none !important;
    border-left: none !important;
}

.pnlm-controls button:first-child {
    margin-top: 0 !important;
}

.panorama-viewer-shell .pnlm-controls {
    position: absolute;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

.pnlm-container .pnlm-controls {
    left: 0 !important;
    top: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
}

.map-shell {
    position: relative;
    background: rgba(255,255,255,0.08);
    border-radius: 0;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border: none;
}
.map-shell img {
    width: 100%;
    height: auto;
    display: block;
    filter: saturate(0.98) contrast(1.02);
}
.map-branding {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.52);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    color: #f8fafc;
    z-index: 8;
    max-width: calc(100% - 40px);
}
.map-branding h1 {
    margin: 0;
    font-size: 1.2rem;
}
.map-branding p {
    margin: 4px 0 0;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.82);
}

.search-box { display: none; }
.search-box button:hover, .panel form button:hover, .btn-primary:hover, .btn-secondary:hover, .chat-button:hover, .directory-item:hover {
    transform: translateY(-2px);
}

.dashboard { display: grid; grid-template-columns: 1fr; gap: 0; min-height: 100vh; height: 100vh; }

.full-screen-map .map-panel {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    min-height: 100vh;
}

.map-panel, .panel {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(18px);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
    border: 1px solid rgba(255,255,255,0.12);
}
.map-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 21;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: max-content;
    min-width: clamp(44px, 7cqw, 96px);
    max-width: 24cqw;
    border: 2px solid transparent;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    color: white;
    border-radius: 999px;
    padding: clamp(3px, 0.7cqw, 8px) clamp(5px, 1cqw, 12px);
    font-size: clamp(8px, 1.1cqw, 14px);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    transform-origin: center center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 8px 18px rgba(244, 63, 94, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.map-hotspot.selected {
    background: linear-gradient(135deg, rgba(34,213,94,0.98), rgba(16,185,129,0.95));
    border-color: rgba(255,255,255,0.95);
    box-shadow: 0 20px 70px rgba(34,213,94,0.28);
    transform: translate(-50%, -50%) scale(calc(var(--building-label-scale, 1) * 1.08));
    animation: float-label 3.5s ease-in-out infinite alternate;
    z-index: 22;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    will-change: transform, box-shadow;
}

.smartnav-index-page .map-hotspot {
    left: clamp(0%, var(--map-label-x, 50%), 100%);
    top: clamp(0%, var(--map-label-y, 50%), 100%);
    transform: translate(-50%, -50%) scale(var(--building-label-scale, 1));
}

.map-hotspot.selected::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.14), transparent 60%);
    opacity: 0.8;
    pointer-events: none;
}

@keyframes float-label {
    from {
        transform: translate(-50%, -50%) scale(calc(var(--building-label-scale, 1) * 1.08));
        box-shadow: 0 20px 70px rgba(34,213,94,0.28);
    }
    to {
        transform: translate(-50%, -56%) scale(calc(var(--building-label-scale, 1) * 1.08));
        box-shadow: 0 26px 80px rgba(34,213,94,0.24);
    }
}

/* Map interaction styles */
.map-inner { width: 100%; height: auto; transform-origin: 0 0; touch-action: none; position: relative; container-type: inline-size; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.map-shell { display: flex; justify-content: center; align-items: flex-start; position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
#campus-map-image, #map-hotspots { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
#map-paths { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
#map-paths .pathway-hit-area { stroke: transparent; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: crosshair; }
#map-paths .pathway-public-line { stroke: transparent; stroke-width: 4px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0; pointer-events: none; filter: none; }
#map-paths .pathway-public-layer { pointer-events: none; z-index: 2; }
#map-paths .pathway-route-line { stroke: #facc15; stroke-width: 8px; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12 8; stroke-dashoffset: 0; animation: pathway-route-forward 850ms linear infinite; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px rgba(15,23,42,.9)) drop-shadow(0 0 5px rgba(255,255,255,.85)); }
#map-paths .pathway-start-marker .pathway-location-pin { fill: #ef4444; stroke: #fff; stroke-width: .32; vector-effect: non-scaling-stroke; }
#map-paths .pathway-end-marker .pathway-location-pin { fill: #2563eb; stroke: #fff; stroke-width: .32; vector-effect: non-scaling-stroke; }
#map-paths .pathway-location-dot { fill: #fff; pointer-events: none; }
#map-paths .pathway-public-line { filter: drop-shadow(0 1px 2px rgba(15,23,42,.35)); }

.building-hover-card { position: absolute; width: 220px; border-radius: 18px; padding: 12px; background: rgba(8, 14, 28, 0.95); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 24px 60px rgba(0,0,0,0.35); color: #fff; z-index: 30; pointer-events: auto; backdrop-filter: blur(16px); transform: translate(0, 0); }
.building-hover-card.hidden { display: none; }
.building-hover-card .hover-image-wrapper { width: 100%; height: 110px; overflow: hidden; border-radius: 14px; background: rgba(255,255,255,0.06); margin-bottom: 10px; display: grid; place-items: center; }
.building-hover-card .hover-image-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.building-hover-card .hover-no-image { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,0.72); font-size: 0.92rem; text-align: center; padding: 10px; }
.building-hover-card .hover-title { margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.building-hover-card .hover-actions { display: flex; gap: 8px; }
.building-hover-card .hover-directions-btn { flex: 1; padding: 8px 10px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.16); color: #fff; border-radius: 999px; cursor: pointer; font-size: 0.92rem; transition: background 0.2s ease, transform 0.2s ease; }
.building-hover-card .hover-directions-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.building-hover-card .hover-directions-btn.disabled { opacity: 0.55; cursor: default; }
#map-paths polyline.animated-path {
    stroke: rgba(255,255,255,0.98);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 20 14;
    stroke-dashoffset: 0;
    animation: path-dash 1.2s linear infinite;
    filter: drop-shadow(0 0 14px rgba(255,255,255,0.9)) drop-shadow(0 0 26px rgba(255,255,255,0.5));
}
#map-paths circle { filter: drop-shadow(0 0 4px rgba(0,0,0,0.25)); }
#map-paths circle.path-end-marker {
    fill: #ffffff;
    stroke: #1be7ff;
    stroke-width: 1.8;
    opacity: 0.98;
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(27,231,255,0.7));
}
#map-paths g.path-end-marker {
    pointer-events: none;
    transform-origin: center center;
}
#map-paths path.path-end-pin {
    fill: #ff3d3d;
    stroke: #ffffff;
    stroke-width: 0.18;
    filter: drop-shadow(0 1px 5px rgba(0,0,0,0.16));
}
#map-paths circle.path-end-dot {
    fill: #ffffff;
    stroke: #1be7ff;
    stroke-width: 0.14;
}
#map-picker svg, #path-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#path-svg { pointer-events: auto; }
#path-svg circle { pointer-events: all; cursor: move; }

@keyframes path-dash {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -16; }
}
@keyframes pathway-route-forward {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -20; }
}
#map-hotspots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.map-hotspot { pointer-events: auto; z-index: 21; }
.map-shell.dragging { cursor: grabbing; }
.map-inner.transition { transition: transform 300ms cubic-bezier(.2,.9,.1,1); }
.map-controls { position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 10; }
.map-control { width: 44px; height: 44px; border-radius: 10px; border: none; background: rgba(0,0,0,0.56); color: white; font-size: 18px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,0.36); }
.map-control:hover { transform: translateY(-3px); }
.pathway-location-control svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pathway-location-control.active { background: #0f766e; color: #ffffff; outline: 2px solid #5eead4; outline-offset: 2px; }
.pathway-clear-control svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pathway-clear-control:hover { background: #fee2e2; color: #b91c1c; }
.pathway-clear-control.active { background: #dc2626; color: #ffffff; outline: 2px solid #fca5a5; outline-offset: 2px; }
.map-shell .map-inner img { user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pathway-public-controls { position: absolute; right: 16px; bottom: 16px; z-index: 12; display: flex; flex-wrap: wrap; gap: 8px; max-width: min(520px, calc(100% - 80px)); justify-content: flex-end; }
.pathway-public-controls button { border: 1px solid rgba(255,255,255,.28); border-radius: 8px; padding: 9px 12px; background: rgba(15,23,42,.86); color: #fff; cursor: pointer; }
.pathway-public-controls button.active { background: #0f766e; border-color: #5eead4; }
.pathway-public-controls button:disabled { opacity: .5; cursor: not-allowed; }
.pathway-public-controls p { flex-basis: 100%; margin: 0; color: #fff; text-align: right; text-shadow: 0 1px 3px #000; font-size: .88rem; }
.pathway-distance-meter { flex-basis: 100%; color: #fff; text-align: right; font-size: .95rem; font-weight: 700; text-shadow: 0 1px 3px #000; }
.pathway-toolbar, .pathway-selection-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.pathway-status { min-height: 20px; color: var(--muted); }
.pathway-editor-card { padding: 10px; }
.pathway-editor-content { position: relative; width: 100%; aspect-ratio: 1356 / 2048; overflow: hidden; }
.pathway-editor-content img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
#pathway-editor-svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
#pathway-editor-svg .admin-pathway-line { fill: none; stroke: #20d47a; stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; cursor: pointer; }
#pathway-editor-svg .admin-pathway-line.selected { stroke: #ffca28; stroke-width: 1.2; }
#pathway-editor-svg .admin-pathway-line.route-selected { stroke: #2563eb; stroke-width: 1.1; }
#pathway-editor-svg .admin-pathway-preview { fill: none; stroke: #65d9ff; stroke-width: .65; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
#pathway-editor-svg .admin-pathway-node { fill: #fff; stroke: #0f766e; stroke-width: .35; vector-effect: non-scaling-stroke; cursor: pointer; }
#pathway-editor-svg .admin-pathway-node.selected { fill: #ffca28; stroke: #92400e; stroke-width: .5; }
#pathway-editor-svg .admin-pathway-node.route-start-selected { fill: #34d399; stroke: #065f46; }
#pathway-editor-svg .admin-pathway-node.route-end-selected { fill: #fb7185; stroke: #9f1239; }
#pathway-editor-svg .admin-pathway-node-label { fill: #102a43; font-size: 1.4px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: .35px; }
#pathway-editor-svg .admin-pathway-geometry-handle { fill: #ffca28; stroke: #111827; stroke-width: .25; vector-effect: non-scaling-stroke; cursor: move; }
.pathway-selection-row select { min-width: 220px; padding: 8px; }

/* pointer cursor for dragging */
.map-inner:active, .map-shell.dragging { cursor: grabbing; }

.directory-item.selected {
    border: 2px solid rgba(34,213,94,0.95);
    background: rgba(34,213,94,0.12);
    box-shadow: 0 14px 28px rgba(34,213,94,0.16);
}

.map-picker-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255,255,255,0.08);
}
.map-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--muted);
}
.map-picker {
    position: relative;
    container-type: inline-size;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(2,6,23,0.35);
    min-height: 320px;
    cursor: crosshair;
}
.path-zoom-controls button {
    min-width: 34px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: var(--text);
    background: rgba(255,255,255,0.06);
    cursor: pointer;
}
.path-zoom-controls button.active {
    background: rgba(34,213,94,0.16);
    border-color: rgba(34,213,94,0.35);
}
.map-picker img {
    width: 100%;
    height: auto;
    display: block;
}
#path-picker-content {
    transform-origin: 0 0;
    will-change: transform;
    touch-action: none;
    user-select: none;
}
.picker-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(var(--building-label-scale, 1));
    font-size: 30px;
    color: #fb7185;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
    cursor: grab;
    user-select: none;
    z-index: 2;
}
.picker-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}
.picker-label {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: clamp(44px, 7cqw, 96px);
    max-width: 24cqw;
    border: 2px solid transparent;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    color: white;
    border-radius: 999px;
    padding: clamp(3px, 0.7cqw, 8px) clamp(5px, 1cqw, 12px);
    font-size: clamp(8px, 1.1cqw, 14px);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(244, 63, 94, 0.25);
    cursor: grab;
    pointer-events: auto;
    user-select: none;
    z-index: 11;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.picker-label.selected {
    background: linear-gradient(135deg, rgba(34,213,94,0.98), rgba(16,185,129,0.95));
    border-color: rgba(255,255,255,0.95);
    box-shadow: 0 20px 70px rgba(34,213,94,0.28);
    transform: translate(-50%, -50%) scale(calc(var(--building-label-scale, 1) * 1.08));
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.picker-label.dragging {
    cursor: grabbing;
}
.picker-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

/* Inside list shown in the detail description when "Inside" is clicked */
.inside-list { max-height: 260px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: rgba(255,255,255,0.03); margin-top:8px; overflow: hidden; min-height: 0; }
.inside-list-header-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); flex: 0 0 auto; }
.inside-list-header { font-weight:700; color: var(--text); }
.inside-controls { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.inside-controls .inside-floor-select { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid rgba(255,255,255,0.06); min-width: 120px; }
.inside-controls .inside-category-wrap { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.inside-controls .inside-category-wrap label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; color: rgba(255,255,255,0.75); }
.inside-controls .inside-floor-select,
.inside-controls .inside-category-wrap,
.inside-controls .inside-category-wrap label,
.inside-controls .inside-category-wrap input[type="radio"] + span,
.inside-controls .inside-category-wrap input[type="radio"]:checked + span {
    color: #1F1F1F;
}
.inside-controls .inside-floor-select {
    background: #FFFFFF;
    border-color: rgba(31, 31, 31, 0.18);
}
.inside-controls .inside-category-wrap input[type="radio"] { accent-color: #7ef2c0; width: 16px; height: 16px; }
.inside-controls .inside-category-wrap input[type="radio"] + span { display: inline-block; }
.inside-controls .inside-category-wrap input[type="radio"]:checked + span { color: #ffffff; }
.inside-controls .inside-category-wrap input[type="radio"]:checked { border-color: #7ef2c0; }
.inside-controls .inside-category-wrap input[type="radio"]:focus-visible + span,
.inside-controls .inside-category-wrap label:hover { color: #ffffff; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }
.inside-item { padding: 12px; margin: 6px 8px; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); box-shadow: 0 8px 18px rgba(0,0,0,0.18); color: var(--text); text-align: left; cursor: pointer; border: 1px solid transparent; }
.inside-item:hover { border-color: rgba(255,255,255,0.2); }
.inside-item.selected { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }
.inside-item strong { display:block; font-size: 15px; color: var(--text); }
.inside-item p { margin: 6px 0 0; font-size: 13px; color: rgba(255,255,255,0.86); }

/* custom slim scrollbar */
.inside-list::-webkit-scrollbar { width: 10px; }
.inside-list::-webkit-scrollbar-track { background: transparent; }
.inside-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

.inside-floor { padding: 6px 8px; }
.inside-floor-header { font-weight:700; margin:8px 0 6px; color: var(--muted); font-size: 13px; }
.inside-items { display: flex; flex-direction: column; gap: 6px; }

.map-overlay-widgets {
    position: absolute;
    top: 92px;
    right: 20px;
    display: grid;
    gap: 16px;
    width: min(380px, calc(100% - 40px));
    z-index: 6;
}

.map-overlay-widgets .nav-widget {
    background: rgba(255,255,255,0.09);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

/* Make the info card stretch so the inside-list can occupy remaining space */
.map-overlay-widgets .nav-widget.info-card {
    display: flex;
    flex-direction: column;
    min-height: 360px;
    position: relative;
}

.info-card-toggle {
    display: none;
}

#inside-list-container {
    display: none;
    margin-top: 10px;
    flex: 1 1 auto;
    overflow: hidden;
    min-height: 0;
    max-height: 260px;
}

/* ensure the inside-list inside the container fills and scrolls */
#inside-list-container .inside-list {
    max-height: 260px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#inside-list-container .inside-items {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-anchor: none;
    min-height: 0;
    padding-right: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#inside-list-container .inside-items::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.map-overlay-widgets h4 {
    margin: 0 0 10px;
    color: #f8fafc;
    font-size: 16px;
}

.map-overlay-widgets p {
    margin: 0 0 10px;
    color: rgba(255,255,255,0.78);
}

.map-overlay-widgets textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    resize: vertical;
}

.map-overlay-widgets .directory-list {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.map-overlay-widgets .directory-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.directory-list, .chat-messages, .report-list { display: flex; flex-direction: column; gap: 10px; }
.directory-item {
    border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,0.06); color: #f8fafc; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.directory-item:hover { transform: translateY(-2px); box-shadow: 0 14px 35px rgba(0,0,0,0.22); }
.directory-item strong { display: block; margin-bottom: 4px; color: #f8fafc; }
.directory-item small { color: rgba(248,250,252,0.75); }

.map-overlay-widgets .buildings-card {
    background: #F4FBFC;
    color: #1F1F1F;
    border-color: rgba(31, 31, 31, 0.14);
}
.map-overlay-widgets .buildings-card h4,
.map-overlay-widgets .buildings-card .directory-item,
.map-overlay-widgets .buildings-card .directory-item strong,
.map-overlay-widgets .buildings-card .directory-item small {
    color: #1F1F1F;
}
.map-overlay-widgets .buildings-card .directory-item {
    background: #F4FBFC;
    border-color: rgba(31, 31, 31, 0.12);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}
.map-overlay-widgets .buildings-card .directory-item:hover,
.map-overlay-widgets .buildings-card .directory-item.selected {
    background: #EAF4F5;
    border-color: rgba(31, 31, 31, 0.28);
}
.map-overlay-widgets .directory-card {
    background: #F4FBFC;
    color: #1F1F1F;
    border-color: rgba(31, 31, 31, 0.14);
}
.map-overlay-widgets .directory-card h4,
.map-overlay-widgets .directory-card .directory-item,
.map-overlay-widgets .directory-card .directory-item strong,
.map-overlay-widgets .directory-card .directory-item small {
    color: #1F1F1F;
}
.map-overlay-widgets .directory-card .directory-item {
    background: #F4FBFC;
    border-color: rgba(31, 31, 31, 0.12);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}
.map-overlay-widgets .directory-card .directory-item:hover,
.map-overlay-widgets .directory-card .directory-item.selected {
    background: #EAF4F5;
    border-color: rgba(31, 31, 31, 0.28);
}

.btn-secondary { background: rgba(255,255,255,0.14); color: var(--text); border: 1px solid rgba(255,255,255,0.14); padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: transform 0.2s ease; }

.hidden { display: none !important; }
.info-card h3, .panel h3 { margin-top: 0; color: #f8fafc; }
.info-card p, .panel p { color: rgba(255,255,255,0.75); }

.chat-button {
    position: fixed; right: 24px; bottom: 24px; border: 0; border-radius: 999px; padding: 14px 18px; background: linear-gradient(135deg, rgba(251, 113, 133, 0.9), rgba(249, 115, 22, 0.9)); color: white; cursor: pointer; z-index: 20; box-shadow: 0 14px 30px rgba(244, 63, 94, 0.28); transition: transform 0.2s ease, box-shadow 0.2s ease; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.chat-button:hover { transform: translateY(-2px); box-shadow: 0 20px 38px rgba(244, 63, 94, 0.34); }
.chat-panel {
    position: fixed; right: 24px; bottom: 90px; width: 360px; max-width: calc(100vw - 32px); background: rgba(8, 15, 30, 0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 18px; box-shadow: 0 20px 44px rgba(15, 23, 42, 0.35); display: none; z-index: 20; overflow: hidden;
}
.map-action-buttons .inline-chat-button { position: static; right: auto; bottom: auto; padding: 9px 12px; border-radius: 999px; background: #FFFFFF; color: #1F1F1F; cursor: pointer; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2); border: 1px solid rgba(255,255,255,0.18); font-weight:700; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.map-action-buttons .inline-chat-button .action-label { display: none; }
.chat-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 14px;
    border: 2px solid #1F1F1F;
    border-radius: 5px;
}
.chat-icon::after {
    content: '';
    position: absolute;
    left: 2px;
    bottom: -5px;
    width: 6px;
    height: 6px;
    background: #FFFFFF;
    border-left: 2px solid #1F1F1F;
    border-bottom: 2px solid #1F1F1F;
    transform: skewY(-28deg);
}
.chat-panel.show { display: block; }
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(37, 99, 235, 0.92));
    color: white;
    padding: 14px 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.chat-session-control {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.1);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.chat-session-control:hover,
.chat-session-control:focus-visible {
    background: rgba(2, 6, 23, 0.18);
}
.chat-menu-button {
    display: grid;
    place-items: center;
    gap: 3px;
    width: 32px;
    padding: 5px;
}
.chat-menu-button span {
    display: block;
    width: 15px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}
.chat-session-drawer {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid rgba(16, 42, 67, 0.12);
    box-shadow: 10px 0 26px rgba(16, 42, 67, 0.14);
}
.chat-session-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 58px;
    padding: 12px 12px 12px 16px;
    border-bottom: 1px solid rgba(16, 42, 67, 0.1);
    color: #102a43;
}
.chat-session-drawer-header strong {
    font-size: 0.88rem;
}
.chat-session-drawer .chat-sessions {
    max-height: none;
    border-bottom: 0;
}
.chat-sessions {
    max-height: 180px;
    overflow-y: auto;
    padding: 8px;
    background: #ffffff;
    border-bottom: 1px solid rgba(16, 42, 67, 0.1);
}
.chat-session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #243b53;
    text-align: left;
}
.chat-session-item:hover,
.chat-session-item.active {
    background: #e8f7f6;
    border-color: rgba(14, 159, 157, 0.24);
}
.chat-session-open {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.chat-session-delete {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #829ab1;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.chat-session-delete:hover,
.chat-session-delete:focus-visible {
    background: #fee2e2;
    color: #b42318;
}
.chat-session-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}
.chat-session-item small {
    flex-shrink: 0;
    color: #829ab1;
    font-size: 0.68rem;
}
.chat-sessions-empty {
    padding: 10px;
    color: #627d98;
    font-size: 0.78rem;
    text-align: center;
}
.chat-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.16);
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.chat-close:hover,
.chat-close:focus-visible {
    background: rgba(2, 6, 23, 0.3);
}
.chat-body {
    padding: 14px 12px 10px;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(248, 250, 252, 0.04);
}
.chat-body::-webkit-scrollbar { width: 8px; }
.chat-body::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.45); border-radius: 999px; }
.chat-message {
    margin-bottom: 10px;
    padding: 11px 13px;
    border-radius: 14px;
    line-height: 1.5;
    font-size: 0.94rem;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.12);
}
.chat-message.user {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(59, 130, 246, 0.16));
    margin-left: 22px;
    border-color: rgba(96,165,250,0.22);
    color: #f8fbff;
}
.chat-message.bot {
    background: rgba(255,255,255,0.07);
    margin-right: 22px;
    border-color: rgba(255,255,255,0.12);
    color: #edf6ff;
}
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    min-width: 54px;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    animation: assistant-typing 1.1s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.14s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.28s; }
@keyframes assistant-typing {
    0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
    30% { opacity: 0.9; transform: translateY(-3px); }
}
.quick-replies {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}
.quick-reply-btn {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255,255,255,0.08);
    color: #f8fafc;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.quick-reply-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.12);
}
.quick-reply-btn:disabled,
.quick-reply-btn.selected {
    cursor: default;
    opacity: 0.58;
    transform: none;
}
.smartnav-toast {
    position: fixed;
    right: 24px;
    bottom: 104px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(8, 15, 28, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: white;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 250;
}
.smartnav-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.smartnav-toast.success {
    border-color: rgba(16, 185, 129, 0.35);
}
.smartnav-toast.error {
    border-color: rgba(248, 113, 113, 0.35);
}
.toast-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    font-weight: 800;
    color: #dbeafe;
    flex-shrink: 0;
}
.smartnav-toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.smartnav-toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}
.toast-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.toast-content strong {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}
.toast-content span {
    font-size: 0.94rem;
    line-height: 1.4;
}
.chat-footer {
    border-top: 1px solid rgba(255,255,255,0.14);
    padding: 12px;
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.52);
}
.chat-footer input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 10px 12px;
    outline: none;
}
.chat-footer input::placeholder { color: rgba(226,232,240,0.7); }
.chat-footer button {
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 700;
    padding: 10px 14px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 24px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal.show { display: flex; }
.modal-box {
    background: linear-gradient(180deg, rgba(12,26,51,0.98), rgba(4,15,32,0.96));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 20px;
    width: min(1100px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    box-shadow: 0 28px 80px rgba(0,0,0,0.45);
    overflow: hidden;
}
.modal-box .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.modal-box .topbar h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
}
.modal-box .topbar .btn-secondary {
    padding: 12px 18px;
    border-radius: 16px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
}

.login-required-modal {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-required-modal .modal-box {
    width: min(480px, calc(100vw - 32px));
    background: linear-gradient(135deg, rgba(247, 244, 239, 0.96), rgba(239, 246, 245, 0.96));
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 22px 24px 24px;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.18);
}

.login-required-modal .topbar {
    align-items: center;
    margin-bottom: 14px;
}

.login-required-modal .topbar h3 {
    font-family: 'Segoe UI', 'Inter', 'Arial', sans-serif;
    font-size: 1.8rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: #16263f;
}

.login-required-modal .btn-secondary {
    background: rgba(12, 30, 46, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #1d2d3d;
    border-radius: 12px;
    padding: 9px 16px;
    min-width: 78px;
    font-weight: 700;
    box-shadow: none;
}

.login-required-modal .login-modal-copy {
    margin: 0 0 18px;
    color: rgba(22, 38, 63, 0.8);
    font-size: 0.92rem;
    line-height: 1.4;
    font-weight: 500;
}

.login-required-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    align-items: stretch;
    max-width: none;
}

.login-required-form label {
    color: #1b2c3d;
    font-weight: 700;
    font-size: 0.88rem;
    margin: 0;
}

.login-required-form input {
    height: 43px;
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.88);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 0.95rem;
    color: #16263f;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-required-form input::placeholder {
    color: rgba(23, 39, 57, 0.45);
}

.login-required-form input:focus {
    border-color: rgba(16, 185, 129, 0.72);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.login-required-form .login-form-actions {
    grid-column: 1 / -1;
    margin-top: 7px;
}

.login-required-form .btn-primary {
    border: none;
    border-radius: 13px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0ea5a4 0%, #2563eb 100%);
    color: white;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 18px 30px rgba(14, 165, 164, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-required-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(14, 165, 164, 0.28);
}

.login-error-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.16);
    color: #b91c1c;
    font-weight: 600;
}

@media (max-width: 720px) {
    .login-required-modal .modal-box {
        width: min(calc(100vw - 20px), 480px);
        padding: 20px 18px 20px;
        border-radius: 18px;
    }

    .login-required-modal .topbar {
        gap: 12px;
        margin-bottom: 18px;
    }

    .login-required-form label {
        font-size: 0.88rem;
    }

    .login-required-form .login-form-actions {
        margin-top: 8px;
    }
}

.panorama-view {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(0,0,0,0.24);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.panorama-viewer {
    width: 100%;
    height: min(72vh, 720px);
    min-height: 520px;
}

.admin-grid { display: block; }
.admin-main { position: relative; }
.admin-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    pointer-events: none;
}
.admin-header .admin-menu-toggle { pointer-events: auto; }
body.admin-building-editor-open .admin-header { display: none; }
.admin-menu-toggle {
    position: fixed;
    top: 22px;
    right: 28px;
    left: auto;
    z-index: 90;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.96);
    color: #1f2937;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}
.admin-menu-toggle:hover { transform: translateY(-2px); background: #fff; }
.admin-sidebar-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(2,6,23,0.46); backdrop-filter: blur(3px); }
.admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 100;
    width: min(290px, calc(100vw - 34px));
    margin: 0;
    padding: 34.5px 18px 34.5px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    background: #ffffff;
    border-left: 1px solid rgba(148,163,184,0.35);
    box-shadow: -18px 0 44px rgba(15,23,42,0.24), 0 32px 0 #ffffff;
    transform: translateX(105%);
    transition: transform 220ms ease;
}
.admin-sidebar::-webkit-scrollbar { display: none; }
.admin-sidebar.open { transform: translateX(0); }
.admin-tabs.admin-sidebar { margin: 0; }
.admin-sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 4px 0 12px;
    color: #102a43;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}
.admin-sidebar-brand img,
.admin-sidebar-logo-placeholder {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
}
.admin-sidebar-brand img {
    background: #f8fafc;
    padding: 4px;
}
.admin-sidebar-logo-placeholder {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0e9f9d);
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 5px 12px rgba(37,99,235,0.18);
}
.admin-sidebar .admin-page-actions { flex-direction: column; align-items: stretch; margin: 0 0 8px; }
.admin-sidebar .admin-page-actions form { width: 100%; }
.admin-sidebar .admin-page-actions .btn-secondary,
.admin-sidebar .admin-sidebar-logout .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid #cbd5e1;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(15,23,42,0.08), inset 0 0 0 1px rgba(255,255,255,0.7);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.admin-sidebar .admin-page-actions .btn-secondary:hover,
.admin-sidebar .admin-sidebar-logout .btn-secondary:hover {
    background: #eef5ff;
    border-color: #bfdbfe;
}
.admin-sidebar .btn-secondary,
.admin-sidebar .admin-tab-btn,
.admin-sidebar .admin-tour-link { font-weight: 800; }
.admin-sidebar .admin-sidebar-logout { width: 100%; margin-top: 0; }
.admin-sidebar .admin-sidebar-logout .btn-secondary { width: 100%; justify-content: center; text-align: center; }
.admin-sidebar .admin-tab-btn,
.admin-sidebar .admin-tour-link {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #1f2937;
    border: 1px solid #cbd5e1;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(15,23,42,0.08), inset 0 0 0 1px rgba(255,255,255,0.7);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.admin-sidebar .admin-tab-btn:hover,
.admin-sidebar .admin-tour-link:hover { background: #eef5ff; border-color: #60a5fa; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(15,23,42,0.1); }
.admin-sidebar .admin-tab-btn.active { background: #eaf2ff; border-color: #2563eb; color: #102a43; box-shadow: 0 2px 5px rgba(37,99,235,0.16), inset 0 0 0 1px rgba(255,255,255,0.75); }

@media (max-width: 720px) {
    .admin-sidebar {
        bottom: auto;
        height: 100dvh;
        max-height: 100dvh;
        width: 100vw;
        max-width: 100vw;
        right: -1px;
        z-index: 100;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
        gap: 4px;
        padding: 6px 10px 8px;
        overflow: hidden;
    }
    .admin-sidebar-brand,
    .admin-sidebar .admin-page-actions,
    .admin-sidebar .admin-tour-link,
    .admin-sidebar .admin-sidebar-logout { grid-column: 1 / -1; }
    .admin-sidebar-brand { gap: 2px; padding-bottom: 4px; }
    .admin-sidebar-brand img,
    .admin-sidebar-logo-placeholder { width: 44px; height: 44px; border-radius: 50%; }
    .admin-sidebar .admin-page-actions { margin: 0; }
    .admin-sidebar-brand strong { font-size: 0.82rem; }
    .admin-sidebar .admin-tab-btn,
    .admin-sidebar .admin-tour-link,
    .admin-sidebar .admin-page-actions .btn-secondary,
    .admin-sidebar .admin-sidebar-logout .btn-secondary { min-height: 28px; padding: 4px 9px; }
    .admin-sidebar .admin-tour-link,
    .admin-sidebar .admin-sidebar-logout { margin-top: 0; }
    .admin-sidebar > * { min-width: 0; max-width: 100%; }
}

.admin-building-tab { position: relative; min-height: 100vh; padding: 0; }
.admin-building-tab button { font-weight: 800; }
.admin-building-tab .building-map-card {
    position: fixed;
    inset: 0;
    z-index: 1;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #07111f;
    border: 0;
    border-radius: 0;
}
.admin-building-tab .building-map-card form { position: relative; height: 100vh; display: block; }
.admin-map-branding {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 15;
    max-width: calc(100% - 40px);
    padding: 12px 18px;
    transform: translateX(-50%);
    text-align: center;
    color: #f8fafc;
    background: rgba(7,17,31,0.72);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(2,6,23,0.24);
    pointer-events: none;
}
.admin-map-branding h1 { margin: 0; font-size: 1.2rem; }
.admin-map-branding p { margin: 4px 0 0; color: rgba(255,255,255,0.82); font-size: 0.92rem; }
.admin-building-tab .map-picker {
    position: absolute;
    inset: 0;
    min-height: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #dfe9e4;
    cursor: crosshair;
}
.admin-building-tab .map-picker img { width: 100%; height: auto; object-fit: contain; }
.admin-building-tab .picker-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transform: translate(var(--pan-x, 0px), var(--pan-y, 0px));
    touch-action: none;
    will-change: transform;
}
.admin-building-tab .picker-canvas img { object-fit: fill; }
.admin-building-tab .map-picker.dragging { cursor: grabbing; }
.building-map-actions {
    position: absolute;
    top: 22px;
    left: 28px;
    right: auto;
    z-index: 25;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.building-map-primary-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.building-map-actions button {
    margin: 0;
    background: rgba(255,255,255,0.96);
    color: #1f2937;
    border: 1px solid rgba(148,163,184,0.28);
    box-shadow: 0 8px 20px rgba(15,23,42,0.2);
}
.building-map-actions button:hover { background: #fff; }
.building-editor-toggle {
    position: relative;
    top: auto;
    left: auto;
    z-index: 25;
    min-height: 42px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.96);
    color: #1f2937;
    border-color: rgba(148,163,184,0.28);
    box-shadow: 0 8px 20px rgba(15,23,42,0.2);
}
.building-editor-toggle:hover { background: #fff; }
body.admin-building-editor-open .building-map-actions { top: 22px; right: 28px; left: 28px; }
body.admin-building-editor-open .building-editor-panel { margin-top: 104px; }
body.admin-building-editor-open #building-editor-panel {
    position: absolute;
    top: 104px;
    right: 28px;
    margin: 0;
}
.building-editor-panel {
    position: relative;
    z-index: 24;
    width: min(380px, calc(100% - 32px));
    margin: 104px 28px 0 auto;
    padding: 16px;
    background: rgba(7,17,31,0.92);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.3);
}
.building-editor-panel#building-editor-panel {
    color: #1f2937;
    background: rgba(255,255,255,0.98);
    border-color: rgba(148,163,184,0.35);
    box-shadow: 0 18px 44px rgba(15,23,42,0.24);
}
.building-editor-panel#building-editor-panel h3 {
    color: #102a43;
    margin-bottom: 2px;
}
.building-editor-panel#building-editor-panel label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #52606d;
    font-size: 0.9rem;
    font-weight: 700;
}
.building-editor-panel#building-editor-panel output {
    color: #102a43;
    font-variant-numeric: tabular-nums;
}
.building-editor-panel input,
.building-editor-panel textarea {
    width: 100%;
    background: rgba(255,255,255,0.96);
    color: #1f2937;
    border: 1px solid rgba(148,163,184,0.5);
    border-radius: 10px;
    padding: 11px 12px;
}
.building-editor-panel#building-editor-panel textarea {
    min-height: 118px;
    resize: vertical;
}
.building-editor-panel#building-editor-panel input[type="range"] {
    height: 6px;
    padding: 0;
    accent-color: #2563eb;
    cursor: pointer;
}
.building-editor-panel#building-editor-panel input:focus,
.building-editor-panel#building-editor-panel textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}
.building-editor-panel#building-editor-panel .map-picker-header {
    color: #52606d;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}
.building-editor-panel#building-editor-panel .map-picker-header strong { color: #102a43; }
.building-editor-panel#building-editor-panel .map-picker-header span { color: #52606d; }
.building-editor-panel input::placeholder,
.building-editor-panel textarea::placeholder { color: #6b7280; }
}
.building-editor-panel .map-picker-header { display: flex; flex-direction: column; align-items: flex-start; }
body.admin-building-editor-open .building-editor-panel { margin-top: 22px; }
.admin-building-tab .building-map-card > form > .picker-values.building-editor-panel,
.admin-building-tab .building-map-card > form > .action-row.building-editor-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.building-editor-panel.picker-values { margin-top: 10px; }
.building-map-card > form > .building-editor-panel + .map-picker { z-index: 1; }
.admin-building-tab .building-map-card > form > .picker-values { position: absolute; top: auto; right: 16px; bottom: 16px; width: min(380px, calc(100% - 32px)); margin: 0; }
.admin-building-tab .building-map-card > form > .action-row { position: absolute; right: 16px; bottom: 48px; z-index: 25; width: min(380px, calc(100% - 32px)); }
.admin-building-tab .building-manage-card {
    position: fixed;
    top: 104px;
    right: 28px;
    bottom: auto;
    z-index: 26;
    width: min(440px, calc(100% - 32px));
    max-height: calc(100vh - 132px);
    overflow: auto;
    background: rgba(7,17,31,0.9);
}
.admin-building-tab .building-map-actions > .action-row {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
body.admin-building-editor-open .admin-building-tab .building-map-actions { top: 22px; }
.admin-building-tab .building-map-card > form > .action-row button {
    background: rgba(255,255,255,0.96);
    color: #1f2937;
    border: 1px solid rgba(148,163,184,0.28);
    box-shadow: 0 8px 20px rgba(15,23,42,0.2);
}
.admin-building-tab .building-map-card > form > .action-row button:hover { background: #fff; }
.admin-page-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.admin-page-actions form { margin: 0; }
.admin-back-link { display: inline-flex; align-items: center; text-decoration: none; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.admin-tab-btn { padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.08); color: var(--text); cursor: pointer; font-weight: 700; transition: all 180ms ease; }
.admin-tab-btn.active { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.admin-tour-link { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.admin-tab-panels { display: block; }
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }
.admin-card { background: var(--surface); backdrop-filter: blur(14px); padding: 14px; border-radius: 16px; margin-bottom: 14px; box-shadow: 0 12px 24px rgba(2, 6, 23, 0.18); border: 1px solid var(--border); }
.fullpage-tour-editor .admin-card { border-radius: 0; }
.admin-card form { display: flex; flex-direction: column; gap: 10px; }
.admin-card h3 { margin-top: 0; font-size: 1rem; color: #f8fafc; }
.compact-card { padding: 12px; }

#tab-media.admin-tab-panel { display: none; }
#tab-media.admin-tab-panel.active { display: grid; }
#tab-media {
    min-height: 100vh;
    height: 100vh;
    padding: 14px;
    background: #ffffff;
    color: #1f2937;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}
#tab-media .admin-card {
    margin: 0;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15,23,42,0.07);
}
#tab-media .admin-card h3 {
    margin: 0 0 10px;
    color: #102a43;
    font-size: 1.05rem;
}
#tab-media .media-logo-card { grid-column: span 1; }
#tab-media .media-logo-preview {
    height: 60px;
    margin-bottom: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    border-radius: 50%;
}
#tab-media .media-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
#tab-media .media-logo-preview span {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0e9f9d);
    padding: 12px;
    border-radius: 10px;
    font-weight: 800;
}
#tab-media .admin-card form { gap: 8px; }
#tab-media .admin-card select,
#tab-media .admin-card input[type="file"] {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font: inherit;
    font-weight: 600;
}
#tab-media .admin-card input[type="file"] { padding: 8px; }
#tab-media .media-existing-preview {
    min-height: 60px;
    padding: 4px;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    font-size: 0.82rem;
    text-align: center;
    overflow: hidden;
}
#tab-media .media-existing-preview.empty { min-height: 30px; }
#tab-media .media-existing-preview img {
    display: block;
    width: 100%;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
}
#tab-media .admin-card select:focus,
#tab-media .admin-card input[type="file"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
#tab-media .admin-card button[type="submit"] {
    align-self: flex-start;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 5px 12px rgba(37,99,235,0.16);
}

#tab-office.admin-tab-panel { display: none; }
#tab-office.admin-tab-panel.active {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    min-height: 100vh;
    padding: 22px;
    background: #ffffff;
    color: #1f2937;
}
#tab-office .admin-card {
    margin: 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
#tab-office .admin-card h3 {
    margin: 0 0 18px;
    color: #102a43;
    font-size: 1.1rem;
}
#tab-office .admin-card:first-child form { gap: 12px; }
#tab-office .admin-card input[type="text"],
#tab-office .admin-card textarea,
#tab-office .admin-card select,
#tab-office .admin-card input[type="number"] {
    width: 100%;
    min-height: 42px;
    padding: 10px 11px;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font: inherit;
}
#tab-office .admin-card textarea { min-height: 92px; resize: vertical; }
#tab-office .admin-card input:focus,
#tab-office .admin-card textarea:focus,
#tab-office .admin-card select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
#tab-office .label-row {
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
}
#tab-office .label-row > label {
    color: #52606d;
    font-weight: 700;
    flex: 0 0 92px;
}
#tab-office .label-row > label input { margin-top: 6px; min-height: 38px; }
#tab-office .radio-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
#tab-office .radio-group label {
    color: #52606d;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
    cursor: pointer;
}
#tab-office .radio-group input { accent-color: #2563eb; }
#tab-office .action-row { gap: 8px; }
#tab-office .action-row button {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 800;
}
#tab-office #office-cancel { color: #1f2937; background: #f8fafc; border: 1px solid #cbd5e1; }
#tab-office #office-cancel:hover { background: #eef5ff; border-color: #93c5fd; }
#tab-office #offices-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding-right: 4px;
}
#tab-office #offices-list .compact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
#tab-office #offices-list .compact-item:hover { background: #eef5ff; border-color: #93c5fd; transform: translateY(-1px); box-shadow: 0 5px 12px rgba(37,99,235,0.08); }
#tab-office #offices-list strong { color: #102a43; font-size: 0.98rem; }
#tab-office #offices-list .small { color: #64748b; margin-top: 5px; font-size: 0.82rem; }
#tab-office #offices-list .list-actions { gap: 6px; }
#tab-office #offices-list .btn-secondary {
    padding: 8px 12px;
    color: #1f2937;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 800;
}
#tab-office #offices-list .btn-secondary:hover { background: #eff6ff; border-color: #93c5fd; }

#tab-path {
    background: #ffffff;
    color: #1f2937;
}
#tab-path > .admin-card {
    background: rgba(255,255,255,0.98);
    border-color: rgba(148,163,184,0.35);
    box-shadow: 0 12px 28px rgba(15,23,42,0.12);
}
#tab-path > .admin-card form > label { color: #52606d; }
#tab-path > .admin-card select,
#tab-path .picker-values {
    color: #1f2937;
}
#tab-path > .admin-card select {
    background: #f8fafc;
    border-color: #cbd5e1;
}
#tab-path .map-picker-card {
    background: #ffffff;
    border-color: #dbe3ec;
}
#tab-path .map-picker-header,
#tab-path .picker-values { color: #64748b; }
#tab-path .path-zoom-controls button {
    color: #1f2937;
    background: #f8fafc;
    border-color: #cbd5e1;
}
#tab-path .path-zoom-controls button:hover,
#tab-path .path-zoom-controls button.active {
    background: #eef5ff;
    border-color: #93c5fd;
}
#tab-path .action-row .btn-secondary {
    color: #1f2937;
    background: #f8fafc;
    border-color: #cbd5e1;
}
#tab-path .action-row .btn-secondary:hover { background: #eef5ff; border-color: #93c5fd; }
#tab-path .pathway-toolbar button,
#tab-path .pathway-selection-row button {
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 5px rgba(15,23,42,0.08);
}
#tab-path .pathway-toolbar button:hover,
#tab-path .pathway-selection-row button:hover:not(:disabled) {
    background: #eef5ff;
    border-color: #93c5fd;
}
#tab-path .pathway-toolbar button.active { color: #ffffff; background: #0f766e; border-color: #0f766e; }
#tab-path .pathway-toolbar #pathway-save {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}
#tab-path .pathway-toolbar #pathway-save:hover {
    color: #ffffff;
    background: #1d4ed8;
    border-color: #1d4ed8;
}
#tab-path .pathway-toolbar button:disabled,
#tab-path .pathway-selection-row button:disabled {
    color: #94a3b8;
    background: #e2e8f0;
    border-color: #cbd5e1;
}
#tab-path .pathway-selection-row label { color: #52606d; font-weight: 600; }
#tab-path .pathway-selection-row input,
#tab-path .pathway-selection-row select {
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}
#tab-path .pathway-thickness-control { display: inline-flex; align-items: center; gap: 8px; }
#tab-path .pathway-thickness-control input[type="range"] { width: 150px; accent-color: #2563eb; }
#tab-path .pathway-thickness-control output { min-width: 48px; color: #1f2937; font-variant-numeric: tabular-nums; }
#tab-path .pathway-node-name-control { display: inline-flex; align-items: center; gap: 8px; color: #52606d; font-weight: 600; }
#tab-path .pathway-node-name-control input { min-width: 190px; padding: 8px 10px; color: #1f2937; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; }
#tab-path { min-height: 100vh; padding: 0; }
#tab-path .path-map-card {
    position: relative;
    inset: auto;
    z-index: 1;
    min-height: calc(100vh - 32px);
    margin: 0;
    padding: 18px;
    overflow: visible;
    background: #ffffff;
    border: 0;
    border-radius: 0;
}
#tab-path .pathway-editor-card { min-height: 0; }
#tab-path .pathway-editor-content { min-height: 0; }
#tab-path .pathway-editor { min-height: 0; height: auto; }
#tab-path .path-map-card > form {
    position: relative;
    display: block;
    height: 100vh;
}
#tab-path .path-map-card > form > label,
#tab-path .path-map-card > form > select {
    position: absolute;
    left: 28px;
    z-index: 25;
}
#tab-path .path-map-card > form > label {
    top: 34px;
    transform: translateY(-50%);
    color: #52606d;
}
#tab-path .path-map-card > form > select {
    top: 22px;
    left: 106px;
    width: min(280px, calc(100% - 56px));
    min-height: 42px;
    padding: 10px 11px;
    color: #1f2937;
    font-weight: 800;
    background: rgba(255,255,255,0.96);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.14);
}
#tab-path .path-map-card > form > .map-picker-card {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
#tab-path .path-map-card .map-picker-header {
    position: absolute;
    top: 22px;
    right: 90px;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    color: #52606d;
}
#tab-path .path-map-card .map-picker-header strong { color: #102a43; }
#tab-path .path-map-card .path-zoom-controls { display: flex; gap: 8px; }
#tab-path .path-map-card .path-zoom-controls button,
#tab-path .path-map-card .map-picker-header > .action-row button {
    color: #1f2937;
    background: rgba(255,255,255,0.96);
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.14);
    font-weight: 800;
}
#tab-path .path-map-card .path-zoom-controls button:hover,
#tab-path .path-map-card .map-picker-header > .action-row button:hover { background: #fff; border-color: #93c5fd; }
#tab-path .path-map-card #path-picker {
    position: absolute;
    inset: 0;
    min-height: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #dfe9e4;
}
#tab-path .path-map-card #path-picker-content { min-width: 100%; }
#tab-path .path-map-card #path-picker-image { width: 100%; height: auto; display: block; }
#tab-path .path-map-card .picker-values {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 25;
    margin: 0;
    color: #52606d;
}
#tab-path .path-map-card .map-picker-header > .action-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 0;
}
#tab-path .path-map-card .map-picker-header > .action-row .btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

#tab-bot.admin-tab-panel { display: none; }
#tab-bot.admin-tab-panel.active {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 18px;
    min-height: 100vh;
    padding: 22px;
    background: #ffffff;
    color: #1f2937;
}
#tab-bot > .admin-card {
    margin: 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
#tab-bot > .admin-card h3 {
    margin: 0 0 18px;
    color: #102a43;
    font-size: 1.1rem;
}
#tab-bot > .admin-card:first-child { min-width: 0; }
#tab-bot > .admin-card:last-child { align-self: start; }
#tab-bot > .admin-card form { gap: 11px; }
#tab-bot > .admin-card form > label,
#tab-bot > .admin-card .label-row label { color: #52606d; }
#tab-bot > .admin-card input[type="text"],
#tab-bot > .admin-card textarea,
#tab-bot > .admin-card select {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font: inherit;
}
#tab-bot > .admin-card textarea {
    min-height: 104px;
    resize: vertical;
}
#tab-bot > .admin-card input[type="text"]:focus,
#tab-bot > .admin-card textarea:focus,
#tab-bot > .admin-card select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
#tab-bot > .admin-card input::placeholder,
#tab-bot > .admin-card textarea::placeholder { color: #6b7280; }
#tab-bot > .admin-card .label-row {
    margin: 0 0 2px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
}
#tab-bot > .admin-card .label-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}
#tab-bot > .admin-card .label-row input { accent-color: #2563eb; }
#tab-bot > .admin-card button[type="submit"] {
    align-self: flex-start;
    min-height: 38px;
    padding: 8px 15px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 5px 12px rgba(37,99,235,0.14);
}
#tab-bot .admin-eyebrow { display: block; margin-bottom: 6px; color: #2563eb; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
#tab-bot .chatbot-status-heading, #tab-bot .chatbot-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#tab-bot .chatbot-status-badge, #tab-bot .chatbot-count { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 0.72rem; font-weight: 800; }
#tab-bot .chatbot-count { min-width: 28px; background: #eaf2ff; color: #1d4ed8; text-align: center; }
#tab-bot .chatbot-description, #tab-bot .chatbot-form-help, #tab-bot .chatbot-empty-state { margin: 0; color: #627d98; line-height: 1.55; }
#tab-bot .chatbot-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
#tab-bot .chatbot-status-grid div { display: grid; gap: 4px; padding: 11px 12px; background: #f8fafc; border: 1px solid #dbe3ec; border-radius: 9px; }
#tab-bot .chatbot-status-grid strong { color: #243b53; font-size: 0.78rem; }
#tab-bot .chatbot-status-grid span { color: #627d98; font-size: 0.76rem; }
#tab-bot .chatbot-editor-card form { margin-top: 16px; }
#tab-bot .chatbot-editor-card form > label { margin-top: 2px; font-size: 0.8rem; font-weight: 800; }
#tab-bot .chatbot-response-list { display: grid; gap: 9px; margin-top: 16px; max-height: 430px; overflow-y: auto; }
#tab-bot .chatbot-response-item { padding: 12px; background: #f8fafc; border: 1px solid #dbe3ec; border-radius: 9px; }
#tab-bot .chatbot-response-item strong { display: block; color: #102a43; font-size: 0.82rem; }
#tab-bot .chatbot-response-item p { margin: 5px 0 0; color: #52606d; font-size: 0.8rem; line-height: 1.45; }

@media (max-width: 720px) {
    #tab-media,
    #tab-office.admin-tab-panel.active {
        min-height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 10px;
    }
    #tab-office.admin-tab-panel.active {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }
    #tab-office .admin-card { padding: 16px; }
    #tab-office .admin-card h3 { margin-bottom: 14px; }
    #tab-office .label-row { flex-wrap: wrap; }
    #tab-office .label-row > label { flex: 1 1 110px; }
    #tab-office .radio-group { justify-content: flex-start; }
    #tab-office #offices-list { max-height: none; }
    #tab-office #offices-list .compact-item { align-items: flex-start; flex-direction: column; gap: 10px; }
    #tab-office #offices-list .list-actions { width: 100%; justify-content: flex-end; }
    #tab-media .admin-card { padding: 14px; }
    #tab-media {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        height: auto;
        min-height: 100vh;
        gap: 12px;
        padding: 14px;
    }
    #tab-media .admin-card { padding: 16px; }
    #tab-media .admin-card h3 { margin-bottom: 13px; }
    #tab-reports {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        padding: 14px;
    }
    #tab-reports > .admin-card { padding: 16px; }
    #tab-reports > .admin-card > h3 { margin-bottom: 13px; }
    #tab-reports .report-filter-bar { align-items: stretch; gap: 7px; margin-bottom: 12px; }
    #tab-reports .report-filter-bar label { width: 100%; }
    #tab-reports .report-filter-select { width: 100%; min-width: 0; }
    #tab-reports .reports-review-list { grid-template-columns: 1fr; gap: 10px; }
    #tab-reports .admin-report-card { min-height: 0; }
    #tab-reports .report-visual { height: 124px; }
    #tab-bot {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: 100vh;
        padding: 14px;
    }
    #tab-bot > .admin-card { padding: 16px; }
    #tab-bot > .admin-card h3 { margin-bottom: 13px; }
    #tab-path .path-map-card > form > label { left: 16px; }
    #tab-path .path-map-card > form > label { top: 34px; }
    #tab-path .path-map-card > form > select { top: 62px; left: 16px; width: calc(100% - 32px); }
    #tab-path .path-map-card .map-picker-header { top: 16px; right: 74px; }
    #tab-path .path-map-card .map-picker-header { left: 16px; justify-content: flex-end; }
    #tab-path .path-map-card .map-picker-header > .action-row { flex-wrap: wrap; justify-content: flex-end; }
    #tab-path .path-map-card .picker-values { right: 16px; bottom: 16px; }
}

.scene-map-picker {
    position: relative;
    width: 100%;
    height: clamp(160px, 18vw, 240px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #dfe9e4;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.scene-map-picker.dragging { cursor: grabbing; }
.scene-map-canvas { position: absolute; top: 0; left: 0; width: 100%; height: auto; transform-origin: 0 0; }
.scene-map-picker img { display: block; width: 100%; height: auto; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.scene-map-reset { position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: rgba(2,6,23,0.78); color: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.scene-map-reset:hover { background: rgba(2,6,23,0.96); }
.scene-map-marker,
.tour-mini-map-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #ec5b67;
    box-shadow: 0 2px 8px rgba(0,0,0,0.45);
    transform: translate(-50%, -50%);
    transform-origin: center;
    transition: transform 220ms ease;
    will-change: transform;
}
.scene-map-marker { display: none; pointer-events: none; }
.scene-map-marker.has-position { display: block; }
.scene-map-coordinates { margin-top: 6px; color: var(--muted); font-size: 0.8rem; }

.report-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.report-filter-bar label {
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
}

.report-filter-select {
    min-width: 240px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #1f2937;
    font: inherit;
    font-weight: 600;
}

.reports-review-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    align-items: start;
    width: 100%;
}
.admin-report-card {
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.2);
    width: 100%;
    max-width: 100%;
    min-height: 280px;
    margin: 0;
}
.report-visual {
    position: relative;
    height: 136px;
    background: #f1f5f9;
    border-bottom: 1px solid #dbe3ec;
}
.report-visual img,
.report-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.report-visual-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(226, 232, 240, 0.7);
    background: radial-gradient(circle at top, rgba(96,165,250,0.2), rgba(15,23,42,0.8));
}
.report-card-bottom {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.report-card-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.report-card-title-wrap h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 0.96rem;
    font-weight: 800;
}
.report-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    text-transform: capitalize;
    font-weight: 700;
}
.report-category-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: #bfdbfe;
    font-size: 0.7rem;
    font-weight: 800;
}
.status-pending { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.status-reviewed { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.status-resolved { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.report-message {
    margin: 0;
    color: rgba(248, 250, 252, 0.82);
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.report-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.report-card-actions button {
    flex: 1;
    min-width: 80px;
}
.report-delete-form {
    margin: 0;
    flex: 1;
}
.report-delete-form button {
    width: 100%;
}

#tab-reports {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: 18px;
    background: #ffffff;
    color: #1f2937;
}
#tab-reports > .admin-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 20px;
    background: #ffffff;
    border-color: #dbe3ec;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
#tab-reports .reports-review-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    padding: 2px 4px 8px 0;
}
#tab-reports > .admin-card > h3 { margin: 0 0 16px; color: #102a43; font-size: 1.1rem; }
#tab-reports > .admin-card > p { color: #52606d; }
#tab-reports .report-filter-bar label { color: #52606d; }
#tab-reports .report-filter-select {
    background: #f8fafc;
    color: #1f2937;
    border-color: #cbd5e1;
}
#tab-reports .admin-report-card {
    background: #ffffff;
    border-color: #dbe3ec;
    box-shadow: 0 10px 22px rgba(15,23,42,0.1);
}
#tab-reports .report-visual {
    background: #f1f5f9;
    border-bottom-color: #dbe3ec;
}
#tab-reports .report-visual-placeholder {
    color: #64748b;
    background: #f1f5f9;
}
#tab-reports .report-card-title-wrap h4 { color: #102a43; }
#tab-reports .report-submitted-date { display: block; margin-top: 4px; color: #64748b; font-size: 0.76rem; font-weight: 600; }
#tab-reports .report-category-badge {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
#tab-reports .report-message { color: #52606d; }
#tab-reports .report-card-actions button {
    min-height: 36px;
    border-radius: 8px;
    font-weight: 800;
}
#tab-reports .report-delete-form .btn-secondary {
    color: #1f2937;
    background: #f8fafc;
    border-color: #cbd5e1;
}
#tab-reports .report-delete-form .btn-secondary:hover {
    background: #eef5ff;
    border-color: #93c5fd;
}
.btn-small {
    padding: 6px 10px;
    font-size: 0.7rem;
}

.media-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.media-viewer-content {
    position: relative;
    width: 90%;
    height: 90vh;
    max-width: 1200px;
    background: rgba(9, 17, 32, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.4);
}

.media-viewer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    left: 28px;
    right: auto;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-size: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s;
    z-index: 10000;
}

.media-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.media-viewer-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.media-viewer-display {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    display: grid;
    place-items: center;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.media-viewer-display video,
.media-viewer-display img {
    max-width: 100%;
    max-height: 100%;
}

.media-viewer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.media-nav-btn {
    padding: 8px 16px;
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #93c5fd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.media-nav-btn:hover {
    background: rgba(96, 165, 250, 0.3);
    border-color: rgba(96, 165, 250, 0.6);
}

#media-viewer-count {
    color: rgba(248, 250, 252, 0.7);
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}
.uploaded-scene-list-card.compact-card { padding: 0; }
.compact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.compact-list li, .compact-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.admin-building-tab .building-manage-card {
    color: #1f2937;
    background: rgba(255,255,255,0.98);
    border-color: rgba(148,163,184,0.38);
    box-shadow: 0 18px 44px rgba(15,23,42,0.24);
}
.admin-building-tab .building-manage-card h3 {
    color: #102a43;
    margin-bottom: 12px;
}
.admin-building-tab .building-manage-card .compact-list { gap: 8px; }
.admin-building-tab .building-manage-card .compact-list li {
    padding: 12px;
    background: #f8fafc;
    border-color: #dbe3ec;
    border-radius: 12px;
}
.admin-building-tab .building-manage-card .compact-list li:hover {
    background: #eef5ff;
    border-color: #bfdbfe;
}
.admin-building-tab .building-manage-card .compact-list strong { color: #102a43; }
.admin-building-tab .building-manage-card .meta { color: #64748b; }
.admin-building-tab .building-manage-card .list-actions { gap: 6px; }
.admin-building-tab .building-manage-card .list-actions .btn-secondary {
    padding: 8px 12px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #cbd5e1;
}
.admin-building-tab .building-manage-card .list-actions .btn-secondary:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}
.compact-item { flex-wrap: wrap; }
.meta { display: inline-block; margin-left: 0.5rem; color: rgba(255,255,255,0.68); font-size: 0.92rem; }
.list-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-flex; margin: 0; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.compact-row { justify-content: flex-start; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.radio-group { display: flex; gap: 12px; align-items: center; }
.map-picker-card { margin-bottom: 14px; }
.map-picker { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: rgba(2,6,23,0.35); min-height: 260px; cursor: crosshair; }
.map-picker-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; }
.path-zoom-controls button { min-width: 32px; padding: 6px 10px; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; color: var(--text); background: rgba(255,255,255,0.06); cursor: pointer; }
.picker-values { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 13px; gap: 16px; }
.compact-values { gap: 12px; font-size: 13px; }
.btn-primary, .btn-secondary { padding: 10px 14px; border-radius: 999px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; color: white; }
.btn-secondary { background: rgba(255,255,255,0.16); color: white; border: 1px solid rgba(255,255,255,0.18); }
textarea, input, select { background: rgba(255,255,255,0.08); color: #0f172a; border: 1px solid rgba(255,255,255,0.18); }
textarea::placeholder, input::placeholder { color: rgba(15,23,42,0.6); }
textarea { min-height: 90px; }

.fullpage-tour-editor .tour-page-topbar,
.fullpage-tour-editor .tour-page-topbar h1,
.fullpage-tour-editor .tour-page-topbar a,
.fullpage-tour-editor .btn-secondary,
.fullpage-tour-editor .viewer-settings-toggle,
.fullpage-tour-editor .settings-field label,
.fullpage-tour-editor .settings-value,
.fullpage-tour-editor #selected-hotspot-label,
.fullpage-tour-editor textarea,
.fullpage-tour-editor input,
.fullpage-tour-editor select {
    color: #0f172a;
}

.fullpage-tour-editor .btn-secondary,
.fullpage-tour-editor .viewer-settings-toggle {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

.fullpage-tour-editor textarea,
.fullpage-tour-editor input,
.fullpage-tour-editor select {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.14);
}

@media (max-width: 900px) {
    .dashboard, .admin-grid { grid-template-columns: 1fr; }
    .chat-panel { right: 12px; left: 12px; width: auto; }
    main { padding: 16px; }
}

.tour-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.tour-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tour-editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    height: 100%;
}

.tour-editor-grid.settings-open {
    grid-template-columns: 1fr 320px;
    gap: 0;
}

.uploaded-scene-list-card {
    margin: 0;
    overflow: hidden;
    max-height: 220px;
    padding-top: 0;
}

.uploaded-scenes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-top: 6px;
}

.uploaded-scenes-header h4 {
    margin: 0;
    font-size: 0.98rem;
}

.uploaded-scenes-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.manage-scenes-page {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 24px 20px 32px;
    box-sizing: border-box;
}

.manage-scenes-page .admin-card {
    width: min(1180px, 100%);
    border-radius: 24px;
    padding: 24px 22px 18px;
    background: linear-gradient(180deg, rgba(9, 15, 30, 0.96), rgba(9, 15, 30, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.25);
}

.manage-scenes-page .manage-scenes-card {
    padding-top: 20px;
}

.manage-scenes-page .manage-scenes-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.manage-scenes-page .manage-scenes-header h4 {
    margin: 0 0 6px;
    font-size: clamp(2rem, 2vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.manage-scenes-page .manage-scenes-header .meta {
    margin: 0;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.96rem;
}

.manage-scenes-page .manage-scenes-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 18px;
}

.manage-scenes-page .scene-selection-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59,130,246,0.22);
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.manage-scenes-page .tour-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.manage-scenes-page .btn-secondary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.manage-scenes-page .btn-secondary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.manage-scene-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding: 4px 4px 8px;
}

.manage-scene-list .manage-scene-item {
    position: relative;
    width: 100%;
    min-width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 14px 14px 16px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.78);
    text-align: center;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
    overflow: visible;
    isolation: isolate;
    cursor: pointer;
}

.manage-scene-list .manage-scene-item:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.92);
}

.manage-scene-list .manage-scene-item.selected {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.9);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.24), 0 18px 32px rgba(37, 99, 235, 0.12);
    background: rgba(17, 24, 39, 0.98);
}

.manage-scene-list .manage-scene-item.selected .scene-thumbnail {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.7);
}

.manage-scene-list .scene-select-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    transition: all 180ms ease;
}

.manage-scene-list .scene-select-check.is-selected {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    border-color: rgba(96, 165, 250, 0.95);
    color: white;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.manage-scene-list .scene-select-check .checkmark {
    opacity: 0;
    transform: scale(0.7);
    transition: all 180ms ease;
}

.manage-scene-list .scene-select-check.is-selected .checkmark {
    opacity: 1;
    transform: scale(1);
}

.manage-scene-list .scene-thumbnail {
    width: 100%;
    max-width: 260px;
    height: 160px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.manage-scene-list .scene-list-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
    padding-top: 2px;
}

.manage-scene-list .manage-scene-item strong {
    font-size: 1rem;
    line-height: 1.3;
    color: rgba(248, 250, 252, 0.96);
}

.manage-scenes-page .scene-list-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    width: 100%;
    padding: 30px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.7);
    color: rgba(226, 232, 240, 0.72);
    font-size: 1.1rem;
    text-align: center;
}

@media (max-width: 720px) {
    .manage-scenes-page .admin-card {
        padding: 18px 14px 14px;
    }

    .manage-scenes-page .manage-scenes-header {
        flex-direction: column;
        align-items: stretch;
    }

    .manage-scenes-page .tour-editor-actions {
        justify-content: stretch;
    }

    .manage-scenes-page .tour-editor-actions .btn-secondary {
        flex: 1;
    }

    .manage-scene-list {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        max-height: none;
    }
}

.manage-scene-list .manage-scene-item strong {
    font-size: 1rem;
}

.manage-scene-list .manage-scene-item span {
    display: block;
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
}

.uploaded-scene-list-card {
    margin-top: 0;
    overflow: hidden;
    max-height: 190px;
    border-radius: 0;
    padding-top: 0;
}

.scene-upload-panel {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.64);
    z-index: 60;
}

.scene-upload-panel .admin-card {
    width: min(520px, 100%);
    padding: 24px;
}
.upload-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.upload-panel-header h4 {
    margin: 0;
}

.fullpage-tour-editor .scene-list-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    overflow: visible !important;
    position: relative;
    z-index: 6;
}

.fullpage-tour-editor .scene-list-scroll-btn,
.fullpage-tour-editor .scene-list-toggle-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: none !important;
    background: transparent !important;
    color: var(--text, #f3f3f3);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease !important;
    outline: none !important;
}

.fullpage-tour-editor .scene-list-scroll-btn:hover,
.fullpage-tour-editor .scene-list-scroll-btn:focus-visible,
.fullpage-tour-editor .scene-list-toggle-btn:hover,
.fullpage-tour-editor .scene-list-toggle-btn:focus-visible {
    background: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
    transform: scale(1.1);
}

.fullpage-tour-editor .scene-list-toggle-btn {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 0 !important;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    box-shadow: none;
    outline: none;
    padding: 0;
    line-height: 1;
    align-self: center;
}

.fullpage-tour-editor .scene-list-toggle-btn.is-overview-mode {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    margin: 0;
    z-index: 50;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0 !important;
}

.fullpage-tour-editor .uploaded-scene-list-card {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible !important;
    padding: 0;
    margin: 0;
    z-index: 8;
    background: rgba(17, 17, 17, 0.98);
    pointer-events: auto;
}

.fullpage-tour-editor .uploaded-scene-list-card .scene-list-nav {
    margin-bottom: 0;
    padding-bottom: 0;
}

.fullpage-tour-editor .uploaded-scene-list-card.is-collapsed {
    height: 26px;
    min-height: 26px;
    max-height: 26px;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
}

.fullpage-tour-editor .uploaded-scene-list-card.is-collapsed .scene-list-nav {
    display: none;
}

.fullpage-tour-editor .uploaded-scene-list-card.is-collapsed .scene-list-toggle-btn {
    margin-top: 0;
}

.fullpage-tour-editor .scene-list {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-y: visible;
    overflow-x: auto;
    scroll-behavior: smooth;
    margin: 5px 0 0 0;
    padding: 0 2px;
    max-height: none;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: auto;
    flex: 1 1 auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 10;
    clip-path: none;
}

.fullpage-tour-editor .scene-list::-webkit-scrollbar {
    display: none;
}

.fullpage-tour-editor .scene-list-item {
    position: relative;
    overflow: visible !important;
    flex: 0 0 100px;
    width: 100px;
    min-width: 100px;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: center;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    transition: transform 180ms ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    isolation: isolate;
}

.fullpage-tour-editor .scene-list-item:hover {
    transform: translateY(-1px);
}

.fullpage-tour-editor .scene-list-item:hover .scene-thumbnail {
    opacity: 0.96;
    transform: scale(1.01);
    border: 1.5px solid #FFFFFF;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
}


.fullpage-tour-editor .scene-thumbnail {
    width: 100%;
    height: 80px;
    border-radius: 0;
    object-fit: cover;
    background: rgba(255,255,255,0.08);
    border: 2px solid transparent;
    transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.fullpage-tour-editor .scene-list-item.active .scene-thumbnail {
    border: 3px solid #FFFFFF;
    box-shadow: none;
}

.fullpage-tour-editor .scene-list-item:not(.active):hover .scene-thumbnail {
    border: 1.5px solid #FFFFFF;
}

.fullpage-tour-editor .scene-hover-title {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    white-space: nowrap;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.92);
    color: #ffffff;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    border: none;
}

.fullpage-tour-editor .scene-list-item:hover .scene-hover-title,
.fullpage-tour-editor .scene-list-item:focus-visible .scene-hover-title {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.manage-scenes-page .manage-scene-list .scene-list-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding-top: 8px;
}

.manage-scenes-page .manage-scene-list .scene-list-item {
    padding-bottom: 0;
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
    background: rgba(255,255,255,0.05);
}

.manage-scenes-page .manage-scene-list .scene-list-item:hover {
    transform: none;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.manage-scenes-page .manage-scene-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    width: 100%;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 4px;
}

.manage-scenes-page .manage-scene-list .scene-list-item {
    width: 100%;
    min-width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    text-align: center;
    transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.manage-scenes-page .manage-scene-list .scene-list-item:hover {
    transform: none;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.manage-scenes-page .manage-scene-list .scene-list-item.selected {
    transform: none;
    border-color: rgba(59,130,246,0.95);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.25);
    background: rgba(255,255,255,0.08);
}

.manage-scenes-page .manage-scene-list .scene-list-item.selected .scene-thumbnail {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.35);
}

.manage-scenes-page .manage-scene-list .scene-thumbnail {
    width: 100%;
    max-width: 260px;
    height: 160px;
    border-radius: 18px;
    object-fit: cover;
}

.manage-scenes-page .manage-scene-list .scene-list-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
    padding-top: 8px;
}

.manage-scenes-page .manage-scene-list .scene-list-item strong {
    display: block;
    font-size: 1rem;
    margin-top: 2px;
}

.manage-scenes-page .manage-scene-list .scene-list-item span {
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
}

.scene-delete-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(224, 73, 47, 0.14);
    color: #ff6b6b;
    cursor: pointer;
    transition: background 150ms ease;
}

.scene-list-item:hover {
    background: rgba(255,255,255,0.1);
}

.scene-list-item.active {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.24);
}

.scene-list-empty {
    padding: 14px;
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    text-align: center;
}

.scene-delete-btn:hover {
    background: rgba(224, 73, 47, 0.24);
}

.tour-editor-sidebar {
    display: none;
}

.tour-editor-settings {
    display: none;
    flex-direction: column;
    gap: 14px;
    width: 320px;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    position: relative;
    background: rgba(17, 17, 17, 0.98);
}

.tour-editor-grid.settings-open .tour-editor-settings {
    display: flex;
}

.fullpage-tour-editor .tour-editor-settings .admin-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: calc(100vh - 46px);
    min-height: 0;
    max-height: calc(100vh - 46px);
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-top: 0;
    padding-right: 12px;
    padding-bottom: 0;
    background: rgba(17, 17, 17, 0.98);
    scrollbar-width: thin;
    scrollbar-gutter: stable;
}

.fullpage-tour-editor .tour-editor-settings .admin-card::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.fullpage-tour-editor .tour-editor-settings .admin-card::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 0;
}

.fullpage-tour-editor .tour-editor-settings .admin-card {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tour-editor-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
}

.panorama-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.panorama-viewer-shell {
    position: relative;
    flex: 1;
    min-height: 420px;
    border-radius: 0;
    overflow: hidden;
    border: none;
    background: rgba(2,6,23,0.35);
}

.admin-panorama-viewer {
    width: 100%;
    min-height: 100%;
    height: 100%;
    display: block;
    transition: outline 150ms ease, background 150ms ease;
    pointer-events: auto;
}

.admin-panorama-viewer.settings-visible {
    pointer-events: auto;
}

.admin-panorama-viewer.drag-over {
    outline: 4px dashed rgba(96,165,250,0.75);
    outline-offset: -6px;
    background: rgba(96,165,250,0.08);
}

.tour-status-message {
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    width: max-content;
    max-width: min(82%, 560px);
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.72);
    color: #f8fafc;
    font-size: 0.95rem;
    line-height: 1.4;
    pointer-events: none;
    text-align: center;
    z-index: 20;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.tour-status-message.error {
    background: #BB2200;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tour-status-message.success {
    background: #00BB22;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tour-status-message.closing {
    opacity: 0;
    transform: translateX(-50%) scale(0.92);
    transition: opacity 400ms ease, transform 400ms ease;
}

.settings-panel-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 0;
    padding: 0;
    width: calc(100% + 26px);
    margin: 0 -12px 14px -14px;
    box-sizing: border-box;
    border-radius: 0;
    background: #000000;
    border: none;
    border-bottom: 0;
    backdrop-filter: blur(8px);
}

.settings-panel-tab {
    flex: 1;
    min-height: 38px;
    padding: 4px 6px;
    border: 0;
    border-radius: 0;
    background: #000000;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 180ms ease, color 180ms ease;
}

.settings-panel-tab:disabled,
.settings-panel-tab.is-disabled,
button:disabled,
button.is-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(0.2);
}

.settings-panel-tab.active {
    background: #202020;
    color: #ffffff;
}

.settings-panel-tab[data-settings-tab="save"].active,
.settings-panel-tab[data-settings-tab="save"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    margin: 5px;
    padding: 4px 8px;
    background: #009b16;
    color: #ffffff;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    font-weight: 800;
    letter-spacing: 0;
}

.settings-panel-tab[data-settings-tab="save"]:hover,
.settings-panel-tab[data-settings-tab="save"]:focus-visible {
    background: #00ad1a;
    box-shadow: none;
    color: #ffffff;
    transform: none;
}

.settings-save-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
}

.settings-panel-tab:hover,
.settings-panel-tab:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.settings-panel {
    display: none;
    padding-bottom: 0;
}

.settings-panel.active {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
}

.fullpage-tour-editor .settings-panel > *:last-child {
    margin-bottom: 0;
}

.fullpage-tour-editor .hotspot-section-title {
    margin: 16px 0 10px;
    color: #f3f3f3;
    font-size: 1.05rem;
    font-weight: 800;
}

.fullpage-tour-editor .hotspot-section-title:first-child {
    margin-top: 4px;
}

.fullpage-tour-editor .hotspot-icon-editor {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.fullpage-tour-editor .hotspot-icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background-color: #3d3d3d;
    background-image: linear-gradient(45deg, #333 25%, transparent 25%), linear-gradient(-45deg, #333 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #333 75%), linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.fullpage-tour-editor .hotspot-icon-preview img {
    width: 72%;
    height: 72%;
    object-fit: contain;
}

.fullpage-tour-editor .hotspot-icon-actions {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.hotspot-icon-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1000;
    width: min(360px, calc(100vw - 40px));
    max-height: min(80vh, 440px);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #171717;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    transform: translate(-50%, -50%);
}

.hotspot-icon-picker[hidden] {
    display: none;
}

.hotspot-background-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1000;
    width: min(340px, calc(100vw - 24px));
    padding: 15px 15px 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #171717;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    transform: translate(-50%, -50%);
}

.hotspot-background-picker[hidden] {
    display: none;
}

#hotspot-background-picker-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.hotspot-background-picker-title { margin-bottom: 10px; color: #f3f3f3; font-size: 0.95rem; font-weight: 700; }
.hotspot-background-current-label { margin: 7px 2px 4px; color: #bcbcbc; font-size: 0.78rem; }
.hotspot-background-current { height: 30px; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background-color: #222; }
.hotspot-background-current.is-translucent { background-image: linear-gradient(45deg,#999 25%,transparent 25%),linear-gradient(-45deg,#999 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#999 75%),linear-gradient(-45deg,transparent 75%,#999 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; background-blend-mode: multiply; }
.hotspot-background-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.hotspot-background-swatch { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; cursor: pointer; }
.hotspot-background-swatch:hover, .hotspot-background-swatch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hotspot-background-palette { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.hotspot-background-tools { display: flex; gap: 5px; margin-top: 6px; }
.hotspot-background-tool, .hotspot-background-hex { min-width: 0; flex: 1; padding: 8px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: #2d2d2d; color: #ddd; font: inherit; font-size: 0.78rem; text-align: center; }
.hotspot-background-tool { cursor: pointer; }
.hotspot-background-tool.active { border-color: #32a8d8; color: #72d5ff; }
.hotspot-background-hex input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; text-align: center; }
.hotspot-background-alpha { display: flex; align-items: center; gap: 8px; margin: 13px 5px 16px; color: #aaa; font-size: 0.78rem; }
.hotspot-background-alpha input { flex: 1; min-width: 0; height: 4px; margin: 0; appearance: none; border-radius: 3px; outline: none; background: linear-gradient(to right, #303740 0 var(--alpha-value, 100%), #25282c var(--alpha-value, 100%) 100%); }
.hotspot-background-alpha input::-webkit-slider-runnable-track { height: 4px; border-radius: 3px; background: linear-gradient(to right, #303740 0 var(--alpha-value, 100%), #25282c var(--alpha-value, 100%) 100%); }
.hotspot-background-alpha input::-moz-range-track { height: 4px; border-radius: 3px; background: linear-gradient(to right, #303740 0 var(--alpha-value, 100%), #25282c var(--alpha-value, 100%) 100%); }
.hotspot-background-alpha input::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; appearance: none; border: 3px solid #25282c; border-radius: 50%; background: #f3f3f3; box-shadow: 0 0 0 1px rgba(255,255,255,.85); cursor: pointer; }
.hotspot-background-alpha input::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid #25282c; border-radius: 50%; background: #f3f3f3; box-shadow: 0 0 0 1px rgba(255,255,255,.85); cursor: pointer; }
.hotspot-background-alpha output { min-width: 42px; color: #32a8d8; text-align: right; }

.hotspot-background-picker-actions {
    display: flex;
    gap: 8px;
}

.hotspot-background-picker-actions .hotspot-icon-upload-button {
    flex: 1;
    margin-top: 0;
}

.hotspot-background-select, .hotspot-background-cancel { flex: 1; padding: 6px 7px; border: 0; background: transparent; color: #00d639; cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 700; text-align: left; }
.hotspot-background-cancel { color: #32a8d8; }

.hotspot-background-picker-cancel {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: #252525;
    color: #f3f3f3;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.hotspot-font-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1000;
    width: min(375px, calc(100vw - 24px));
    padding: 16px 16px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: #171717;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    transform: translate(-50%, -50%);
}

.hotspot-font-picker[hidden] { display: none; }
.hotspot-font-picker-title { margin-bottom: 9px; color: #f3f3f3; font-size: 0.95rem; font-weight: 700; }
.hotspot-font-search { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 0; background: #303030 !important; color: #f3f3f3 !important; font: inherit; font-size: 0.82rem; }
.hotspot-font-search::placeholder { color: #a7a7a7; }
.hotspot-font-options { max-height: min(52vh, 300px); margin-top: 9px; overflow-y: auto; background: #222; }
.hotspot-font-group-title { padding: 7px 10px 5px; color: #707070; font-size: 0.68rem; font-weight: 700; }
.hotspot-font-option { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 32px; padding: 5px 10px; border: 0; background: transparent; color: #ddd; cursor: pointer; font: inherit; font-size: 0.82rem; text-align: left; }
.hotspot-font-option:hover, .hotspot-font-option:focus-visible, .hotspot-font-option.active { background: #363636; color: #fff; outline: none; }
.hotspot-font-option em { color: #666; font-size: 0.75rem; font-style: italic; }
.hotspot-font-picker-actions { display: flex; gap: 18px; padding-top: 7px; }
.hotspot-font-select, .hotspot-font-cancel { flex: 0 0 auto; padding: 5px 0; border: 0; background: transparent; color: #00d639; cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 700; }
.hotspot-font-cancel { color: #32a8d8; }

.hotspot-post-picker { position: fixed; top: 50%; left: 50%; z-index: 1000; width: min(850px, calc(100vw - 32px)); padding: 16px 14px 10px; border: 1px solid rgba(255,255,255,.12); background: #1E1E1E; box-shadow: 0 12px 28px rgba(0,0,0,.5); transform: translate(-50%, -50%); }
.hotspot-post-picker[hidden] { display: none; }
.hotspot-post-picker-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.hotspot-post-picker-title { color: #f3f3f3; font-size: 1rem; font-weight: 700; }
.hotspot-post-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: min(58vh, 410px); min-height: 132px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; background: #1d1d1d; contain: strict; transform: translateZ(0); will-change: scroll-position; }
.hotspot-post-options::-webkit-scrollbar { display: none; }
.hotspot-post-option { position: relative; min-width: 0; padding: 0; border: 2px solid transparent; background: #050505; color: #ddd; cursor: pointer; font: inherit; text-align: left; contain: layout paint; }
.hotspot-post-option:hover, .hotspot-post-option:focus-visible { border-color: #f28c00; outline: none; }
.hotspot-post-option.current { cursor: not-allowed; filter: brightness(.45); }
.hotspot-post-option.current:hover, .hotspot-post-option.current:focus-visible { border-color: transparent; }
.hotspot-post-badge { position: absolute; top: 0; right: 0; left: 0; z-index: 1; display: block; height: 24px; padding: 4px 5px 0; box-sizing: border-box; background: #f28c00; color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }
.hotspot-post-option.current .hotspot-post-badge { background: #222; color: #777; }
.hotspot-post-option img { display: block; width: 100%; height: 108px; object-fit: cover; background: #252525; }
.hotspot-post-option span { display: block; height: 16px; overflow: hidden; padding: 0 5px; box-sizing: border-box; text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; line-height: 16px; }
.hotspot-post-option:hover span, .hotspot-post-option:focus-visible span { background: #f28c00; color: #fff; }
.hotspot-post-picker-footer { display: flex; align-items: center; gap: 18px; padding-top: 8px; }
.hotspot-post-search { width: 230px; padding: 7px 8px; border: 1px solid rgba(255,255,255,.16); background: #252525; color: #f3f3f3; font: inherit; font-style: italic; }
.hotspot-post-cancel { padding: 6px 0; border: 0; background: transparent; color: #32a8d8; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; }
@media (max-width: 700px) { .hotspot-post-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hotspot-post-option img { height: 76px; } .hotspot-post-picker-footer { flex-wrap: wrap; } .hotspot-post-search { width: 100%; } }

.hotspot-icon-picker-title {
    margin-bottom: 10px;
    color: #f3f3f3;
    font-size: 0.9rem;
    font-weight: 700;
}

.hotspot-icon-picker-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.hotspot-icon-picker-option {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: #252525;
    cursor: pointer;
}

.hotspot-icon-picker-option:hover,
.hotspot-icon-picker-option:focus-visible {
    border-color: #32a8d8;
    background: #303030;
    outline: none;
}

.hotspot-icon-picker-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hotspot-icon-upload-button {
    width: 100%;
    margin-top: 12px;
    padding: 9px 12px;
    border: 1px solid rgba(50, 168, 216, 0.55);
    border-radius: 6px;
    background: rgba(50, 168, 216, 0.12);
    color: #72d5ff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.hotspot-icon-upload-button:hover,
.hotspot-icon-upload-button:focus-visible {
    background: rgba(50, 168, 216, 0.22);
    outline: none;
}

.fullpage-tour-editor .hotspot-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #32a8d8;
    font: inherit;
    cursor: pointer;
}

.fullpage-tour-editor .hotspot-link-button:hover,
.fullpage-tour-editor .hotspot-link-button:focus-visible {
    color: #72d5ff;
    text-decoration: underline;
}

.fullpage-tour-editor .hotspot-link-button:disabled {
    color: rgba(50, 168, 216, 0.45);
    cursor: not-allowed;
}

.fullpage-tour-editor .hotspot-icon-select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.fullpage-tour-editor .appearance-title {
    margin-top: 22px;
}

.fullpage-tour-editor .appearance-title + .settings-field.two-columns {
    gap: 16px;
}

.fullpage-tour-editor .hotspot-size-controls {
    position: relative;
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.fullpage-tour-editor .hotspot-slider-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 12px;
}

.fullpage-tour-editor .hotspot-slider-row[hidden] {
    display: none;
}

.fullpage-tour-editor .hotspot-slider-row label,
.fullpage-tour-editor .hotspot-rotation-heading > span {
    color: rgba(243, 243, 243, 0.72);
    font-size: 0.95rem;
    font-weight: 500;
}

.fullpage-tour-editor .hotspot-slider-row input[type="range"] {
    width: 100%;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    height: 18px;
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
    margin: 0;
}

.fullpage-tour-editor .hotspot-slider-row input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: #31363d;
}

.fullpage-tour-editor .hotspot-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2f2f2;
    border: 2px solid #1d2127;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
    margin-top: -7px;
}

.fullpage-tour-editor .hotspot-slider-row input[type="range"]::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: #31363d;
    border: none;
}

.fullpage-tour-editor .hotspot-slider-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2f2f2;
    border: 2px solid #1d2127;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.fullpage-tour-editor .hotspot-slider-row output {
    color: #32a8d8;
    font-size: 0.9rem;
    text-align: right;
}

.fullpage-tour-editor .hotspot-slider-row.is-disabled {
    opacity: 0.45;
    filter: grayscale(0.2);
    pointer-events: none;
}

.fullpage-tour-editor .hotspot-slider-row.is-disabled input[type="range"] {
    cursor: not-allowed;
    accent-color: #7a8ea6;
}

.fullpage-tour-editor .hotspot-slider-row.is-disabled output {
    color: rgba(243, 243, 243, 0.6);
}

.fullpage-tour-editor .hotspot-lock-size {
    position: absolute;
    left: 16px;
    top: 24px;
    z-index: 1;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(243, 243, 243, 0.4);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
}

.fullpage-tour-editor .hotspot-lock-size.is-locked,
.fullpage-tour-editor .hotspot-lock-size:hover {
    color: #32a8d8;
}

.fullpage-tour-editor .hotspot-rotation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 10px;
}

.fullpage-tour-editor .hotspot-rotation-heading > span {
    color: #f3f3f3;
    font-weight: 700;
}

.fullpage-tour-editor .hotspot-rotation-heading > div {
    display: flex;
    gap: 14px;
}

.fullpage-tour-editor .hotspot-advanced-rotation-panel {
    display: grid;
    gap: 12px;
    margin: 4px 0 14px;
}

.fullpage-tour-editor .hotspot-advanced-rotation-panel[hidden] {
    display: none;
}

.fullpage-tour-editor .hotspot-position-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 12px;
}

.fullpage-tour-editor .hotspot-position-options label,
.fullpage-tour-editor .hotspot-position-scale {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(243, 243, 243, 0.72);
}

.fullpage-tour-editor .hotspot-position-scale {
    margin-bottom: 14px;
}

.fullpage-tour-editor .label-title {
    margin-top: 8px;
}

.fullpage-tour-editor .action-title {
    margin-top: 8px;
}

.fullpage-tour-editor .hotspot-type-field[hidden] {
    display: none;
}

.fullpage-tour-editor .hotspot-action-help {
    margin: 10px 8px 0;
    color: rgba(243, 243, 243, 0.68);
    font-size: 0.92rem;
    line-height: 1.25;
}

.fullpage-tour-editor .hotspot-action-help[hidden],
.fullpage-tour-editor .hotspot-target-preview[hidden],
.fullpage-tour-editor .settings-field.is-action-hidden {
    display: none;
}

.fullpage-tour-editor .hotspot-label-editor {
    display: grid;
    gap: 0;
    margin-bottom: 14px;
}

.fullpage-tour-editor .hotspot-label-toolbar {
    display: grid;
    grid-template-columns: 28px 28px 28px 28px 58px repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 0 2px;
    overflow: hidden;
    border-radius: 6px 6px 0 0;
    background: #282828;
}

.fullpage-tour-editor .hotspot-label-toolbar select,
.fullpage-tour-editor .hotspot-label-toolbar button,
.fullpage-tour-editor .hotspot-label-toolbar input {
    height: 100%;
    border: 0;
    background: #282828 !important;
    color: #d8d8d8;
    font: inherit;
}

.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-color,
.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-format-button,
.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-size,
.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-align-group {
    width: 100%;
    min-width: 0;
    flex: none;
}

.fullpage-tour-editor .hotspot-font-control {
    position: relative;
    display: grid;
    place-items: center;
    height: 34px;
    min-width: 0;
    background: #282828;
}

.fullpage-tour-editor .hotspot-font-control > span {
    position: absolute;
    z-index: 1;
    color: #d8d8d8;
    font-family: Georgia, serif;
    font-size: 14px;
    pointer-events: none;
}

.fullpage-tour-editor .hotspot-label-toolbar select {
    position: relative;
    top: 1px;
    flex: 1 1 0;
    width: 100%;
    height: 34px;
    padding: 0;
    font-size: 0;
    font-family: Georgia, serif;
    appearance: none;
    text-align: center;
    cursor: pointer;
}

.fullpage-tour-editor .hotspot-label-toolbar select:focus,
.fullpage-tour-editor .hotspot-label-toolbar select:focus-visible {
    outline: none;
    box-shadow: none;
}

.fullpage-tour-editor .hotspot-label-toolbar select option {
    font-size: 14px;
    font-family: Arial, sans-serif;
}

.fullpage-tour-editor .hotspot-label-color,
.fullpage-tour-editor .hotspot-label-format-button,
.fullpage-tour-editor .hotspot-label-align-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    align-self: stretch;
    height: 34px;
    flex: 0 0 28px;
    min-width: 28px;
    padding: 0;
    cursor: pointer;
}

.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-color,
.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-format-button,
.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-size,
.fullpage-tour-editor .hotspot-label-toolbar > .hotspot-label-align-group {
    flex: 1 1 0;
}

.fullpage-tour-editor .hotspot-label-color span {
    font-size: 16px;
}

.fullpage-tour-editor .hotspot-label-color-indicator {
    position: absolute;
    right: 3px;
    bottom: 0;
    left: 3px;
    height: 4px;
    border-radius: 1px;
    background: #f3f3f3;
    pointer-events: none;
}

.fullpage-tour-editor .hotspot-label-color-indicator.is-transparent {
    background-color: transparent;
    background-image: none;
}

.fullpage-tour-editor .hotspot-label-color input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.fullpage-tour-editor .hotspot-label-format-button.active,
.fullpage-tour-editor .hotspot-label-align-button.active {
    background: #367c9d !important;
    color: #ffffff;
}

.fullpage-tour-editor .hotspot-label-color:hover,
.fullpage-tour-editor .hotspot-label-format-button:not(.active):hover,
.fullpage-tour-editor .hotspot-label-align-button:not(.active):hover,
.fullpage-tour-editor .hotspot-label-toolbar select:hover,
.fullpage-tour-editor .hotspot-label-size input:hover,
.fullpage-tour-editor .hotspot-label-size input:focus {
    background: #333333 !important;
    color: #ffffff;
}

.fullpage-tour-editor .hotspot-label-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: stretch;
    height: 34px;
    flex: 0 0 58px;
    min-width: 0;
    font-size: 11px;
    color: #bdbdbd;
    white-space: nowrap;
}

.fullpage-tour-editor .hotspot-label-size input {
    width: 36px;
    max-width: 36px;
    height: 100%;
    font-size: 12px;
    padding: 0 2px;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    text-align: right;
    appearance: textfield;
    -moz-appearance: textfield;
    cursor: text;
}

.fullpage-tour-editor .hotspot-label-size:hover {
    background: #333333 !important;
    color: #ffffff;
}

.fullpage-tour-editor .hotspot-label-size:hover input {
    background: #333333 !important;
    color: #ffffff;
}

.fullpage-tour-editor .hotspot-label-size input::-webkit-outer-spin-button,
.fullpage-tour-editor .hotspot-label-size input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.fullpage-tour-editor .hotspot-label-align-group {
    display: contents;
    gap: 0;
}

.fullpage-tour-editor .hotspot-label-align-group .hotspot-label-align-button {
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
    padding: 0;
}

.fullpage-tour-editor .hotspot-label-editor textarea {
    width: 100%;
    height: 92px;
    min-height: 92px;
    max-height: 92px;
    resize: none;
    padding: 9px 10px;
    border: 0;
    border-radius: 0 0 6px 6px;
    background: #222222 !important;
    color: #f3f3f3;
    font: inherit;
    line-height: 1.35;
    outline: 0;
}

.fullpage-tour-editor .hotspot-label-editor textarea::placeholder {
    color: rgba(243, 243, 243, 0.38);
    font-style: italic;
}

.fullpage-tour-editor .hotspot-label-hover {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(243, 243, 243, 0.72);
}

.fullpage-tour-editor .hotspot-target-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.fullpage-tour-editor .hotspot-animation-field {
    margin-top: 14px;
}

.fullpage-tour-editor .hotspot-animation-title {
    display: block;
    margin: 0 0 10px;
    color: rgba(243, 243, 243, 0.92);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
}

.fullpage-tour-editor .hotspot-animation-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.fullpage-tour-editor .hotspot-animation-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(243, 243, 243, 0.72);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    user-select: none;
}

.fullpage-tour-editor .hotspot-animation-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #1478d4;
    cursor: pointer;
}

.fullpage-tour-editor .hotspot-animation-option input:focus-visible {
    outline: 2px solid rgba(58, 139, 253, 0.8);
    outline-offset: 2px;
}

.fullpage-tour-editor .hotspot-animation-field + .settings-actions {
    margin-top: 18px;
}

.fullpage-tour-editor .hotspot-delete-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #e33714 !important;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transform: none !important;
    transition: none !important;
}

.fullpage-tour-editor .hotspot-delete-button:hover,
.fullpage-tour-editor .hotspot-delete-button:focus-visible {
    background: transparent !important;
    color: #ff4b25 !important;
    transform: none !important;
}

.fullpage-tour-editor .hotspot-delete-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.fullpage-tour-editor .hotspot-delete-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fullpage-tour-editor .hotspot-target-preview[hidden] {
    display: none;
}

.fullpage-tour-editor .hotspot-target-preview img {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    object-fit: cover;
}

.fullpage-tour-editor .hotspot-target-details {
    min-width: 0;
}

.fullpage-tour-editor .hotspot-target-name {
    overflow: hidden;
    padding: 8px;
    border-radius: 4px;
    background: #222;
    color: #f3f3f3;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fullpage-tour-editor #hotspot-target-scene {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.fullpage-tour-editor .admin-tour-hotspot-motion.hotspot-animation-bounce {
    animation: hotspot-bounce 1.2s ease-in-out infinite;
}

.fullpage-tour-editor .admin-tour-hotspot-motion.hotspot-animation-pulse {
    animation: hotspot-pulse 1.4s ease-in-out infinite;
}

.fullpage-tour-editor .admin-tour-hotspot-motion.hotspot-animation-wave {
    animation: hotspot-wave 1.6s ease-in-out infinite;
}

@keyframes hotspot-bounce {
    0%, 100% { transform: translateY(0); }
    20% { transform: translateY(-8px); }
    40% { transform: translateY(0); }
    60% { transform: translateY(-4px); }
    80% { transform: translateY(0); }
}

@keyframes hotspot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.18); opacity: 0.85; }
}

@keyframes hotspot-wave {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-6px) scale(1.04); }
    50% { transform: translateY(0) scale(1.1); }
    75% { transform: translateY(-3px) scale(1.04); }
}

.fullpage-tour-editor .admin-tour-hotspot-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    max-width: 220px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #f3f3f3;
    font-size: 13px;
    line-height: 1.25;
    white-space: pre;
    overflow: visible;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 2;
}

.fullpage-tour-editor .admin-tour-hotspot-label.is-hover-only {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.fullpage-tour-editor .tour-editor-grid.settings-open .admin-tour-hotspot-label.is-hover-only {
    opacity: 1;
    visibility: visible;
}

.fullpage-tour-editor .admin-tour-hotspot:hover .admin-tour-hotspot-label.is-hover-only,
.fullpage-tour-editor .admin-tour-hotspot:focus-within .admin-tour-hotspot-label.is-hover-only {
    opacity: 1;
    visibility: visible;
}

.photo-panel-title {
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.photo-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-field label {
    font-weight: 700;
    font-size: 0.95rem;
}

.fullpage-tour-editor .settings-field label,
.fullpage-tour-editor .settings-value,
.fullpage-tour-editor #selected-hotspot-label {
    color: #F3F3F3 !important;
}

.fullpage-tour-editor .settings-field .hotspot-animation-option {
    color: rgba(243, 243, 243, 0.72) !important;
    font-size: 1rem;
    font-weight: 400 !important;
}

.fullpage-tour-editor .settings-field input,
.fullpage-tour-editor .settings-field textarea,
.fullpage-tour-editor .settings-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: #111111 !important;
    color: #f3f3f3 !important;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

.settings-field.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scene-list {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    max-height: 150px;
}

.scene-list-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: center;
    padding: 0;
    cursor: pointer;
    transition: transform 180ms ease;
}

.scene-list-item:hover {
    transform: translateY(-2px);
}

.scene-list-item.active .scene-thumbnail {
    border-color: rgba(255,255,255,0.9);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.scene-thumbnail {
    width: 120px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.12);
}

.scene-list-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.scene-list-item strong {
    display: block;
    font-size: 0.96rem;
}

.scene-list-item span {
    display: none;
}


.scene-list-item span {
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
}

/* Manage Scenes page specific overrides */
.manage-scenes-page .scene-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    width: 100%;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 4px;
}

.manage-scenes-page .scene-list-item {
    width: 100%;
    min-width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    text-align: center;
    transition: background 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.manage-scenes-page .scene-list-item:hover {
    transform: none;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.manage-scenes-page .scene-list-item.selected {
    transform: none;
    border-color: rgba(59,130,246,0.95);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.25);
    background: rgba(255,255,255,0.08);
}

.manage-scenes-page .scene-list-item.selected .scene-thumbnail {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.35);
}

.manage-scenes-page .scene-thumbnail {
    width: 100%;
    max-width: 260px;
    height: 160px;
    border-radius: 18px;
    object-fit: cover;
}

.manage-scenes-page .scene-list-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
    padding-top: 8px;
}

.manage-scenes-page .scene-list-item strong {
    display: block;
    font-size: 1rem;
    margin-top: 2px;
}

.manage-scenes-page .scene-list-item span {
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
}


.scene-delete-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(224, 73, 47, 0.14);
    color: #ff6b6b;
    cursor: pointer;
    transition: background 150ms ease;
}

.scene-delete-btn:hover {
    background: rgba(224, 73, 47, 0.24);
}

@media (max-width: 1100px) {
    .tour-editor-grid {
        grid-template-columns: 1fr;
    }
    .panorama-viewer-shell {
        min-height: 400px;
    }
}

/* Info card preview and action buttons */
.info-card .preview { width: 100%; height: 140px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; background: rgba(0,0,0,0.36); border: 1px solid rgba(255,255,255,0.04); }
.info-card .preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-card h4 { font-size: 1.15rem; margin-bottom: 6px; }
.info-card p { margin: 0; color: rgba(255,255,255,0.8); }
.info-card .action-row { display: flex; gap: 14px; margin-top: 12px; align-items: center; justify-content: space-evenly; }
.action-btn { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 4px; background: transparent; border-radius: 8px; border: none; color: #f8fafc; cursor: pointer; font-weight: 700; transition: all 180ms ease; }
.action-btn .action-icon { width: 44px; height: 44px; border-radius: 999px; background: rgba(255,255,255,0.06); display: grid; place-items: center; font-size: 18px; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.action-btn .action-label { font-size: 12px; opacity: 0.95; margin-top: 4px; }
.action-btn:hover .action-icon { transform: translateY(-3px); }
.action-btn:active .action-icon { transform: translateY(0); }
.action-btn.active { background: transparent; border: none; color: #ffffff; }
.action-btn.active .action-icon { background: rgba(34,213,94,0.18); box-shadow: 0 8px 22px rgba(34,213,94,0.12); }

.map-overlay-widgets .nav-widget.info-card,
.building-hover-card {
    background: #FFFFFF;
    color: #1F1F1F;
    border-color: rgba(31, 31, 31, 0.14);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}
.info-card h4,
.info-card p,
.info-card #detail-name,
.info-card #detail-description,
.inside-floor-header,
.inside-item,
.inside-item strong,
.inside-item p,
.building-hover-card .hover-title {
    color: #1F1F1F;
}
.info-card .preview {
    background: #F3F3F3;
    border-color: rgba(31, 31, 31, 0.1);
}
.action-btn {
    color: #1F1F1F;
}
.action-btn.active {
    color: #1F1F1F;
}
.action-btn .action-icon {
    background: #F3F3F3;
    color: #1F1F1F;
}
.inside-item {
    background: #F7F7F7;
    border-color: rgba(31, 31, 31, 0.1);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}
.inside-item:hover,
.inside-item.selected {
    border-color: rgba(31, 31, 31, 0.35);
    background: #EEEEEE;
}
.building-hover-card .hover-image-wrapper {
    background: #F3F3F3;
}
.building-hover-card .hover-no-image {
    color: #1F1F1F;
}
.building-hover-card .hover-directions-btn {
    background: #F3F3F3;
    border-color: rgba(31, 31, 31, 0.14);
    color: #1F1F1F;
}
.building-hover-card .hover-directions-btn:hover {
    background: #EAEAEA;
}
#panorama-viewer .pnlm-hotspot {
    background-image: none !important;
    background-position: initial !important;
}
#panorama-viewer .pnlm-hotspot:hover {
    background-color: transparent !important;
}
#panorama-viewer .pnlm-load-box,
#panorama-viewer .pnlm-lbox {
    display: none !important;
}
#panorama-viewer,
#panorama-viewer .pnlm-container,
#panorama-viewer .pnlm-render-container {
    background: #07111F !important;
}
.map-overlay-widgets .nav-widget.info-card,
.building-hover-card,
.map-overlay-widgets .inside-item {
    background: #F4FBFC;
}
.map-overlay-widgets .inside-controls .inside-category-wrap label,
.map-overlay-widgets .inside-controls .inside-category-wrap label:hover,
.map-overlay-widgets .inside-controls .inside-category-wrap input[type="radio"]:checked + span,
.map-overlay-widgets .inside-controls .inside-category-wrap input[type="radio"]:focus-visible + span {
    color: #1F1F1F;
}

/* Make the icon itself smaller on narrow screens */
@media (max-width: 520px) {
    .action-btn { width: 60px; }
    .action-btn .action-icon { width: 36px; height: 36px; font-size: 16px; }
    .action-btn .action-label { font-size: 11px; }
}

/* Walkthrough System Styles */
.panorama-viewer {
    opacity: 1;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.walkthrough-hotspot {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.walkthrough-hotspot:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(100, 180, 255, 0.8));
}

/* Responsive layout for the campus map page. */
.smartnav-index-page {
    overflow: hidden;
}

.smartnav-index-page .map-overlay-top {
    align-items: flex-start;
}

.smartnav-index-page .map-search-card,
.smartnav-index-page .map-action-buttons,
.smartnav-index-page .map-overlay-widgets,
.smartnav-index-page .map-branding {
    max-width: 100%;
}

@media (max-width: 1100px) {
    .smartnav-index-page .map-overlay-top {
        top: 14px;
        left: 14px;
        right: 14px;
        gap: 12px;
    }

    .smartnav-index-page .map-action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: min(520px, 58%);
    }

    .smartnav-index-page .map-action-buttons button,
    .smartnav-index-page .map-action-buttons #open-360-tour-btn,
    .smartnav-index-page .map-action-buttons .map-admin-btn {
        min-width: 0;
        padding: 9px 10px;
        font-size: 0.88rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .smartnav-index-page .map-overlay-widgets {
        top: 132px;
        right: 14px;
        width: min(360px, calc(100% - 28px));
    }
}

@media (max-width: 720px) {
    .smartnav-index-page .map-hotspot {
        min-width: clamp(30px, 5cqw, 56px);
        max-width: 16cqw;
        padding: clamp(2px, 0.45cqw, 5px) clamp(3px, 0.65cqw, 7px);
        font-size: clamp(6px, 0.8cqw, 10px);
        border-width: 1px;
    }

    .smartnav-index-page .map-hotspot.selected {
        transform: translate(-50%, -50%) scale(1.03);
    }

    .smartnav-index-page .map-overlay-top {
        position: absolute;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .smartnav-index-page .map-search-card {
        width: 100%;
        min-height: 38px;
    }

    .smartnav-index-page .map-action-buttons {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        width: 100%;
        gap: 5px;
    }

    .smartnav-index-page .map-action-buttons button,
    .smartnav-index-page .map-action-buttons #open-360-tour-btn,
    .smartnav-index-page .map-action-buttons .map-admin-btn {
        min-height: 34px;
        padding: 7px 4px;
        border-radius: 10px;
        font-size: 0.68rem;
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
    }

    .smartnav-index-page .map-action-buttons .inline-chat-button {
        padding: 7px 4px;
    }

    .smartnav-index-page .map-overlay-widgets {
        top: auto;
        right: 10px;
        left: 10px;
        bottom: 0;
        width: auto;
        z-index: 10;
        pointer-events: none;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget {
        max-height: min(48vh, 380px);
        padding: 12px;
        border-radius: 14px;
        position: relative;
        z-index: 11;
        pointer-events: auto;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card {
        min-height: 0;
        max-height: min(62vh, 460px);
        padding-top: 28px;
        overflow: hidden;
        transform: translateY(calc(100% - 30px));
        transition: transform 220ms ease;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-expanded {
        transform: translateY(calc(-1 * clamp(62px, 10vh, 86px)));
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-dragging {
        transition: none;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode {
        max-height: calc(100dvh - clamp(62px, 10vh, 86px) - 12px);
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode #inside-list-container {
        max-height: none;
        min-height: 0;
        overflow: hidden;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode #inside-list-container .inside-list {
        max-height: none;
        min-height: 0;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode #inside-list-container .inside-items {
        max-height: calc(100dvh - 230px);
        overflow-y: auto;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-list-header-row {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 8px;
        padding: 6px 4px 8px;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-controls {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: stretch;
        width: 100%;
        gap: 8px;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-floor-select {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 7px 8px;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-category-wrap {
        display: flex;
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        gap: 6px;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-category-wrap label {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
        padding: 6px 8px;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.directory-card {
        min-height: 0;
        max-height: min(62vh, 460px);
        padding-top: 28px;
        transform: translateY(calc(100% - 30px));
        transition: transform 220ms ease;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.directory-card.is-expanded {
        transform: translateY(calc(-1 * clamp(62px, 10vh, 86px)));
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.directory-card.is-dragging {
        transition: none;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.buildings-card {
        min-height: 0;
        max-height: min(62vh, 460px);
        padding-top: 28px;
        transform: translateY(calc(100% - 30px));
        transition: transform 220ms ease;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.buildings-card.is-expanded {
        transform: translateY(calc(-1 * clamp(62px, 10vh, 86px)));
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.buildings-card.is-dragging {
        transition: none;
    }

    .smartnav-index-page .info-card-toggle {
        position: absolute;
        top: 8px;
        left: 50%;
        display: block;
        width: 64px;
        height: 6px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(31, 31, 31, 0.28);
        transform: translateX(-50%);
        cursor: pointer;
        touch-action: none;
    }

    .smartnav-index-page .info-card-toggle span {
        display: block;
        width: 100%;
        height: 100%;
    }

    .smartnav-index-page .info-card-toggle:focus-visible {
        outline: 2px solid #2878d4;
        outline-offset: 4px;
    }

    .smartnav-index-page .map-overlay-widgets .preview {
        height: 100px;
    }

    .smartnav-index-page .map-overlay-widgets .action-row {
        gap: 6px;
    }

    .smartnav-index-page .map-branding {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        padding: 8px 12px;
        border-radius: 12px;
        box-sizing: border-box;
        transform: none;
    }

    .smartnav-index-page .map-branding h1 {
        font-size: 1rem;
    }

    .smartnav-index-page .map-branding p {
        font-size: 0.75rem;
    }

    .smartnav-index-page .map-controls {
        bottom: 74px;
        left: 10px;
        gap: 6px;
    }

    .smartnav-index-page .map-control {
        width: 38px;
        height: 38px;
    }

    .smartnav-index-page .chat-panel {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .smartnav-index-page .modal {
        padding: 10px;
    }

    .smartnav-index-page .modal-box {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 12px;
        border-radius: 16px;
    }
}

@media (max-width: 420px) {
    .smartnav-index-page .map-hotspot {
        min-width: 26px;
        max-width: 13cqw;
        padding: 2px 3px;
        font-size: clamp(5px, 0.65cqw, 8px);
    }

    .smartnav-index-page .map-action-buttons button,
    .smartnav-index-page .map-action-buttons #open-360-tour-btn,
    .smartnav-index-page .map-action-buttons .map-admin-btn {
        font-size: 0.6rem;
    }

    .smartnav-index-page .map-search-card input {
        min-width: 0;
        font-size: 13px;
    }

    .smartnav-index-page .map-overlay-widgets {
        top: auto;
        bottom: 0;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-category-wrap label {
        gap: 5px;
        padding: 5px 6px;
        font-size: 0.86rem;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card.is-inside-mode .inside-category-wrap input[type="radio"] {
        width: 14px;
        height: 14px;
    }

    .smartnav-index-page .map-overlay-widgets .nav-widget.info-card {
        max-height: min(66vh, 420px);
    }
}

/* Selected hotspot indicator with corner brackets */

#hotspot-clear-selection {
    display: none !important;
}

.hotspot-selection-bracket {
    position: fixed;
    pointer-events: none;
    z-index: 999;
    width: 16px;
    height: 16px;
    border: 2px solid #3b82f6;
}

.hotspot-selection-bracket.top-left {
    border-right: none;
    border-bottom: none;
}

.hotspot-selection-bracket.top-right {
    border-left: none;
    border-bottom: none;
}

.hotspot-selection-bracket.bottom-left {
    border-right: none;
    border-top: none;
}

.hotspot-selection-bracket.bottom-right {
    border-left: none;
    border-top: none;
}

.panorama-modal.transitioning .panorama-viewer {
    opacity: 0.5;
}

/* Settings hint text for destination orientation */
.settings-hint {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin: 4px 0 8px 0;
}

/* Destination orientation capture button */
.btn-small {
    padding: 4px 8px !important;
    font-size: 0.9rem !important;
    min-width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    border: none !important;
    background: transparent !important;
    color: #f3f3f3 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: scale(1.1) !important;
    border: none !important;
}

.btn-small:active {
    transform: scale(0.95) !important;
    border: none !important;
}

.btn-small:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Walkthrough preview mode highlight */
.walkthrough-preview-mode {
    border: 2px solid rgba(100, 180, 255, 0.5);
    border-radius: 8px;
    padding: 8px;
}


