/* ============================================================
   voogle — SwissNovo suite typography tokens
   Inter for UI + Varela Round wordmark with red `oo` + JetBrains
   Mono for IDs and code. Loaded via Google Fonts in index.html
   (preconnect + single css2 request); this file just declares the
   tokens and the base html/body family.
   ============================================================ */
:root {
    /* Typography
       --------------------------------------------------------------------
       Suite branding keeps the Varela Round wordmark with the red `oo`,
       but the UI itself reads as a modern tech-sans. We split the tokens:
         * --hood-font     — UI body & controls (Inter; cv11 = single-storey g,
                             ss01 = open digits, tnum = tabular for IDs/counts)
         * --hood-display  — Varela Round, restricted to the brand wordmark
         * --hood-mono     — JetBrains Mono, used for parcel/egrid IDs, code
       Variable-friendly fallback chain stays system-aware in case Google
       Fonts is blocked. */
    --hood-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --hood-display: 'Varela Round', system-ui, sans-serif;
    --hood-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, 'Cascadia Code', Consolas, monospace;
}

/* Base UI typography — Inter with kerning/ligatures, single-storey 'g' (cv11),
   open digits (ss01), and grayscale antialiasing for clean rendering on dark
   surfaces. Tabular figures (tnum) keep numeric columns aligned in panorama
   metadata and coordinate inputs. */
html {
    font-family: var(--hood-font);
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'cv11' 1, 'ss01' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.navbar {
    background: #ffffff;
    padding: 1.2rem;
    margin: -20px -20px 0px -20px;
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.icon-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.icon-button:hover {
    color: #333;
    background-color: #f0f0f0;
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
body.dark .theme-icon-sun { display: block; }
body.dark .theme-icon-moon { display: none; }

.settings-button {
    composes: icon-button;
}

body.dark {
    background-color: #0f172a;
    color: #ffffff;
}

body.dark .navbar {
    background: #1e293b;
}

body.dark .container {
    background: #1e293b;
}

body.dark .panorama-container {
    background: #1e293b;
}

body.dark .panorama-container h2 {
    color: #f1f5f9;
}

body.dark .panorama-count {
    background: #334155;
    color: #cbd5e1;
}

body.dark .image-container {
    background: #1e293b;
}

body.dark .pano-info {
    background: #1e293b;
}

body.dark .pano-street-name {
    color: #f1f5f9;
}

body.dark .pano-date {
    color: #94a3b8;
}

body.dark .pano-info > div {
    border-top-color: #334155 !important;
}

body.dark .action-btn.select-all {
    color: #22c55e;
}

body.dark .action-btn.select-all:hover {
    background: #064e3b;
}

body.dark .action-btn.clear {
    color: #cbd5e1;
}

body.dark .action-btn.clear:hover {
    background: #334155;
}

body.dark #gridColumns {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark .columns-label {
    color: #94a3b8 !important;
}

body.dark .action-btn.export-zip {
    background: #3b82f6;
}

body.dark .action-btn.export-zip:hover {
    background: #2563eb;
}

body.dark .action-btn.export-print {
    background: #64748b;
}

body.dark .action-btn.export-print:hover {
    background: #475569;
}

body.dark .logo-first,
body.dark .subtitle {
    color: #ffffff;
}

body.dark .icon-button {
    color: #888;
}

body.dark .icon-button:hover {
    color: #fff;
    background-color: #333;
}

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10100;
}

.settings-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.settings-content h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.settings-form {
    margin-bottom: 16px;
}

.settings-form label {
    margin-bottom: 16px;
    color: #333;
    font-weight: bold;
}

/* Settings modal kept its hardcoded white surface + #333 headings/labels in
   dark mode, so the panel rendered white-on-white-ish and the inputs stayed
   light fields. Mirror the dark surface used by the other modals (#1e293b)
   and give the inner controls the deep-field treatment (#0f172a) so the form
   is legible. The #gridMode select relies on undefined --bg-color/--text-color
   vars, so it also needs an explicit dark override here. */
body.dark .settings-content {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark .settings-content h3,
body.dark .settings-form label {
    color: #e2e8f0;
}

body.dark .settings-content input,
body.dark .settings-content select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark .settings-content input[type="checkbox"] {
    accent-color: #3b82f6;
}

body.dark .settings-content button {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

.logo {
    /* The wordmark is the one place the suite-wide Varela Round identity
       lives — body type around it is the modern Inter UI face. */
    font-family: var(--hood-display);
    font-size: 2.3rem;
    font-weight: normal;
    line-height: 1;
    color: #000000;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    display: inline-block;
    padding: 4px 0;
}

.subtitle {
    font-family: var(--hood-font);
    font-size: 1.75rem;
    color: #000000;
    margin-left: auto;
}

.logo-first {
    color: #000000;
    display: inline-block;
}

.logo-second {
    color: #DC2626;
    display: inline-block;
}

.logo-first + .logo-second,
.logo-second + .logo-first {
    margin-left: -0.5px;
}

body {
    font-family: var(--hood-font);
    max-width: 100%;
    margin: 0 auto 20px auto;
    padding: 12px 20px;
    line-height: 1.6;
    background-color: #f5f7fa;
}

.container {
    background: #334155;
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 10px;
}

.search-group {
    position: relative;
    flex: 1;
    z-index: 2000;
}

.search-group input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border: none;
    border-radius: 8px;
    background: #475569;
    color: #e2e8f0;
    height: 48px;
    font-size: 15px;
    transition: background 0.2s;
}

.search-group input::placeholder {
    color: #94a3b8;
}

.search-group input:focus {
    background: #3e4a5f;
    outline: none;
}

.coord-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coord-icon {
    background: #475569;
    border: none;
    padding: 12px;
    margin: 0 0 0 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    transition: all 0.2s;
    border-radius: 8px;
    width: 48px;
    height: 48px;
}

.coord-icon:hover {
    background: #3e4a5f;
    color: #ffffff;
}

.coord-icon svg {
    display: block;
}

/* Special styling for lat/lng inputs */
.coord-group input[type="number"] {
    width: 120px;
    height: 48px;
    padding: 12px;
    background: #475569;
    color: #e2e8f0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    -moz-appearance: textfield;
}

.coord-group input[type="number"]::-webkit-outer-spin-button,
.coord-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.coord-group input[type="number"]:focus {
    background: #3e4a5f;
}

.coord-group label {
    margin: 0;
}

.form-row.compact {
    margin-bottom: 0;
    gap: 8px;
    align-items: center;
}

.start-button {
    height: 48px;
    padding: 0 40px;
    margin-left: 8px;
    flex-shrink: 0;
    background: #22c55e !important;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.start-button:hover {
    background: #16a34a !important;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.keyboard-focused {
    background: #f5f5f5;
}

/* In dark mode the dropdown kept its hardcoded white background while the
   item text inherited body.dark's white color — white-on-white. Give the
   dropdown a dark surface + readable text; the hover state below sits one
   shade lighter so the focused row still stands out. */
body.dark .search-results {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark .search-result-item:hover,
body.dark .search-result-item.keyboard-focused {
    background: #334155;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.panorama-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.panorama-container h2 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panorama-count {
    background: #e2e8f0;
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.panorama-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.action-btn.select-all {
    background: transparent;
    color: #22c55e;
}

.action-btn.select-all:hover {
    background: #f0fdf4;
}

.action-btn.clear {
    background: transparent;
    color: #64748b;
}

.action-btn.clear:hover {
    background: #f1f5f9;
}

.action-btn.export-zip {
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn.export-zip:hover {
    background: #2563eb;
}

.action-btn.export-print {
    background: #64748b;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn.export-print:hover {
    background: #475569;
}

#gridColumns {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 0.9em;
    transition: border-color 0.2s;
}

#gridColumns:hover {
    border-color: #4a90e2;
}

#gridColumns:focus {
    outline: none;
    border-color: #4a90e2;
}

label {
    color: white;
}

.form-group {
    margin-bottom: 8px;
    min-width: 0;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.lang-selector-wrapper {
    display: flex;
    align-items: center;
}

.lang-selector {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: transparent;
    color: #555;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: border-color 0.2s, background 0.2s;
    height: 36px;
    outline: none;
}

.lang-selector:hover {
    border-color: #aaa;
    background: #f5f5f5;
}

body.dark .lang-selector {
    border-color: #475569;
    color: #cbd5e1;
    background: transparent;
}

body.dark .lang-selector:hover {
    background: #334155;
    border-color: #64748b;
}

.panorama-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.panorama-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.panorama-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.columns-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.columns-label {
    color: #64748b !important;
    font-size: 0.9em;
    margin: 0 !important;
    font-weight: normal !important;
}

.grid-columns-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 0.9em;
    transition: border-color 0.2s;
}

.grid-columns-select:hover {
    border-color: #4a90e2;
}

body.dark .grid-columns-select {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

@media (max-width: 768px) {
    body {
        padding: 8px 12px;
    }

    .navbar {
        margin: -8px -12px 8px -12px;
        padding: 10px 12px;
    }

    .logo-container {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .header-controls {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .subtitle {
        font-size: 1.1rem;
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 8px;
        padding: 0 4px;
    }

    .form-row.compact {
        margin-top: 8px;
    }

    .form-group {
        width: 100%;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        margin-bottom: 0;
    }

    .form-group label {
        min-width: 100px;
        margin-bottom: 0;
    }

    .form-group input[type="text"],
    .form-group input[type="number"] {
        width: 100% !important;
        max-width: none;
        padding: 8px;
        font-size: 14px;
    }

    .coord-group {
        display: none;
    }

    .coord-icon {
        display: none;
    }

    .start-button {
        width: 100%;
        padding: 12px;
        margin-top: 8px;
        margin-left: 0;
        font-size: 14px;
        height: auto;
        flex-shrink: 0;
    }

    .form-row.compact {
        flex-direction: column;
        align-items: stretch;
    }

    .search-group {
        width: 100%;
    }

    #map {
        height: 280px;
        margin: 8px 0;
    }

    #panoramaImages {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .columns-control {
        display: none;
    }

    .panorama-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }

    .panorama-header-left {
        width: 100%;
        justify-content: space-between;
    }

    .panorama-header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .panorama-actions {
        gap: 8px !important;
    }

    .action-btn {
        padding: 7px 12px;
        font-size: 0.82rem;
    }

    .action-btn.export-zip,
    .action-btn.export-print {
        font-size: 0.82rem;
        padding: 7px 10px;
    }

    .container {
        padding: 8px 10px;
        margin-bottom: 8px;
    }

    .panorama-container {
        padding: 14px 12px;
    }

    .image-container {
        margin-bottom: 0;
    }

    .pano-info {
        padding: 8px 10px;
    }

    .pano-info > div {
        font-size: 0.82rem !important;
    }

    .pano-info input[type="range"] {
        height: 20px;
    }

    .settings-content {
        margin: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }

    .info-modal {
        padding: 0;
        align-items: flex-end;
    }

    .info-modal-content {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    #status {
        margin: -6px 0 6px 0;
        padding: 6px;
    }

    .lang-selector {
        font-size: 0.8rem;
        padding: 4px 6px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 6px 8px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .panorama-header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .action-btn.export-zip span,
    .action-btn.export-print span {
        display: none;
    }

    .action-btn.export-zip,
    .action-btn.export-print {
        padding: 8px 12px;
    }
}
label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    margin: 0;
    background: white;
    color: #000000;
}

input[type="number"] {
    font-family: var(--hood-mono);
    text-align: right;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 4px 36px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
}

button:hover {
    background-color: #45a049;
}

/* Start button specific styles */
.container > .form-row > button {
    min-width: 180px;
}

/* Panorama buttons specific styles */
.image-container button {
    min-width: 60px;
}

.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.progress-modal-content {
    background: white;
    padding: 32px 48px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    min-width: 300px;
    text-align: center;
}

.progress-message {
    font-size: 1.1em;
    line-height: 1.6;
    font-weight: 500;
    color: #334155;
}

.progress-message.success {
    color: #065f46;
}

.progress-message.error {
    color: #991b1b;
}

body.dark .progress-modal-content {
    background: #1e293b;
}

body.dark .progress-message {
    color: #cbd5e1;
}

body.dark .progress-message.success {
    color: #34d399;
}

body.dark .progress-message.error {
    color: #f87171;
}

/* Progress bar used by the collect & ZIP-download modals. Determinate fill
   driven inline via `width: NN%`; indeterminate variant runs the keyframe
   below. Tokens match the suite's amber-on-slate progress accent. */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 6px;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
    border-radius: 999px;
    transition: width 0.25s ease-out;
}

.progress-bar-fill-indeterminate {
    position: absolute;
    top: 0;
    left: 0;
}

.progress-bar-pct {
    font-size: 0.85em;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.progress-sublabel {
    font-size: 0.85em;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

body.dark .progress-bar { background: #334155; }
body.dark .progress-bar-pct,
body.dark .progress-sublabel { color: #94a3b8; }

@keyframes voogleProgressIndet {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(280%); }
    100% { transform: translateX(280%); }
}

/* ---- PRM Save-parcel pill + Saved-parcels modal ---------------------- */

.prm-controls-root {
    display: flex;
    align-items: center;
    gap: 6px;
}

.prm-save-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.save-parcel-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: filter 0.15s ease-in-out, background-color 0.15s ease-in-out;
    line-height: 1;
}

.save-parcel-pill:hover:not(:disabled) { filter: brightness(1.08); }
.save-parcel-pill:disabled { cursor: default; opacity: 0.85; }

body.dark .save-parcel-pill { border-color: rgba(255, 255, 255, 0.08); }

.saved-parcels-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.saved-parcels-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

body.dark .saved-parcels-card { background: #1e293b; color: #e2e8f0; }

.saved-parcels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark .saved-parcels-header { border-color: rgba(255, 255, 255, 0.06); }

.saved-parcels-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.saved-parcels-body {
    overflow-y: auto;
    padding: 8px 12px 16px;
}

.saved-parcels-empty {
    text-align: center;
    color: #64748b;
    padding: 32px 12px;
    font-size: 0.95rem;
}

.saved-parcel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.15s ease-in-out;
}

.saved-parcel-row:hover { background: rgba(15, 23, 42, 0.04); }
body.dark .saved-parcel-row:hover { background: rgba(255, 255, 255, 0.04); }

.saved-parcel-main { flex: 1; min-width: 0; }

.saved-parcel-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark .saved-parcel-label { color: #f1f5f9; }

.saved-parcel-meta {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 2px;
}

.saved-parcel-open {
    flex: none;
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: filter 0.15s ease-in-out;
}

.saved-parcel-open:hover { filter: brightness(1.08); }

/* ---- Claire (AI chat widget) ----------------------------------------- */

.claire-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1050;
    font-family: var(--hood-font);
}

.claire-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease-in-out, box-shadow 0.18s ease-in-out;
}

.claire-bubble:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5); }
/* While the panel is open the launcher would otherwise sit just below it as a
   stray orange/amber blob (the panel floats at bottom:68px, the bubble at
   bottom:18px). Hide it; the panel's own × button closes the panel and the
   bubble reappears. */
.claire-bubble-open { display: none; }

.claire-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 380px;
    max-width: calc(100vw - 28px);
    height: 540px;
    max-height: calc(100vh - 100px);
    background: white;
    color: #0f172a;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

body.dark .claire-panel {
    background: #0f172a;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.08);
}

.claire-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.04) 0%, transparent 100%);
}

body.dark .claire-panel-header {
    border-color: rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.10) 0%, transparent 100%);
}

.claire-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.claire-panel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.claire-panel-app {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.10);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.claire-panel-actions { display: flex; gap: 2px; }

.claire-icon-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.claire-transcript {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.claire-empty { margin: auto 0; padding: 20px 6px; text-align: center; }
.claire-empty-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.claire-empty-body { font-size: 0.85rem; color: #64748b; margin-bottom: 16px; }
body.dark .claire-empty-body { color: #94a3b8; }

.claire-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.claire-suggestions button {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: white;
    border-radius: 10px;
    font-size: 0.82rem;
    cursor: pointer;
    color: inherit;
    transition: background-color 0.15s ease-in-out;
}

.claire-suggestions button:hover { background: rgba(15, 23, 42, 0.04); }
body.dark .claire-suggestions button { background: #1e293b; border-color: rgba(255, 255, 255, 0.10); }
body.dark .claire-suggestions button:hover { background: #334155; }

.claire-turn { display: flex; }
.claire-turn-user { justify-content: flex-end; }
.claire-turn-assistant { justify-content: flex-start; }

.claire-turn-bubble {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.claire-turn-user .claire-turn-bubble {
    background: #ef4444;
    color: white;
    border-bottom-right-radius: 4px;
}

.claire-turn-assistant .claire-turn-bubble {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    border-bottom-left-radius: 4px;
}

body.dark .claire-turn-assistant .claire-turn-bubble {
    background: #1e293b;
    color: #e2e8f0;
}

.claire-typing { display: inline-flex; gap: 4px; padding: 12px; }
.claire-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
    animation: claireTyping 1.1s infinite ease-in-out;
}
.claire-typing span:nth-child(2) { animation-delay: 0.15s; }
.claire-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes claireTyping {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.3; }
    40% { transform: scale(1); opacity: 0.85; }
}

.claire-composer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: white;
}

body.dark .claire-composer { background: #0f172a; border-color: rgba(255, 255, 255, 0.06); }

.claire-composer input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: white;
    color: inherit;
    font-size: 0.88rem;
}

body.dark .claire-composer input { background: #1e293b; border-color: rgba(255, 255, 255, 0.10); }
.claire-composer input:focus { outline: none; border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16); }

.claire-send {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: #ef4444;
    color: white;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: filter 0.15s ease-in-out;
}

.claire-send:hover:not(:disabled) { filter: brightness(1.08); }

@media (max-width: 480px) {
    .claire-panel { width: calc(100vw - 16px); right: -10px; bottom: 66px; }
}

/* ---- Compare overlay ------------------------------------------------- */

.compare-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    flex-direction: column;
}

.compare-overlay[hidden] { display: none; }

.compare-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.compare-overlay-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.compare-overlay-close {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}
.compare-overlay-close:hover { background: rgba(255, 255, 255, 0.16); color: white; }

.compare-grid {
    flex: 1;
    display: grid;
    gap: 8px;
    padding: 8px;
    min-height: 0;
}

.compare-tile {
    margin: 0;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    position: relative;
}

.compare-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
    flex: 1;
    min-height: 0;
}

.compare-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    font-size: 0.78rem;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.compare-caption-date { font-weight: 600; }
.compare-caption-dist { opacity: 0.78; }

.action-btn.compare { background: #8b5cf6; color: white; }
.action-btn.compare:hover { filter: brightness(1.08); }

/* ---- a11y + mobile sweep --------------------------------------------- */

/* Global focus-visible ring so keyboard nav is legible. Reverted inside
   Mapbox controls/popups so we don't step on the map's interaction model. */
:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}

.mapboxgl-ctrl :focus-visible,
.mapboxgl-popup :focus-visible {
    outline: revert;
}

/* Touch target sizing — bump small icon buttons to ≥40px on touch-primary
   screens (per WCAG 2.2 Success Criterion 2.5.8). Desktop keeps the tighter
   feel. */
@media (pointer: coarse) {
    .icon-button,
    .panel-action-btn,
    .action-btn {
        min-height: 40px;
        min-width: 40px;
    }
    .save-parcel-pill { min-height: 40px; }
}

/* Responsive modals — the settings & info modals were max-width:500px which
   blew past the viewport on phones. Cap to viewport with breathing room. */
.settings-content,
.info-modal-content,
.progress-modal-content,
.saved-parcels-card {
    max-width: min(560px, calc(100vw - 24px));
    width: 100%;
    box-sizing: border-box;
}

.settings-modal,
.info-modal,
.progress-modal,
.saved-parcels-modal {
    padding: 12px;
}

@media (max-width: 600px) {
    .settings-content { padding: 18px 16px; }
    .info-modal-content { padding: 18px 14px; }
    .panorama-header { flex-wrap: wrap; gap: 10px; }
    .panorama-header-right { width: 100%; justify-content: space-between; }
    /* Compare grid drops to single column on tiny phones — side-by-side is
       not legible on a 360px width. */
    .compare-grid { grid-template-columns: 1fr !important; grid-template-rows: auto !important; }
    .compare-tile { aspect-ratio: 4 / 3; }
}

/* When the screen is touch-first, give the panorama pan-area a "grabbing"
   cursor + the user-friendly touch-action hint so the browser does not
   try to fight our touchstart preventDefault. */
.image-pan-container {
    touch-action: none;
}

#map {
    height: 500px;
    width: 100%;
    margin: 0 0 10px 0;
    border-radius: 8px;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    opacity: 0.9;
}

.image-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.image-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.pano-info {
    padding: 10px 12px;
    background: white;
}

.pano-street-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.pano-date {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.image-pan-container {
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    /* Zoom transform pipeline: JS sets `transform: scale(n)` inline; the
       transition + origin used to live as an inline style on the element. */
    transform-origin: center;
    transition: transform 0.1s ease-out;
}

.image-pan-container img {
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center;
    width: 100%;
    cursor: pointer;
    display: block;
}

.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.info-modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-modal-x-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 1;
}

.info-modal-x-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* The close X sits on the blue hero in light mode where its translucent-white
   pill reads fine. In dark mode the modal body behind the hero is dark, so the
   button needs a slightly stronger white wash to stay visible at the corner. */
body.dark .info-modal-x-btn {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.info-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    color: white;
    padding: 24px 32px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.info-logo {
    /* Second wordmark instance — also the suite Varela Round display face. */
    font-family: var(--hood-display);
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.info-logo .logo-first {
    color: #ffffff;
}

.info-logo .logo-second {
    color: rgba(255, 255, 255, 0.8);
}

.info-title {
    font-size: 1.4em;
    margin: 0 0 6px 0;
    font-weight: 600;
    line-height: 1.2;
}

.info-subtitle {
    font-size: 0.95em;
    margin: 0;
    opacity: 0.95;
    line-height: 1.4;
}

.info-content {
    padding: 16px 24px;
    background: #f8fafc;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.info-section {
    margin-bottom: 12px;
}

.info-two-col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.info-section h2 {
    color: #1e3a8a;
    font-size: 1.1em;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.info-section p {
    color: #444;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0 0 6px 0;
}

.info-features {
    margin-bottom: 12px;
}

.info-features h2 {
    color: #1e3a8a;
    font-size: 1.1em;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.2s;
}

.feature-item:hover {
    background: #f0f1f3;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.feature-item svg {
    color: #1e3a8a;
    flex-shrink: 0;
    margin-top: 1px;
    width: 16px;
    height: 16px;
}

.feature-item span {
    color: #333;
    font-size: 0.88em;
    line-height: 1.4;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    color: #444;
    font-size: 0.9em;
    line-height: 1.5;
    padding: 4px 0 4px 24px;
    position: relative;
}

.info-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #1e3a8a;
    font-weight: bold;
    font-size: 1em;
}

.info-cta {
    text-align: center;
    padding: 16px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-top: 12px;
}

.info-cta h2 {
    color: #1e3a8a;
    font-size: 1.2em;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.info-tagline {
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

.cta-button {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 10px 28px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

@media (max-width: 768px) {
    .info-modal {
        padding: 10px;
    }

    .info-hero {
        padding: 40px 20px;
    }

    .info-logo {
        font-size: 2.5em;
    }

    .info-title {
        font-size: 1.6em;
    }

    .info-subtitle {
        font-size: 1em;
    }

    .info-content {
        padding: 24px 16px;
    }

    .info-two-col-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-card {
        padding: 20px;
    }

    .info-section h2,
    .info-features h2 {
        font-size: 1.4em;
    }

    .info-section p {
        font-size: 1em;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-item {
        padding: 15px;
    }

    .info-list li {
        font-size: 1em;
    }

    .info-cta h2 {
        font-size: 1.5em;
    }

    .info-tagline {
        font-size: 1em;
    }

    .cta-button {
        padding: 14px 30px;
        font-size: 1em;
    }

    .info-close-btn-hero {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

body.dark .info-modal-content {
    background: #1e293b;
}

body.dark .info-content {
    background: #1e293b;
}

body.dark .info-card {
    background: #1e293b;
}

body.dark .info-section h2,
body.dark .info-features h2,
body.dark .info-cta h2 {
    color: #3b82f6;
}

body.dark .info-section p,
body.dark .info-list li {
    color: #cbd5e1;
}

body.dark .feature-item {
    background: #334155;
    color: #cbd5e1;
}

body.dark .feature-item:hover {
    background: #475569;
}

body.dark .feature-item span {
    color: #cbd5e1;
}

body.dark .info-cta {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .info-tagline {
    color: #94a3b8;
}

body.dark .info-close-btn-hero {
    background: rgba(255, 255, 255, 0.95);
}

body.dark .info-close-btn-hero:hover {
    background: #ffffff;
}

body.dark .info-close-btn-hero svg {
    color: #1e3a8a;
    stroke-width: 2.5;
}
/* Tour Styles */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-spotlight {
    position: absolute;
    border: 3px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10001;
}

.tour-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    transition: all 0.3s ease;
}

.tour-title {
    color: #1e3a8a;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.tour-description {
    color: #475569;
    font-size: 1em;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.tour-step-indicator {
    color: #64748b;
    font-size: 0.9em;
    font-weight: 500;
}

.tour-buttons {
    display: flex;
    gap: 8px;
}

.tour-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.tour-skip {
    background: transparent;
    color: #64748b;
}

.tour-skip:hover {
    background: #f1f5f9;
}

.tour-next {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
}

.tour-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

body.dark .tour-tooltip {
    background: #1e293b;
}

body.dark .tour-title {
    color: #3b82f6;
}

body.dark .tour-description {
    color: #cbd5e1;
}

body.dark .tour-footer {
    border-top-color: #334155;
}

body.dark .tour-skip:hover {
    background: #334155;
}

@media (max-width: 768px) {
    .tour-tooltip {
        max-width: 90%;
        padding: 20px;
    }
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
}

.side-panel-content {
    background: #ffffff;
    width: 420px;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.22s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.side-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.side-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-action-btn {
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.panel-action-btn:hover {
    background: #f1f5f9;
}

.panel-action-btn-danger {
    color: #ef4444;
    border-color: #fecaca;
}

.panel-action-btn-danger:hover {
    background: #fef2f2;
}

.panel-close-btn {
    padding: 4px;
}

.panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.history-empty {
    padding: 32px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.history-item:hover {
    background: #f8fafc;
}

.history-item-main {
    flex: 1;
    min-width: 0;
}

.history-item-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.history-item-load {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.history-item-load:hover {
    color: #1e293b;
    background: #e2e8f0;
}

.favorites-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 20px;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.favorites-item:hover {
    background: #f8fafc;
}

.favorites-item-thumb {
    width: 72px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.favorites-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorites-item-info {
    flex: 1;
    min-width: 0;
}

.favorites-item-date {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.favorites-item-coords,
.favorites-item-dist {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.favorites-item-notes {
    width: 100%;
    margin-top: 6px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.8rem;
    resize: vertical;
    background: transparent;
    color: #475569;
    box-sizing: border-box;
}

.favorites-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.favorites-item-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

body.dark .side-panel-content {
    background: #1e293b;
    border-left: 1px solid #334155;
}

body.dark .side-panel-header {
    border-bottom-color: #334155;
}

body.dark .side-panel-header h3 {
    color: #f1f5f9;
}

body.dark .panel-action-btn {
    border-color: #334155;
    color: #94a3b8;
}

body.dark .panel-action-btn:hover {
    background: #334155;
}

body.dark .history-item {
    border-bottom-color: #1e293b;
}

body.dark .history-item:hover {
    background: #0f172a;
}

body.dark .history-item-label {
    color: #f1f5f9;
}

body.dark .history-item-load:hover {
    color: #f1f5f9;
    background: #334155;
}

body.dark .favorites-item {
    border-bottom-color: #1e293b;
}

body.dark .favorites-item:hover {
    background: #0f172a;
}

body.dark .favorites-item-date {
    color: #f1f5f9;
}

body.dark .favorites-item-notes {
    border-color: #334155;
    color: #cbd5e1;
}

body.dark .favorites-item-notes::placeholder {
    color: #475569;
}

body.dark .favorites-item-thumb {
    background: #334155;
}

/* ZITADEL user menu */
.user-menu-root {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-avatar-btn {
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
}

.user-avatar-img,
.user-avatar-initials {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #DC2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    object-fit: cover;
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    background: var(--bg-color, #fff);
    color: var(--text-color, #1f2937);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    z-index: 1000;
}

.user-menu-dropdown[hidden] {
    display: none;
}

.user-menu-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.user-menu-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.user-menu-email {
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    margin-top: 2px;
    word-break: break-all;
}

.user-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 13px;
    color: inherit;
    cursor: pointer;
}

.user-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark .user-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* ===== Screenshot controls (navbar buttons + overlays) ===== */
.screenshot-controls-root {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    transition: opacity 200ms;
}

.screenshot-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms, color 200ms;
}

.screenshot-btn-capture { color: #10b981; }
.screenshot-btn-gallery { color: #06b6d4; }

body.dark .screenshot-btn-capture { color: #34d399; }
body.dark .screenshot-btn-gallery { color: #22d3ee; }

.screenshot-btn:disabled { cursor: not-allowed; opacity: 0.55; }

#screenshotOverlayRoot { position: fixed; inset: 0; z-index: 10200; pointer-events: none; }
#screenshotOverlayRoot > * { pointer-events: auto; }

.screenshot-overlay {
    position: fixed;
    inset: 0;
    z-index: 10200;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-overlay-card {
    background: #fff;
    color: #1f2937;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
}

body.dark .screenshot-overlay-card { background: #1f2937; color: #e5e7eb; }

.screenshot-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(16, 185, 129, 0.25);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: rn-spin 0.9s linear infinite;
}

@keyframes rn-spin { to { transform: rotate(360deg); } }

.screenshot-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10220;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.screenshot-toast-success { background: #16a34a; }
.screenshot-toast-error   { background: #dc2626; }
.screenshot-toast-body { flex: 1; line-height: 1.4; }
.screenshot-toast-link { display: block; margin-top: 4px; color: #fff; text-decoration: underline; font-size: 12px; word-break: break-all; }
.screenshot-toast-close { background: transparent; border: 0; color: inherit; font-size: 18px; opacity: 0.8; cursor: pointer; }
.screenshot-toast-close:hover { opacity: 1; }

/* ===== Saved Images Panel (gallery modal) ===== */
.sip-modal {
    position: fixed;
    inset: 0;
    z-index: 10180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.sip-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}
.sip-content {
    position: relative;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    background: var(--bg-color, #fff);
    color: var(--text-color, #1f2937);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
body.dark .sip-content { background: #0f172a; color: #e5e7eb; border-color: #1f2937; }

.sip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    gap: 12px;
}
body.dark .sip-header { border-bottom-color: #1f2937; }
.sip-header-left { display: flex; gap: 12px; align-items: flex-start; }
.sip-header-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    display: inline-flex; align-items: center; justify-content: center;
}
.sip-header-title { font-weight: 600; font-size: 15px; }
.sip-header-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
body.dark .sip-header-sub { color: #94a3b8; }
.sip-header-actions { display: flex; gap: 6px; }

.sip-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
}
.sip-state {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.sip-state-error { color: #dc2626; }

.sip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.sip-card {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-color, #fff);
    display: flex; flex-direction: column;
}
body.dark .sip-card { background: #111827; border-color: #1f2937; }

.sip-thumb {
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    background: #e5e7eb;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.sip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sip-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sip-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sip-card-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sip-card-meta { font-size: 11px; color: #6b7280; }
body.dark .sip-card-meta { color: #94a3b8; }
.sip-card-actions { display: flex; justify-content: space-between; margin-top: 8px; }
.sip-link { background: transparent; border: 0; color: #06b6d4; font-size: 12px; cursor: pointer; padding: 0; }
.sip-link:hover { text-decoration: underline; }
.sip-link-danger { color: #dc2626; }

.sip-showroom {
    display: inline-block;
    margin-top: 14px;
    font-size: 12px;
    color: #06b6d4;
}
.sip-showroom:hover { text-decoration: underline; }

/* Lightbox */
.sip-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10230;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.sip-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
}
.sip-lightbox-content {
    position: relative;
    display: flex;
    gap: 12px;
    max-width: 1200px;
    max-height: 92vh;
    width: 100%;
}
.sip-lightbox-close {
    position: absolute;
    top: -10px; right: -10px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #1f2937;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    z-index: 1;
}
.sip-lightbox-image {
    flex: 1;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.sip-lightbox-image img { max-width: 100%; max-height: 90vh; display: block; }
.sip-lightbox-meta {
    width: 280px;
    background: var(--bg-color, #fff);
    color: var(--text-color, #1f2937);
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    max-height: 90vh;
}
body.dark .sip-lightbox-meta { background: #0f172a; color: #e5e7eb; }
.sip-lightbox-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; word-break: break-all; }
.sip-lightbox-meta dl { display: grid; grid-template-columns: 100px 1fr; gap: 4px 12px; font-size: 12px; margin: 0; }
.sip-lightbox-meta dt { color: #6b7280; }
body.dark .sip-lightbox-meta dt { color: #94a3b8; }
.sip-lightbox-meta dd { margin: 0; word-break: break-word; }
.sip-lightbox-extras-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; margin-top: 14px; margin-bottom: 4px; }

@media (max-width: 720px) {
    .sip-lightbox-content { flex-direction: column; }
    .sip-lightbox-meta { width: auto; max-height: 30vh; }
}

/* ===== Release Notes Panel ===== */
.release-notes-pill-root { display: inline-flex; align-items: center; }
.rn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: transparent;
    color: var(--text-color, #4b5563);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color 200ms, border-color 200ms, background 200ms;
}
.rn-pill:hover { color: #dc2626; border-color: rgba(220, 38, 38, 0.4); background: rgba(220, 38, 38, 0.06); }
.rn-pill-version { font-family: var(--hood-mono); }
.rn-pill-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #dc2626;
    animation: rn-pulse 1.4s ease-in-out infinite;
}
@keyframes rn-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
body.dark .rn-pill { color: #d1d5db; border-color: #374151; }
body.dark .rn-pill:hover { color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.1); }

.rn-modal {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: flex;
    justify-content: flex-end;
}
.rn-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}
.rn-content {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: 100%;
    background: var(--bg-color, #fff);
    color: var(--text-color, #1f2937);
    border-left: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.25);
}
body.dark .rn-content { background: #0b1322; color: #e5e7eb; border-left-color: #1f2937; }

.rn-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
body.dark .rn-header { border-bottom-color: #1f2937; }
.rn-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rn-header-left { display: flex; gap: 12px; align-items: flex-start; }
.rn-header-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    display: inline-flex; align-items: center; justify-content: center;
}
.rn-title { font-size: 15px; font-weight: 600; }
.rn-subtitle { font-size: 12px; color: #6b7280; margin-top: 4px; line-height: 1.5; }
body.dark .rn-subtitle { color: #94a3b8; }

.rn-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-stat-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 999px;
    font-size: 11px;
    color: #6b7280;
    background: transparent;
}
body.dark .rn-stat-pill { color: #cbd5e1; border-color: #1f2937; }
.rn-stat-pill-live { color: #b91c1c; border-color: rgba(220, 38, 38, 0.4); background: rgba(220, 38, 38, 0.08); }
body.dark .rn-stat-pill-live { color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.1); }
.rn-stat-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #dc2626;
    animation: rn-pulse 1.4s ease-in-out infinite;
}
.rn-stat-pill-link { text-decoration: none; }
.rn-stat-pill-link:hover { color: #dc2626; }

.rn-search-row { position: relative; }
.rn-search-wrap { position: relative; }
.rn-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.rn-search {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-color, #fff);
    color: var(--text-color, #1f2937);
    font-size: 13px;
    outline: none;
    transition: border-color 200ms, box-shadow 200ms;
}
.rn-search:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
body.dark .rn-search { background: rgba(31, 41, 55, 0.7); border-color: #1f2937; color: #f3f4f6; }
.rn-search::placeholder { color: #9ca3af; }

.rn-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-chip {
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: transparent;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms;
    display: inline-flex; align-items: center; gap: 5px;
}
body.dark .rn-chip { color: #cbd5e1; border-color: #374151; }
.rn-chip:hover { color: #1f2937; border-color: #9ca3af; }
body.dark .rn-chip:hover { color: #f3f4f6; border-color: #4b5563; }
.rn-chip-active {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.1);
}
body.dark .rn-chip-active { color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.12); }

.rn-chip-kind {
    height: 20px;
    padding: 0 6px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: default;
    flex-shrink: 0;
}

.rn-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px;
}

.rn-timeline { display: flex; flex-direction: column; gap: 18px; }
.rn-release { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.rn-release-bullet { position: relative; padding-top: 8px; }
.rn-release-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #9ca3af;
    display: block;
    margin: 0 auto;
}
.rn-release-dot-latest { background: #dc2626; animation: rn-pulse 1.4s ease-in-out infinite; }
.rn-release-body {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
}
body.dark .rn-release-body { background: rgba(255, 255, 255, 0.02); border-color: #1f2937; }
.rn-release-latest .rn-release-body {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.04);
}
.rn-release-head {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: inherit;
    font-size: 13px;
}
.rn-release-version { font-family: var(--hood-mono); font-weight: 700; }
.rn-release-codename { color: #6b7280; }
body.dark .rn-release-codename { color: #cbd5e1; }
.rn-release-latest-badge {
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.35);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
body.dark .rn-release-latest-badge { color: #fca5a5; }
.rn-release-date { margin-left: auto; font-size: 11px; color: #9ca3af; }
.rn-chev { color: #9ca3af; font-size: 11px; }

.rn-release-summary {
    padding: 0 16px 12px;
    font-size: 12px;
    line-height: 1.55;
    color: #4b5563;
}
body.dark .rn-release-summary { color: #cbd5e1; }

.rn-items { list-style: none; padding: 0 16px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rn-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.025);
    font-size: 13px;
    line-height: 1.45;
}
body.dark .rn-item { background: rgba(255, 255, 255, 0.04); }
.rn-item-icon { display: inline-flex; align-items: center; justify-content: center; padding-top: 2px; }
.rn-item-text { flex: 1; }
.rn-prs { display: inline-flex; gap: 4px; }
.rn-pr {
    font-family: var(--hood-mono);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    text-decoration: none;
}
.rn-pr:hover { color: #dc2626; }
body.dark .rn-pr { background: rgba(255, 255, 255, 0.06); }

.rn-empty {
    padding: 14px 16px;
    margin: 0 16px 12px;
    border: 1px dashed var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
}
.rn-empty-wide { margin: 24px; text-align: center; }

.rn-footer {
    padding: 12px 22px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
}
body.dark .rn-footer { border-top-color: #1f2937; color: #94a3b8; }
.rn-close-btn {
    background: transparent;
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 4px 10px;
    border-radius: 6px;
    color: inherit;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
body.dark .rn-close-btn { border-color: #1f2937; }
.rn-close-btn kbd {
    font-family: var(--hood-mono);
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.08);
}
body.dark .rn-close-btn kbd { background: rgba(255, 255, 255, 0.08); }

/* ============================================================================
   Panorama card — semantic classes (issue #29)
   Previously these layout + state styles were hardcoded as inline `style="…"`
   strings inside ui.js template literals, and the active/idle button colours
   were flipped with `element.style.background = '#…'` in the toggle handlers
   (eventHandlers.js, imageHandlers.js). They now live here; the JS toggles a
   state class (`is-active` / `is-hidden` / `is-failed`) instead of writing
   inline colours, so the look is editable from CSS and theme-syncable.
   ========================================================================== */

/* Hidden panorama dims its whole card */
.image-container.is-hidden {
    opacity: 0.3;
}

/* Media (image) area of the card + its overlay button cluster */
.pano-card-media {
    position: relative;
    overflow: hidden;
}

.pano-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

/* Overlay buttons. Base = neutral slate; state modifiers tint on toggle.
   The `.image-container button { min-width: 60px }` rule above still applies. */
.pano-card-btn {
    padding: 6px 14px;
    background: #64748b;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
    font-size: 0.85rem;
}

.pano-card-btn--fav {
    padding: 6px 10px;
    font-weight: 400;
    font-size: 1rem;
}
.pano-card-btn--fav.is-active { background: #f59e0b; }

.pano-card-btn--select.is-active { background: #22c55e; }

/* Visibility toggle: default (shown) is red "Hide"; hidden is green "Show" */
.pano-card-btn--visibility { background: #ef4444; }
.pano-card-btn--visibility.is-hidden { background: #4caf50; }

.pano-card-btn--upscale {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
}
.pano-card-btn--upscale.is-active { background: #8b5cf6; }
.pano-card-btn--upscale.is-failed { background: #ef4444; }

/* The clip wrapper that bounds the panned image inside the zoom container */
.pano-zoom-clip {
    overflow: hidden;
}

/* Info block: meta line + control rows (zoom / brightness+contrast / heading+pitch) */
.pano-meta {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 12px;
}

.pano-control-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.pano-control-row--dual {
    grid-template-columns: auto 1fr auto auto 1fr auto;
    gap: 6px;
    margin-bottom: 0;
}
.pano-control-row--dual + .pano-control-row--dual {
    margin-top: 6px;
}

.pano-control-label,
.pano-control-value,
.pano-control-value--num {
    color: #64748b;
    font-size: 0.85rem;
}
.pano-control-label,
.pano-control-value {
    white-space: nowrap;
}
.pano-control-value--num {
    min-width: 3em;
}

.pano-info input[type="range"] {
    width: 100%;
}

/* Toast shown after copying a panorama URL to the clipboard */
.voogle-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
}

/* Custom Zoom Control to match standard SwissNovo / map1st style */
.custom-zoom-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transition: background-color 160ms, border-color 160ms;
}

.dark .custom-zoom-control {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.custom-zoom-control button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #475569;
    transition: background-color 160ms, color 160ms, transform 120ms ease;
    padding: 0;
}

.dark .custom-zoom-control button {
    color: #cbd5e1;
}

.custom-zoom-control button:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #0284c7;
}

.dark .custom-zoom-control button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #34d399;
}

.custom-zoom-control button:active {
    transform: scale(0.95);
}

.zoom-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .zoom-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
