/* ── Golfapedia 3D Tour — Premium glassmorphism theme ── */
:root {
    --gp-bg-dark: rgba(5, 28, 18, 0.86);
    --gp-bg-darker: rgba(2, 18, 12, 0.92);
    --gp-border: rgba(214, 174, 66, 0.55);
    --gp-gold: #f1c84c;
    --gp-gold-soft: #d8b64a;
    --gp-white: #ffffff;
    --gp-muted: rgba(255, 255, 255, 0.78);
    --gp-green: #1f7a34;
    --gp-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
    --gp-radius-lg: 22px;
    --gp-radius-md: 14px;
    --gp-radius-pill: 999px;
    --tour-forest-deep: #0a1f14;
    --tour-forest-mid: #143528;
    --tour-forest-glass: rgba(12, 38, 28, 0.32);
    --tour-forest-glass-strong: rgba(8, 28, 20, 0.38);
    --tour-header-glass: rgba(10, 32, 24, 0.28);
    --tour-gold: #d4af37;
    --tour-gold-light: #f0d878;
    --tour-gold-muted: rgba(212, 175, 55, 0.55);
    --tour-text: #ffffff;
    --tour-text-muted: rgba(240, 216, 160, 0.88);
    --tour-glass-blur: 18px;
    --tour-glass-border: 1px solid rgba(212, 175, 55, 0.35);
    --tour-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --tour-radius-lg: 18px;
    --tour-radius-md: 14px;
    --tour-radius-sm: 12px;
    --tour-font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --tour-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --tour-chrome-tab: 28px;
    --tour-chrome-gap: 10px;
    --tour-chrome-inset: calc(var(--tour-chrome-tab) + var(--tour-chrome-gap));
    --tour-bottom-tab: 26px;
    --tour-bottom-gap: 8px;
    --tour-bottom-inset: calc(var(--tour-bottom-tab) + var(--tour-bottom-gap));
    --tour-safe-top: env(safe-area-inset-top, 0px);
    --tour-safe-right: env(safe-area-inset-right, 0px);
    --tour-safe-bottom: env(safe-area-inset-bottom, 0px);
    --tour-safe-left: env(safe-area-inset-left, 0px);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--tour-font-ui);
    background: #000 !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

#cesiumContainer {
    width: 100%;
    height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide the entire Cesium built-in toolbar */
.cesium-viewer-toolbar { display: none !important; }

.cesium-infoBox-camera {
    display: none !important;
}

.cesium-widget-credits {
    display: none !important;
}

/* ── Shared glass panel (left toolbar buttons) ── */
#fullScreenButton {
    position: static;
    left: auto;
    top: auto;
    margin: 0;
    z-index: 11000;
    box-sizing: border-box;
}

.golf-panel-btn {
    width: 100%;
    min-height: 38px;
    padding: 7px 12px 7px 10px;
    font-family: var(--tour-font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tour-text);
    background: var(--tour-forest-glass);
    border: var(--tour-glass-border);
    border-radius: var(--tour-radius-sm);
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    box-shadow: var(--tour-glass-shadow);
    cursor: pointer;
    outline: none;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.25;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, background 0.15s ease;
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.golf-panel-btn::before {
    content: '';
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.95;
}
#searchCoursesButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E");
}
#fullScreenButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 3H5a2 2 0 00-2 2v3M21 8V5a2 2 0 00-2-2h-3M3 16v3a2 2 0 002 2h3M16 21h3a2 2 0 002-2v-3'/%3E%3C/svg%3E");
}
#moreInfoButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E");
}
#googleMapButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}
#savePhotoButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
}
#rulerButton::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 17l8-8 4 4 6-6'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E");
}
.golf-panel-btn:hover {
    border-color: rgba(212, 175, 55, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.2);
    background: rgba(18, 52, 38, 0.45);
}
.golf-panel-btn:active {
    transform: scale(0.98);
    background: rgba(8, 32, 22, 0.52);
}
.golf-panel-btn-active {
    background: rgba(22, 58, 42, 0.88) !important;
    border-color: rgba(212, 175, 55, 0.75) !important;
    box-shadow: var(--tour-glass-shadow), 0 0 0 2px rgba(212, 175, 55, 0.25) !important;
}

a.golf-panel-btn.golf-panel-btn-search-courses {
    text-decoration: none;
    display: block;
}

/* ── Ruler hint ── */
#ruler-hint {
    display: none;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 20, 38, 0.9);
    color: #fff;
    font-family: 'Inter', 'Montserrat', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
    z-index: 11500;
    pointer-events: none;
    white-space: nowrap;
}

/* ── Info popup overlay + sidebar ── */
.info-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10990;
    cursor: pointer;
}
.info-popup-overlay.hidden {
    display: none !important;
}
#sidebar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    width: auto;
    z-index: 11000;
    background: transparent !important;
    padding: 0 !important;
    opacity: 1 !important;
    pointer-events: none;
}
#sidebar:not(.hidden) { pointer-events: auto; }
#sidebar .tour-info-card { pointer-events: auto; }
#sidebar.hidden {
    transform: translate(-600%, -50%);
    pointer-events: none;
}
.info-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 1rem;
}
.info-popup-actions .btn-ai,
.info-popup-actions .btn-maps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
    line-height: 1.1;
}

.info-popup-actions .btn-action-line,
.golf-panel-btn .btn-action-line {
    display: block;
    white-space: nowrap;
}

.golf-panel-btn .golf-panel-btn-label.btn-action-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    line-height: 1.1;
}
.info-popup-actions .btn-ai {
    background: linear-gradient(120deg, #154034, #23705b);
    color: #fff;
}
.info-popup-actions .btn-ai:hover {
    background: linear-gradient(120deg, #1a5044, #2a8068);
    color: #fff;
    transform: translateY(-1px);
}
.info-popup-actions .btn-maps {
    background: linear-gradient(120deg, #0f3d74, #1686a0);
    color: #fff;
}
.info-popup-actions .btn-maps:hover {
    background: linear-gradient(120deg, #0d3468, #1270a0);
    color: #fff;
    transform: translateY(-1px);
}
.info-popup-actions .btn-close-popup {
    margin-top: 0.5rem;
    padding: 6px 14px;
    font-size: 0.88rem;
    color: #6c757d;
    background: #f0f0f0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
}
.info-popup-actions .btn-close-popup:hover {
    background: #e5e5e5;
    color: #495057;
}

/* ── Course header — centered glass pill ── */
.course-top-bar {
    position: fixed;
    top: calc(var(--tour-safe-top) + 6px);
    left: 0;
    width: 100vw;
    max-width: 100vw;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10001;
    pointer-events: none;
    padding: 0 8px;
    margin: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
}
.course-header-glass {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(88vw, 640px);
    padding: 6px 16px 7px;
    background: var(--tour-header-glass);
    border: var(--tour-glass-border);
    border-radius: 14px;
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    box-shadow: var(--tour-glass-shadow);
}
/* Title text column (name + rule + location) inside the glass box. */
.course-header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
}

/* Location + meta wrapper. display:contents = the wrapper itself generates no box,
   so location and meta behave exactly as before (each on its own line) everywhere by
   default. Desktop overrides this to a single inline row (see bottom of file). */
.course-subline {
    display: contents;
}

.course-top-bar .course-name-text,
#course-name-p.course-name-text,
#spinner-course-name {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem 0.25rem;
    width: 100% !important;
    max-width: 100%;
    background: transparent !important;
    color: var(--tour-text) !important;
    font-family: var(--tour-font-ui) !important;
    font-size: 1.06rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    line-height: 1.1;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0 0 0;
    text-align: center;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
}
.course-header-rule {
    width: 100%;
    max-width: 100%;
    height: 2px;
    margin: 4px 0 5px;
    flex-shrink: 0;
    background: var(--tour-gold);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.35);
    border-radius: 999px;
}
.course-top-bar .course-location-text,
#course-location-p.course-location-text {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    background: transparent !important;
    color: var(--tour-text-muted) !important;
    font-family: var(--tour-font-ui) !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em;
    line-height: 1.2;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    text-align: center;
}

#course-name-p .gp-verified-badge--title,
#spinner-course-name .gp-verified-badge--title {
    position: relative;
    transform: none;
    margin-left: 0.2rem;
    vertical-align: middle;
}

.course-tour-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0.2rem 0 0;
    padding: 0;
    text-align: center;
}

.course-top-bar .course-meta-sep,
#course-meta-sep-p.course-meta-sep,
#spinner-course-meta-sep.course-meta-sep,
#tour-spinner-overlay .course-meta-sep {
    display: inline-block;
    margin: 0 0.35rem;
    padding: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--tour-gold);
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    opacity: 0.95;
}

.course-meta-sep[hidden],
.course-club-type-text[hidden],
.course-hole-count-text[hidden],
.course-par3-text[hidden] {
    display: none !important;
    margin: 0;
    padding: 0;
}

.course-top-bar .course-club-type-text,
.course-top-bar .course-hole-count-text,
.course-top-bar .course-par3-text,
#course-club-type-p.course-club-type-text,
#course-hole-count-p.course-hole-count-text,
#course-par3-p.course-par3-text,
#spinner-course-par3.course-par3-text,
#tour-spinner-overlay .course-club-type-text,
#tour-spinner-overlay .course-hole-count-text,
#tour-spinner-overlay .course-par3-text {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-family: var(--tour-font-ui);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tour-gold);
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

#tour-spinner-overlay .course-tour-meta-row {
    margin-top: 0.15rem;
}

#tour-spinner-overlay .course-club-type-text,
#tour-spinner-overlay .course-hole-count-text,
#tour-spinner-overlay .course-par3-text {
    font-size: 0.72rem;
}

#course-meta-row-p.course-tour-meta-row[hidden],
#spinner-course-meta-row.course-tour-meta-row[hidden] {
    display: none !important;
}

/* ── Hole info panel (right side) ── */
.yt-hole-panel {
    position: fixed;
    right: calc(var(--tour-chrome-inset) + var(--tour-safe-right));
    top: 50%;
    transform: translateY(-50%);
    z-index: 99998;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    width: 218px;
    min-width: 218px;
    pointer-events: auto;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}
.yt-hole-panel.yt-hole-panel-collapsed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%) translateX(12px);
}
.yt-hole-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 8px 10px;
    background: var(--tour-forest-glass);
    border: var(--tour-glass-border);
    border-radius: 10px;
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    box-shadow: var(--tour-glass-shadow);
    box-sizing: border-box;
}
.yt-hole-label {
    display: none !important;
}
.yt-hole-field-select {
    gap: 5px;
    overflow: visible;
}
.yt-hole-select-title {
    display: block;
    font-family: var(--tour-font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tour-text-muted);
    text-align: center;
    line-height: 1.2;
}
#yt-hole-select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 40px 6px 10px;
    font-family: var(--tour-font-ui);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--tour-text);
    background-color: rgba(6, 22, 16, 0.55);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4af37' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 11px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    text-align: left;
    text-align-last: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}
#yt-hole-select:hover,
#yt-hole-select:focus {
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(212, 175, 55, 0.2);
}
#yt-hole-select option {
    background: var(--tour-forest-deep);
    color: var(--tour-text);
    padding: 10px 12px;
    font-weight: 600;
}
.yt-hole-value-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
}
.yt-hole-stat-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.95;
}
.yt-hole-stat-icon-yards {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20L20 4'/%3E%3Cpath d='M9 15l2 2'/%3E%3Cpath d='M13 11l2 2'/%3E%3C/svg%3E");
}
.yt-hole-stat-icon-par {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v10M9 10h6'/%3E%3C/svg%3E");
}
.yt-hole-value {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: block;
    text-align: left;
    font-family: var(--tour-font-ui);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--tour-text);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Bottom controls — glass bar ── */
.yt-controls-row {
    position: fixed;
    left: var(--tour-chrome-inset);
    right: var(--tour-chrome-inset);
    bottom: var(--tour-bottom-inset);
    width: 100vw;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    box-sizing: border-box;
    padding: 0 8px;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}
.yt-controls-row.yt-bottom-collapsed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
}
.yt-controls-glass {
    width: 100%;
    max-width: 960px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px 8px 3px 6px;
    background: var(--tour-header-glass);
    border: var(--tour-glass-border);
    border-radius: var(--tour-radius-lg);
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    box-shadow: var(--tour-glass-shadow);
    box-sizing: border-box;
}
.yt-progress-bar {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    background: transparent;
    padding: 0;
    pointer-events: auto;
}

/* ── Play/pause button ── */
.yt-playpause-btn {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: var(--tour-forest-glass);
    color: var(--tour-gold-light);
    border: 2px solid var(--tour-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.yt-playpause-btn:hover {
    background: rgba(22, 58, 42, 0.9);
    border-color: var(--tour-gold-light);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(212, 175, 55, 0.25);
}
.yt-playpause-btn:active { transform: scale(0.95); }
.yt-playpause-btn svg { width: 13px; height: 13px; fill: var(--tour-gold-light); margin-left: 2px; }

/* ── Tour status bubble ── */
.tour-action-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: var(--tour-forest-glass-strong);
    color: var(--tour-text);
    font-family: var(--tour-font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    border: var(--tour-glass-border);
    white-space: nowrap;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--tour-glass-shadow);
    z-index: 3;
}
.tour-action-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(12, 38, 28, 0.9) transparent transparent transparent;
}

/* ── Progress track ── */
.yt-progress-track {
    flex: 1 1 0;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    position: relative;
    margin: 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
    cursor: pointer;
    touch-action: none;
}
.yt-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #8b6914 0%, var(--tour-gold) 50%, var(--tour-gold-light) 100%);
    border-radius: 999px;
    z-index: 1;
    pointer-events: none;
    transition: width 0.2s;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}
.yt-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--tour-forest-deep);
    border: 2px solid var(--tour-gold);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: left 0.2s;
    box-sizing: border-box;
    touch-action: none;
    user-select: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.yt-progress-thumb:hover, .yt-progress-thumb.dragging {
    width: 18px;
    height: 18px;
    border-color: var(--tour-gold-light);
}
.yt-progress-thumb-label {
    position: absolute;
    top: -40px;
    left: 0;
    transform: translateX(-50%);
    background: var(--tour-forest-glass-strong);
    color: var(--tour-gold-light);
    font-family: var(--tour-font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    border: 1px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(8px);
}
.yt-progress-thumb-label.active { opacity: 1; }

/* ── Center play overlay — gold ring circle ── */
#center-play-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 12000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.12);
    pointer-events: none;
}
#center-play-overlay #center-play-btn {
    pointer-events: auto;
}
#center-play-btn {
    background: var(--tour-forest-glass);
    border: 3px solid var(--tour-gold);
    border-radius: 50%;
    width: 102px;
    height: 102px;
    min-height: 102px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    animation: center-play-pulse 2s ease-in-out infinite;
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(212, 175, 55, 0.25);
}
#center-play-btn:hover {
    background: rgba(18, 52, 38, 0.92);
    transform: scale(1.04);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 32px rgba(212, 175, 55, 0.4);
}
#center-play-btn .center-play-triangle {
    width: 0;
    height: 0;
    flex-shrink: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 23px solid var(--tour-text);
    margin-left: 6px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
#center-play-btn .center-play-label {
    margin: 0;
    padding: 0 6px;
    color: var(--tour-text);
    font-family: var(--tour-font-ui);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    text-align: center;
    user-select: none;
    white-space: nowrap;
}
@keyframes center-play-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(212, 175, 55, 0.18); }
    50%      { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 22px rgba(212, 175, 55, 0.32); }
}

/* ── Branding inside bottom bar ── */
#logo-copyright-overlay.logo-copyright-overlay {
    position: static;
    flex: 0 0 auto;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    padding: 0 4px 0 8px;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
#logo-copyright-overlay.logo-copyright-overlay.visible {
    visibility: visible;
    opacity: 1;
}
#logo-copyright-overlay .logo-copyright-logo {
    width: 20px;
    height: 20px;
    display: block;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
}
#logo-copyright-overlay .logo-copyright-text {
    color: var(--tour-text-muted);
    font-family: var(--tour-font-ui);
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
/* QA pass FIX 7 — Privacy link in the minimal footer pill.
   Parent has pointer-events:none so the pill itself stays click-through over the
   Cesium canvas; re-enable pointer-events on the link so it's tappable. */
#logo-copyright-overlay .logo-copyright-sep {
    color: rgba(240, 216, 160, 0.45);
    font-size: 0.7rem;
    line-height: 1;
    margin: 0 2px;
}
#logo-copyright-overlay .logo-copyright-privacy {
    color: var(--tour-text-muted);
    font-family: var(--tour-font-ui);
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    pointer-events: auto;
    padding: 4px 2px; /* small tap padding without changing visual layout */
}
#logo-copyright-overlay .logo-copyright-privacy:hover,
#logo-copyright-overlay .logo-copyright-privacy:focus-visible {
    color: var(--tour-gold-light);
    text-decoration: underline;
    outline: none;
}

/* ── Fallback hide for body class ── */
body.hide-yt-controls .yt-controls-row,
body.hide-yt-controls .yt-hole-panel,
body.hide-yt-controls #yt-right-panel-toggle,
body.hide-yt-controls #yt-bottom-chrome-toggle { display: none !important; }

/* ── Sidebar card styles ── */
.sidebar-card, .tour-info-card {
    background: #fff !important;
    border-radius: 18px !important;
    border: 1.5px solid #e0e4ea !important;
    padding: 2rem 2.5rem;
    min-width: 260px;
    max-width: 90vw;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sidebar-title { color: #1e3c72 !important; font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5em; }
.sidebar-address { color: #6c757d !important; font-size: 1.05rem; font-weight: 500; margin-bottom: 1em; }

/* ── Mobile responsive ── */
@media (max-width: 900px) {
    .golf-panel-btn {
        padding: 6px 8px !important;
        font-size: 0.72rem !important;
        border-radius: 9px !important;
    }
    .yt-controls-row {
        left: var(--tour-chrome-inset) !important;
        right: var(--tour-chrome-inset) !important;
        bottom: var(--tour-bottom-inset) !important;
        width: auto !important;
        max-width: none !important;
        padding: 0 8px !important;
        justify-content: flex-start !important;
    }
    .yt-progress-bar {
        width: 100% !important;
        max-width: none !important;
        gap: 8px !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }
    .yt-hole-panel {
        right: var(--tour-chrome-inset);
        top: auto;
        bottom: calc(var(--tour-bottom-inset) + 52px);
        transform: none;
        width: 200px;
        min-width: 200px;
        gap: 6px;
    }
    .yt-hole-panel.yt-hole-panel-collapsed {
        transform: translateX(12px);
    }
    #yt-hole-select {
        min-height: 30px;
        font-size: 0.74rem;
        padding: 4px 22px 4px 6px;
    }
    .yt-hole-value {
        min-height: 0;
        font-size: 0.74rem;
        padding: 0;
    }
    .yt-playpause-btn {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
        min-width: 0 !important;
    }
    .yt-playpause-btn svg { width: 13px !important; height: 13px !important; }
    .yt-progress-track {
        min-width: 0 !important;
        height: 7px !important;
    }
    .course-top-bar { padding: 0 6px !important; top: 4px !important; margin: 0 !important; }
    .course-header-glass { padding: 5px 12px 6px !important; border-radius: 12px !important; }
    #center-play-btn {
        width: 92px !important;
        height: 92px !important;
        min-height: 92px !important;
        gap: 4px !important;
    }
    #center-play-btn .center-play-label {
        font-size: 0.54rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }
    #center-play-btn .center-play-triangle {
        border-top: 12px solid transparent !important;
        border-bottom: 12px solid transparent !important;
        border-left: 20px solid var(--tour-text) !important;
        margin-left: 5px !important;
    }
    .tour-action-bubble {
        font-size: 13px !important;
        padding: 7px 12px !important;
        bottom: calc(100% + 8px) !important;
        /* Shift bubble slightly right so it isn't cut off on very small screens */
        transform: translateX(-30%) translateY(0) !important;
    }
    .yt-controls-glass {
        padding: 5px 8px 5px 6px !important;
        gap: 8px !important;
    }
    #logo-copyright-overlay .logo-copyright-logo {
        width: 16px !important;
        height: 16px !important;
    }
    #logo-copyright-overlay .logo-copyright-text {
        font-size: 0.6rem !important;
    }
    /* INFO popup: centered with left/right margins on mobile */
    #sidebar {
        top: 50% !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-width: none !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
    #sidebar.hidden {
        transform: translateY(-100vh) !important;
    }
    #sidebar .tour-info-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 1.5rem 1.25rem !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .info-popup-actions {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        margin-top: 1rem !important;
    }
    .info-popup-actions .btn-ai,
    .info-popup-actions .btn-maps,
    .info-popup-actions .btn-close-popup {
        width: 100% !important;
        max-width: 260px !important;
        margin-top: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    #golf-tour-panel { left: 4px !important; }
    .yt-controls-row { bottom: var(--tour-bottom-inset) !important; }
    .yt-playpause-btn { width: 32px !important; height: 32px !important; flex: 0 0 32px !important; }
    .yt-playpause-btn svg { width: 12px !important; height: 12px !important; }
}

/* Cellphone only: compact hole/yards/par stack */
@media (max-width: 600px) {
    a.tour-left-brand,
    .tour-left-brand {
        top: 6px !important;
        left: 6px !important;
    }
    .yt-hole-panel {
        top: auto !important;
        transform: none !important;
        right: var(--tour-chrome-inset) !important;
        bottom: calc(var(--tour-bottom-inset) + 48px) !important;
        width: 196px !important;
        min-width: 196px !important;
        gap: 6px !important;
    }
    .yt-hole-field {
        padding: 7px 8px !important;
    }
    #yt-hole-select {
        min-height: 34px !important;
        font-size: 0.88rem !important;
    }
    .yt-hole-value {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .yt-hole-panel {
        bottom: 68px !important;
        right: 6px !important;
        width: 148px !important;
    }
}

/* ── Loading spinner overlay ── */
#tour-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
    /* Elegant aerial golf-course layout (matches the 3D tours) instead of a flat green panel.
       A dark gradient is layered on top of the photo so the spinner + text never wash out. */
    background-color: #0a1f14;
    background-image:
        linear-gradient(160deg, rgba(8, 22, 15, 0.72) 0%, rgba(10, 26, 18, 0.55) 45%, rgba(8, 20, 14, 0.78) 100%),
        url('/images/tour/spinner-course-bg.jpg?v=cb20260616a');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: opacity 0.7s ease;
}
#tour-spinner-overlay.hiding {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.spinner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: max-content;
    max-width: min(88vw, 420px);
    margin: 0 auto;
    /* Refined translucent backdrop — lighter & tighter so text/spinner read cleanly
       over the course photo without a heavy black box. */
    padding: 1.5rem 2rem 1.6rem;
    border-radius: 16px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.3) 65%, rgba(0, 0, 0, 0.18) 100%);
    border: 1px solid rgba(212, 175, 55, 0.18);
    -webkit-backdrop-filter: blur(6px) saturate(115%);
    backdrop-filter: blur(6px) saturate(115%);
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
@media (max-width: 600px) {
    .spinner-content {
        padding: 1.2rem 1.4rem 1.3rem;
        border-radius: 13px;
        max-width: 86vw;
    }
}
.golf-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.8rem 0 1.2rem 0;
}
.dual-spinner {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.outer-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(212, 175, 55, 0.35);
    border-top: 3px solid var(--tour-gold);
    opacity: 0.7;
    animation: spin-outer 1.2s linear infinite;
}
@keyframes spin-outer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.inner-arc {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-bottom: 5px solid var(--tour-gold-light);
    border-left: 5px solid var(--tour-gold-light);
    opacity: 0.85;
    animation: spin-inner 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes spin-inner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}
.center-ball {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #f0f0f0 60%, #e0e0e0 100%);
    border-radius: 50%;
    border: 2px solid #e9ecef;
    transform: translate(-50%, -50%);
    animation: ball-pulse 1.3s ease-in-out infinite;
}
@keyframes ball-pulse {
    0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}
.spinner-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.35rem;
}
.spinner-brand-logo {
    display: block;
    width: 34px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.spinner-brand-name {
    font-family: 'Inter', 'Montserrat', Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.spinner-text {
    text-align: center;
    color: #fff;
    font-family: 'Inter', Arial, sans-serif;
}
#tour-spinner-overlay .loading-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
}
#tour-spinner-overlay .course-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.3rem;
}
#tour-spinner-overlay .course-location {
    font-size: 1.05rem;
    color: var(--tour-text-muted);
    margin-top: 0.1rem;
}
/* Slow / spotty connection messaging — collapsed until there's something to say. */
#tour-spinner-overlay .spinner-connection-msg {
    max-width: min(88vw, 460px);
    margin: 0 auto 0;
    padding: 0;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ff4d4d;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-bottom 0.4s ease;
}
#tour-spinner-overlay .spinner-connection-msg.visible {
    opacity: 1;
    max-height: 5rem;
    margin-bottom: 0.85rem;
}
#tour-spinner-overlay .spinner-connection-msg.warn {
    color: #ff4d4d;
}
#tour-spinner-overlay .spinner-connection-msg.error {
    color: #ff4d4d;
}
@media (max-width: 600px) {
    #tour-spinner-overlay .spinner-connection-msg { font-size: 0.86rem; }
    #tour-spinner-overlay .spinner-connection-msg.visible { margin-bottom: 0.7rem; }
}
@media (max-width: 600px) {
    .dual-spinner { width: 44px; height: 44px; }
    .outer-ring { width: 44px; height: 44px; border-width: 2px; }
    .inner-arc { width: 28px; height: 28px; border-width: 3px; top: 8px; left: 8px; }
    .center-ball { width: 12px; height: 12px; border-width: 1.2px; }
    .spinner-brand-logo { width: 28px; }
    .spinner-brand-name { font-size: 1rem; }
    .spinner-brand { margin-top: 1.1rem; }
}

/* ── Hide the cesium-navigation plugin entirely (replaced by custom compass + controls) ── */
.compass,
.compass-outer-ring,
.compass-outer-ring-background,
.compass-gyro,
.compass-gyro-background,
.compass-rotation-marker,
.navigation-controls,
.distance-legend {
    display: none !important;
}

/* ── Tour controls panel — Full Screen + 3 buttons at top, nav vertically centered, left-aligned ── */
#golf-tour-panel {
    position: fixed;
    top: 50%;
    bottom: auto;
    left: calc(var(--tour-chrome-inset) + var(--tour-safe-left));
    transform: translateY(-50%);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    pointer-events: auto;
    height: auto;
    max-height: min(92dvh, calc(100dvh - 80px));
    overflow: visible;
    scrollbar-width: thin;
}
/* Embedded in an iframe (client websites + the /demo landing pages): hide the entire
   left-side control menu (Search for Courses, Full Screen, Research, Google Maps,
   Save Photo, nav controls) plus the "Show/Hide Controls" toggle that drives it — with
   the menu gone the toggle is meaningless. These are only relevant on golfapedia.org
   itself, so they remain for top-level / non-iframe views. */
html.gp-tour-in-iframe #golf-tour-panel,
html.gp-tour-in-iframe #mobile-left-chrome-toggle {
    display: none !important;
}
/* Top action buttons: equal width, left-aligned labels with word wrap */
.golf-top-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
    align-items: stretch;
    width: 100%;
}
#golf-tour-panel .golf-panel-sliding {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 168px;
    min-width: 0;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}
/* Golfapedia brand — fixed top-left (outside sliding panel) */
a.tour-left-brand,
.tour-left-brand {
    position: fixed;
    top: calc(var(--tour-safe-top) + 8px);
    left: calc(var(--tour-safe-left) + 8px);
    z-index: 11002;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    text-decoration: none;
    pointer-events: auto;
    user-select: none;
    transition: opacity 0.2s ease;
}
a.tour-left-brand:hover .tour-left-brand-text {
    color: var(--tour-gold-light);
}
.tour-left-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.45);
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.tour-left-brand-text {
    font-family: var(--tour-font-ui);
    font-size: 1.26rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--tour-text);
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
#golf-tour-panel .golf-panel-sliding > #searchCoursesButton,
#golf-tour-panel .golf-top-buttons .golf-panel-btn,
#golf-tour-panel .golf-top-buttons #fullScreenButton {
    width: 100%;
    max-width: none;
    min-width: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
#golf-tour-panel.golf-left-controls .golf-panel-sliding > #searchCoursesButton {
    margin-bottom: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
#golf-tour-panel.golf-left-controls .golf-top-buttons .golf-panel-btn,
#golf-tour-panel.golf-left-controls .golf-top-buttons #fullScreenButton {
    margin-bottom: 0;
}
/* Compass + nav controls: below top buttons in normal flow (desktop/tablet).
   Avoids overlap when the browser window is short or narrow — cellphone uses its own rules at 600px. */
#golf-tour-panel.golf-left-controls .golf-nav-section {
    position: static;
    transform: none;
    top: auto;
    left: auto;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--tour-forest-glass);
    padding: 10px;
    border-radius: var(--tour-radius-md);
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    border: var(--tour-glass-border);
    box-shadow: var(--tour-glass-shadow);
    flex-shrink: 0;
    overflow: visible;
}

/* Desktop/tablet default: nav content shows; mobile toggle hidden unless media query enables it */
#golf-mobile-nav-toggle.golf-mobile-nav-toggle {
    display: none;
}
.golf-nav-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* ── Custom compass ── */
#golf-compass {
    width: 76px;
    height: 76px;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(22, 55, 40, 0.55) 0%, rgba(8, 24, 18, 0.62) 100%);
    border: 2px solid rgba(212, 175, 55, 0.45);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
#golf-compass:hover {
    border-color: rgba(212, 175, 55, 0.75);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(212, 175, 55, 0.2);
}
#golf-compass svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transition: transform 0.15s ease-out;
}
#golf-compass .compass-tick-ring {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
}

/* ── Nav button grid ──
   Layout:  [+] [-]       zoom in / out
            [<] [>]       rotate L / R
*/
#golf-nav-controls {
    display: grid;
    grid-template-columns: 40px 40px;
    grid-template-rows:    40px 40px;
    gap: 5px;
}

/* ── Camera tilt (pitch) row: [tilt up] [tilt down] ── */
#golf-tilt-controls {
    display: grid;
    grid-template-columns: 40px 40px;
    grid-template-rows: 40px;
    gap: 5px;
}

/* ── D-pad star for panning ──
   Layout:       [^]
            [<]       [→]
                 [v]
   Left/Right centered vertically between Up/Down
*/
#golf-dpad {
    display: grid;
    grid-template-columns: 40px 40px 40px;
    grid-template-rows:    40px 40px;
    gap: 5px;
    justify-items: center;
    align-items: center;
}
#golf-dpad .golf-nav-btn:nth-child(1) { grid-column: 2; grid-row: 1; }
#golf-dpad .golf-nav-btn:nth-child(2) { grid-column: 1; grid-row: 1 / 3; }
#golf-dpad .golf-nav-btn:nth-child(3) { grid-column: 2; grid-row: 2; }
#golf-dpad .golf-nav-btn:nth-child(4) { grid-column: 3; grid-row: 1 / 3; }

/* ── Hole selector dropdown (below controls) ── */
#golf-hole-select-wrap {
    position: relative;
}
#golf-hole-select {
    width: 190px;
    padding: 8px 22px 8px 10px;
    font-family: 'Inter', 'Montserrat', Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background-color: #0c1a2e;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 11px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    text-align: left;
}
#golf-hole-select:hover, #golf-hole-select:focus {
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 6px 20px rgba(0,0,0,0.7), 0 0 0 3px rgba(0,209,255,0.18);
}
#golf-hole-select option {
    background: #0c1a2e;
    color: #fff;
    padding: 8px;
    font-weight: 600;
}

.golf-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    background: rgba(8, 28, 20, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.golf-nav-btn:hover {
    border-color: rgba(212, 175, 55, 0.65);
    transform: scale(1.06);
    background: rgba(18, 52, 38, 0.48);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.golf-nav-btn:active {
    transform: scale(0.94);
    background: rgba(6, 22, 16, 0.9);
}
.golf-nav-btn svg {
    pointer-events: none;
}

/* ── Mobile responsive ── */
@media (max-width: 600px) {
    #golf-tour-panel {
        left: var(--tour-chrome-inset);
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        height: auto;
        max-height: min(88dvh, calc(100dvh - 72px));
        gap: 0;
        align-items: flex-start;
        justify-content: center;
        transition: none;
    }
    #golf-tour-panel .golf-panel-sliding {
        align-items: stretch;
        width: 148px;
        gap: 0;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }
    /* Compass + nav directly under the top buttons (Google Map, etc.) */
    #golf-tour-panel.golf-left-controls .golf-nav-section {
        position: static;
        transform: none;
        top: auto;
        left: auto;
        margin-top: 10px;
    }
    #golf-compass { width: 52px; height: 52px; }
    #golf-tour-panel .golf-panel-sliding > #searchCoursesButton,
    #golf-tour-panel .golf-top-buttons .golf-panel-btn,
    #golf-tour-panel .golf-top-buttons #fullScreenButton {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 5px 7px !important;
        font-size: 0.66rem !important;
        border-radius: 8px !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }
    /* old panel hole select removed — bottom bar combobox handles it now */
    .golf-nav-btn { width: 32px; height: 32px; border-radius: 8px; }
    #golf-nav-controls { grid-template-columns: 32px 32px; grid-template-rows: 32px 32px; gap: 3px; }
    #golf-tilt-controls { grid-template-columns: 32px 32px; grid-template-rows: 32px; gap: 3px; }
    /* Mobile: 2x2 grid — Up/Down next to each other, Left/Right next to each other (no star/cross) */
    #golf-dpad {
        grid-template-columns: 32px 32px;
        grid-template-rows: 32px 32px;
        gap: 3px;
    }
    #golf-dpad .golf-nav-btn:nth-child(1) { grid-column: 1; grid-row: 1; }   /* Up */
    #golf-dpad .golf-nav-btn:nth-child(2) { grid-column: 1; grid-row: 2; }   /* Left */
    #golf-dpad .golf-nav-btn:nth-child(3) { grid-column: 2; grid-row: 1; }   /* Down */
    #golf-dpad .golf-nav-btn:nth-child(4) { grid-column: 2; grid-row: 2; }   /* Right */
}

/* ── Floating tooltips (JS-driven; avoids panel overflow clipping) ── */
#tour-ui-tooltip.tour-ui-tooltip {
    position: fixed;
    z-index: 120050;
    max-width: min(280px, 70vw);
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--tour-forest-glass-strong);
    color: var(--tour-text);
    font-family: var(--tour-font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    white-space: nowrap;
    border: var(--tour-glass-border);
    box-shadow: var(--tour-glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
#tour-ui-tooltip.tour-ui-tooltip.visible {
    opacity: 1;
    visibility: visible;
}
[data-tooltip]::after {
    display: none !important;
}

/* ── Right hole panel show/hide tab ── */
.tour-chrome-toggle {
    position: fixed;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--tour-glass-border);
    background: var(--tour-forest-glass);
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    box-shadow: var(--tour-glass-shadow);
    color: var(--tour-gold-light);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.tour-chrome-toggle:hover {
    border-color: rgba(212, 175, 55, 0.65);
    background: rgba(18, 52, 38, 0.62);
}
.tour-chrome-toggle-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--tour-chrome-tab);
    min-height: 72px;
    padding: 10px 4px;
    border-radius: 12px 0 0 12px;
}
.tour-chrome-toggle-bottom {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 72px;
    height: var(--tour-bottom-tab);
    min-height: 0;
    padding: 4px 10px;
    border-radius: 12px 12px 0 0;
}
.tour-chrome-toggle-bottom.is-collapsed .tour-chrome-toggle-icon {
    transform: rotate(180deg);
}
.tour-chrome-toggle-right.is-collapsed .tour-chrome-toggle-icon {
    transform: rotate(180deg);
}
.tour-chrome-toggle-icon {
    display: block;
    transition: transform 0.2s ease;
}

/* Desktop (legacy chrome; overridden when body.tour-mobile-premium) */
@media (min-width: 901px) {
    body:not(.tour-mobile-premium) .course-top-bar { top: 8px; }
    .course-top-bar .course-name-text,
    #course-name-p.course-name-text {
        font-size: 1.21rem !important;
        letter-spacing: 0.05em;
    }
    .course-top-bar .course-location-text,
    #course-location-p.course-location-text {
        font-size: 0.9rem !important;
    }
    .course-header-glass {
        padding: 9px 20px 10px;
        max-width: min(680px, 65vw);
    }
    #golf-tour-panel {
        top: 50%;
        left: var(--tour-chrome-inset);
        bottom: auto;
        transform: translateY(-50%);
        height: auto;
        max-height: min(90dvh, calc(100dvh - 72px));
        align-items: flex-start;
        justify-content: center;
    }
    #golf-tour-panel .golf-panel-sliding {
        width: 168px;
    }
    #golf-tour-panel .golf-top-buttons {
        width: 100%;
    }
    #golf-tour-panel .golf-panel-sliding > #searchCoursesButton {
        margin-bottom: 10px !important;
    }
    .yt-hole-panel {
        width: 218px;
        min-width: 218px;
        gap: 7px;
        right: var(--tour-chrome-inset);
    }
    #yt-hole-select {
        min-height: 38px;
        font-size: 1.02rem;
    }
    .yt-hole-value {
        font-size: 1.05rem;
    }
    .yt-controls-row {
        bottom: var(--tour-bottom-inset);
    }
}

.info-popup-actions .btn-maps {
    white-space: nowrap !important;
    width: auto !important;
    min-width: max-content !important;
    overflow: visible !important;
    padding-inline: 14px !important;
    font-size: 0.88rem !important;
}

/* =============================================================================
   Premium tour UI (cellphone + desktop — body.tour-mobile-premium)
   ============================================================================= */
body.tour-mobile-premium {
    overflow: hidden !important;
    height: 100dvh !important;
}

body.tour-mobile-premium #cesium,
body.tour-mobile-premium #cesiumContainer {
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
}

/* Hide legacy chrome (bottom slider, right hole panel, edge tabs) */
body.tour-mobile-premium #yt-hole-panel,
    body.tour-mobile-premium #savePhotoButton,
    body.tour-mobile-premium #rulerButton,
    body.tour-mobile-premium #yt-right-panel-toggle,
    body.tour-mobile-premium #yt-bottom-chrome-toggle,
    body.tour-mobile-premium #golf-hole-select-wrap,
    body.tour-mobile-premium #golf-mobile-nav-toggle,
    body.tour-mobile-premium #logo-copyright-overlay,
    body.tour-mobile-premium .tour-chrome-toggle,
    body.tour-mobile-premium #tour-mobile-dock,
    body.tour-mobile-premium .yt-controls-row,
    body.tour-mobile-premium .tour-action-bubble {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.tour-mobile-premium .mobile-tour-ui {
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 1000;
    }

    body.tour-mobile-premium .mobile-tour-ui > * {
        pointer-events: auto;
    }

    /* ── Top title (compact centered pill) ── */
    body.tour-mobile-premium .course-top-bar {
        position: fixed !important;
        top: calc(6px + env(safe-area-inset-top)) !important;
        left: calc(50% + 26px) !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        /* Reserve less horizontal space for the (now narrower) Change View
           button so the course name/location can be wider. */
        max-width: min(calc(100vw - 74px), 95vw) !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 50 !important;
        pointer-events: none !important;
    }

    body.tour-mobile-premium .course-header-glass {
        width: max-content !important; /* hug content */
        max-width: 100% !important;
        min-height: 50px !important;
        height: auto !important;
        max-height: none !important;
        padding: 7px 14px 8px !important; /* small internal margins */
        border-radius: 16px !important;
        background: rgba(1, 24, 16, 0.78) !important;
        border: 1px solid rgba(198, 154, 48, 0.28) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        pointer-events: auto !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body.tour-mobile-premium .course-header-text {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    body.tour-mobile-premium .course-header-rule {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body.tour-mobile-premium .course-top-bar .course-location-text::before,
    body.tour-mobile-premium #course-location-p.course-location-text::before {
        display: none !important;
    }

    body.tour-mobile-premium .course-top-bar .course-location-text,
    body.tour-mobile-premium #course-location-p.course-location-text {
        padding-top: 0 !important;
    }

    body.tour-mobile-premium .course-top-bar .course-name-text,
    body.tour-mobile-premium #course-name-p.course-name-text {
        /* Mobile course name ~25% smaller than before (was clamp(15,4.1vw,20))
           to reduce word wrapping and keep the header short. Desktop overrides
           this in the min-width:769px block, so desktop is unaffected. */
        font-size: clamp(11px, 3.1vw, 15px) !important;
        font-weight: 500 !important;
        color: #ffffff !important;
        line-height: 1.15 !important;
        letter-spacing: 0 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
    }

    body.tour-mobile-premium .course-top-bar .course-location-text,
    body.tour-mobile-premium #course-location-p.course-location-text {
        margin-top: 5px !important;
        font-size: clamp(11px, 2.9vw, 13px) !important;
        color: #f4c84a !important;
        font-weight: 500 !important;
        line-height: 1.15 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
        display: inline-block !important; /* allow rule to match text width */
        position: relative !important;
        padding-top: 6px !important; /* room for gold rule */
    }

    /* Small elegant gold rule above location, sized to location text only */
    body.tour-mobile-premium .course-top-bar .course-location-text::before,
    body.tour-mobile-premium #course-location-p.course-location-text::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 1px !important;
        background: rgba(244, 200, 74, 0.85) !important;
        box-shadow: 0 0 8px rgba(244, 200, 74, 0.25) !important;
        border-radius: 999px !important;
    }

    /* ── Logo (top-left, separate from title) ── */
    body.tour-mobile-premium a.tour-left-brand,
    body.tour-mobile-premium .tour-left-brand {
        position: fixed !important;
        top: calc(4px + env(safe-area-inset-top)) !important;
        left: calc(4px + env(safe-area-inset-left)) !important;
        z-index: 60 !important;
        gap: 0 !important;
        padding: 0 !important;
    }

    body.tour-mobile-premium .tour-left-brand-text {
        display: none !important;
    }

    body.tour-mobile-premium .tour-left-brand-logo {
        width: 58px !important;
        height: 58px !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Task 2 — Copyright pill perfectly vertically centered between the
       brand logo above (ends at top:4 + 58 = 62 px) and the controls panel
       below (starts at top:96 px).  Gap = 34 px, pill ≈ 14 px tall, so
       center top = 62 + (34 − 14) / 2 = 72 px.  flex display keeps the
       internal text vertically and horizontally centered for safety. */
    body.tour-mobile-premium .tour-copyright-under-title {
        position: fixed !important;
        top: calc(72px + env(safe-area-inset-top)) !important;
        left: calc(4px + env(safe-area-inset-left)) !important;
        width: 58px !important;
        height: 14px !important;
        margin: 0 !important;
        padding: 0 3px !important;
        border-radius: 999px !important;
        background: rgba(0, 0, 0, 0.28) !important;
        color: rgba(255, 255, 255, 0.88) !important;
        font-size: 8px !important;
        font-weight: 500 !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16) !important;
        pointer-events: none !important;
        z-index: 60 !important;
        max-width: none !important;
    }

    /* ── Left tool rail (slim, 4 items only) ── */
    body.tour-mobile-premium #golf-tour-panel {
        position: fixed !important;
        /* Nudge the left tool rail down a little so there's more breathing room
           below the "Golfapedia ©" pill (which ends ~86px). Desktop overrides
           this top in the min-width:769px block. */
        top: calc(112px + env(safe-area-inset-top)) !important;
        left: calc(4px + env(safe-area-inset-left)) !important;
        transform: none !important;
        width: 64px !important;
        max-height: none !important;
        height: auto !important;
        z-index: 45 !important;
        pointer-events: auto !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding {
        width: 64px !important;
        padding: 6px 4px !important;
        border-radius: 18px !important;
        background: rgba(0, 24, 15, 0.76) !important;
        border: 1px solid rgba(198, 154, 48, 0.22) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: flex-start !important; /* removes empty space under the last icon */
        box-sizing: border-box !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding > #searchCoursesButton {
        align-self: center !important;
    }

    body.tour-mobile-premium a.golf-panel-btn.golf-panel-btn-search-courses {
        display: flex !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding > #searchCoursesButton,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons .golf-panel-btn,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons #fullScreenButton,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons .gp-feedback-trigger.gp-feedback-tour {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        min-height: 44px !important;
        max-height: none !important;
        padding: 3px 0 !important;
        margin: 0 auto !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 3px !important;
        color: #ffffff !important;
        text-align: center !important;
        overflow: visible !important;
        align-self: center !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-btn-label {
        display: block !important;
        width: 56px !important;
        max-width: 56px !important;
        min-width: 56px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        font-size: 9px !important;
        font-weight: 500 !important;
        line-height: 1.05 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow: visible !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Research buttons: allow each caption line to wrap within the rail */
    body.tour-mobile-premium #golf-tour-panel .btn-action-line {
        display: block !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Longer toolbar captions: shrink slightly so they stay compact and
       match the height rhythm of the other toolbar buttons. */
    body.tour-mobile-premium #golf-tour-panel #googleMapButton .golf-panel-btn-label,
    body.tour-mobile-premium #golf-tour-panel #moreInfoButton .golf-panel-btn-label,
    body.tour-mobile-premium #golf-tour-panel .gp-feedback-trigger.gp-feedback-tour .golf-panel-btn-label {
        font-size: 7.5px !important;
        line-height: 1.08 !important;
        overflow-wrap: break-word !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons {
        gap: 4px !important;
        margin: 0 !important;
        width: 100% !important;
        align-items: center !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-btn::before {
        display: block !important;
        content: '' !important;
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        flex: 0 0 20px !important;
        margin: 0 auto !important;
        opacity: 1 !important;
        align-self: center !important;
    }

    /* ── Center play button ── */
    body.tour-mobile-premium #center-play-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: transparent !important;
        z-index: 40 !important;
        align-items: center !important;
        justify-content: center !important;
        pointer-events: none !important;
    }

    body.tour-mobile-premium #center-play-overlay #center-play-btn {
        pointer-events: auto !important;
    }

    body.tour-mobile-premium #center-play-btn {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: translateY(-4%) !important;
        width: 98px !important;
        height: 98px !important;
        min-height: 98px !important;
        border-radius: 50% !important;
        background: rgba(0, 22, 14, 0.72) !important;
        border: 2px solid #d7a735 !important;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.45) !important;
        backdrop-filter: blur(7px) !important;
        -webkit-backdrop-filter: blur(7px) !important;
        gap: 8px !important;
        animation: none !important;
    }

    body.tour-mobile-premium #center-play-btn .center-play-triangle {
        border-top: 15px solid transparent !important;
        border-bottom: 15px solid transparent !important;
        border-left: 24px solid #ffffff !important;
        margin-left: 6px !important;
    }

    body.tour-mobile-premium #center-play-btn .center-play-label {
        font-size: 12px !important;
        font-weight: 500 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    /* ── Manual controls (compact lower-left) ── */
    body.tour-mobile-premium .mobile-manual-controls {
        position: fixed !important;
        /* Sit closer to the left edge of the device (keeps a small safe gap).
           Desktop repositions the manual pad via JS, so this only affects mobile. */
        left: calc(8px + env(safe-area-inset-left)) !important;
        /* move up slightly to create a clearer gap above Play Tour pill */
        bottom: calc(92px + env(safe-area-inset-bottom)) !important;
        width: 118px !important;  /* +15% touch targets; room between D-pad + zoom strip */
        height: 106px !important;
        min-height: 106px !important;
        margin: 0 !important;
        padding: 5px !important;
        border-radius: 16px !important;
        background: rgba(0, 24, 15, 0.76) !important;
        border: 1px solid rgba(198, 154, 48, 0.24) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 50 !important;
        pointer-events: auto !important;
    }

    body.tour-mobile-premium .mobile-manual-controls .golf-nav-inner {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-compass {
        display: none !important;
    }

    /* Right side = two stacked pills: zoom (top) + camera tilt (bottom) */
    body.tour-mobile-premium .mobile-manual-controls #golf-nav-controls,
    body.tour-mobile-premium .mobile-manual-controls #golf-tilt-controls {
        position: absolute !important;
        right: 6px !important;
        transform: none !important;
        width: 32px !important;
        height: 40px !important;
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        grid-template-rows: none !important;
        gap: 0 !important;
        border-radius: 14px !important;
        border: 1px solid rgba(198, 154, 48, 0.45) !important;
        overflow: hidden !important;
        background: rgba(0, 16, 10, 0.45) !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-nav-controls {
        top: 6px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-tilt-controls {
        bottom: 6px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-nav-controls .golf-nav-btn,
    body.tour-mobile-premium .mobile-manual-controls #golf-tilt-controls .golf-nav-btn {
        flex: 1 1 0 !important;
        width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-nav-controls .golf-nav-btn:first-child,
    body.tour-mobile-premium .mobile-manual-controls #golf-tilt-controls .golf-nav-btn:first-child {
        border-bottom: 1px solid rgba(198, 154, 48, 0.35) !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-nav-controls .golf-nav-btn svg,
    body.tour-mobile-premium .mobile-manual-controls #golf-tilt-controls .golf-nav-btn svg {
        width: 15px !important;
        height: 15px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls .mobile-rotate-row {
        position: absolute !important;
        /* align neatly under the D-pad (same width as D-pad) */
        left: 6px !important;
        right: auto !important;
        bottom: 6px !important;
        width: 67px !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        justify-items: center !important;
        align-items: center !important;
        pointer-events: none !important;
    }

    body.tour-mobile-premium .mobile-manual-controls .mobile-rotate-row .golf-nav-btn {
        pointer-events: auto !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        border-radius: 50% !important;
        border: 1px solid rgba(198, 154, 48, 0.45) !important;
        background: rgba(0, 16, 10, 0.45) !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.tour-mobile-premium .mobile-manual-controls .mobile-rotate-row .golf-nav-btn svg {
        width: 15px !important;
        height: 15px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad {
        position: absolute !important;
        left: 6px !important;
        top: 6px !important;
        width: 67px !important;
        height: 67px !important;
        display: block !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad .golf-nav-btn {
        position: absolute !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        border-radius: 50% !important;
        border: 1px solid rgba(198, 154, 48, 0.45) !important;
        background: rgba(0, 16, 10, 0.45) !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad .golf-nav-btn:nth-child(1) {
        top: 0 !important;
        left: 20px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad .golf-nav-btn:nth-child(2) {
        top: 20px !important;
        left: 0 !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad .golf-nav-btn:nth-child(3) {
        bottom: 0 !important;
        top: auto !important;
        left: 20px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad .golf-nav-btn:nth-child(4) {
        top: 20px !important;
        right: 0 !important;
        left: auto !important;
    }

    body.tour-mobile-premium .mobile-manual-controls #golf-dpad .golf-nav-btn svg {
        width: 15px !important;
        height: 15px !important;
    }

    /* ── Yardage / par slim pill ── */
    body.tour-mobile-premium .mobile-yardage-par-bar {
        position: fixed !important;
        left: calc(50% + 34px) !important; /* add a little more gap from Play pill */
        transform: translateX(-50%) !important;
        bottom: calc(4px + 42px + 10px + env(safe-area-inset-bottom)) !important; /* gap above hole selector */
        /* Wider so "Hole X" / "Overview" never clips */
        width: min(285px, calc(100vw - 150px)) !important;
        height: 34px !important;
        padding: 0 8px !important;
        border-radius: 999px !important;
        background: rgba(0, 24, 15, 0.80) !important;
        border: 1px solid rgba(198, 154, 48, 0.26) !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        z-index: 55 !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        color: #ffffff !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat-text {
        display: inline-block !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        max-width: 100% !important;
    }

    /* Hole label gets a bit more room than the icon stats */
    body.tour-mobile-premium .mobile-yardage-par-bar .stat-hole {
        max-width: 40% !important;
        justify-content: center !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat-icon {
        width: 15px !important;
        height: 15px !important;
        flex: 0 0 15px !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .divider {
        width: 1px !important;
        height: 18px !important;
        background: rgba(215, 167, 53, 0.65) !important;
        flex-shrink: 0 !important;
    }

    /* ── Bottom hole selector (short bar) ── */
    body.tour-mobile-premium .mobile-hole-selector {
        position: fixed !important;
        left: calc(4px + env(safe-area-inset-left)) !important;
        right: calc(4px + env(safe-area-inset-right)) !important;
        bottom: calc(4px + env(safe-area-inset-bottom)) !important;
        height: 42px !important;
        max-height: 42px !important;
        border-radius: 18px !important;
        background: rgba(0, 24, 15, 0.82) !important;
        border: 1px solid rgba(198, 154, 48, 0.28) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(9px) !important;
        -webkit-backdrop-filter: blur(9px) !important;
        z-index: 60 !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 10px !important;
        gap: 8px !important;
        overflow: hidden !important;
    }

    body.tour-mobile-premium .mobile-hole-selector .selector-label {
        display: none !important;
    }

    body.tour-mobile-premium .mobile-hole-dropdown {
        height: 28px !important;
        min-width: 96px !important;
        max-width: 150px !important;
        padding: 0 22px 0 10px !important;
        border-radius: 8px !important;
        border: 1px solid rgba(198, 154, 48, 0.36) !important;
        background: rgba(0, 20, 12, 0.65) !important;
        color: #ffffff !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        flex-shrink: 0 !important;
        text-align: center !important;
        text-align-last: center !important;
    }

    body.tour-mobile-premium .mobile-hole-buttons {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    body.tour-mobile-premium .mobile-hole-buttons::-webkit-scrollbar {
        display: none !important;
    }

    body.tour-mobile-premium .mobile-hole-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        border-radius: 50% !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        background: rgba(0, 15, 10, 0.45) !important;
        color: #ffffff !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        padding: 0 !important;
    }

    body.tour-mobile-premium .mobile-hole-btn-num {
        line-height: 1 !important;
    }

    body.tour-mobile-premium .mobile-hole-btn-yds {
        margin-top: 1px !important;
        font-size: 7px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        color: rgba(255, 255, 255, 0.62) !important;
        letter-spacing: 0.2px !important;
    }

    body.tour-mobile-premium .mobile-hole-btn.active .mobile-hole-btn-yds {
        color: rgba(244, 200, 74, 0.85) !important;
    }

    body.tour-mobile-premium .mobile-hole-btn.active {
        border-color: #d7a735 !important;
        color: #f4c84a !important;
        box-shadow: 0 0 0 1px rgba(215, 167, 53, 0.25) !important;
    }

    body.tour-mobile-premium .mobile-hole-page-btn {
        width: 24px !important;
        min-width: 24px !important;
        height: 28px !important;
        border: 0 !important;
        background: transparent !important;
        color: #d7a735 !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
    }

    /* ── Left chrome toggle tab (hide/show left rail + manual controls) ── */
    /* Show/hide tab — compact pill that sits next to the Play pill.
       (Default fixed position is a mobile fallback; JS drops it just left of
       the Play pill, and on desktop it lives in-flow in the bottom stack.) */
    body.tour-mobile-premium #mobile-left-chrome-toggle {
        position: fixed !important;
        left: calc(12px + env(safe-area-inset-left)) !important;
        bottom: calc(4px + 42px + 10px + env(safe-area-inset-bottom)) !important;
        top: auto !important;
        transform: none !important;
        width: 28px !important;
        height: 34px !important;
        border-radius: 12px !important;
        background: rgba(0, 24, 15, 0.82) !important;
        border: 1px solid rgba(198, 154, 48, 0.28) !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 71 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #f4c84a !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
        transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
        pointer-events: auto !important;
    }

    body.tour-mobile-premium #mobile-left-chrome-toggle:hover {
        border-color: rgba(244, 200, 74, 0.45) !important;
        background: rgba(0, 32, 20, 0.74) !important;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36) !important;
    }

    body.tour-mobile-premium #mobile-left-chrome-toggle:active {
        transform: scale(0.96) !important;
    }

    body.tour-mobile-premium #mobile-left-chrome-toggle svg {
        width: 14px !important;
        height: 14px !important;
        display: block !important;
        transition: transform 0.2s ease !important;
    }

    /* Desktop bottom stack: the tab lives in-flow as the first item of the
       Play/stats row, just left of the Play pill (10px gap from the row's
       own gap), vertically centred with it. */
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-top-row #mobile-left-chrome-toggle {
        position: static !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 43px !important;
        height: 43px !important;
        border-radius: 12px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Hidden state: collapse left rail + manual control pad, keep the tab */
    body.tour-mobile-premium.tour-mobile-left-hidden #golf-tour-panel,
    body.tour-mobile-premium.tour-mobile-left-hidden .mobile-manual-controls,
    body.tour-mobile-premium.tour-mobile-left-hidden .tour-measure-btn {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.tour-mobile-premium.tour-mobile-left-hidden #mobile-left-chrome-toggle svg {
        transform: rotate(180deg) !important;
    }

    /* Bottom-left Play/Stop toggle (small pill) */
    body.tour-mobile-premium .mobile-play-toggle {
        position: fixed !important;
        /* Leave room on the left for the show/hide tab (12 + 28 + 6 gap) so the
           two never overlap, even before the JS positioner runs. */
        left: calc(46px + env(safe-area-inset-left)) !important;
        bottom: calc(4px + 42px + 10px + env(safe-area-inset-bottom)) !important;
        height: 34px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        background: rgba(0, 24, 15, 0.82) !important;
        border: 1px solid rgba(198, 154, 48, 0.28) !important;
        color: #ffffff !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        letter-spacing: 0.01em !important;
        z-index: 58 !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        pointer-events: auto !important;
    }

    body.tour-mobile-premium .mobile-play-toggle.is-playing {
        border-color: rgba(244, 200, 74, 0.45) !important;
        color: #f4c84a !important;
    }

    /* While auto-tour is playing: hide left rail + manual controls (keep bottom controls) */
    body.tour-mobile-premium.tour-playing #golf-tour-panel,
    body.tour-mobile-premium.tour-playing .mobile-manual-controls,
    body.tour-mobile-premium.tour-playing .tour-measure-btn {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* …but the Hide/Show button stays usable DURING playback: when the user
       explicitly shows the left controls (tour-left-user-shown) they override
       the playback auto-hide above. Re-tapping Hide adds tour-mobile-left-hidden
       and they collapse again. */
    body.tour-mobile-premium.tour-playing.tour-left-user-shown:not(.tour-mobile-left-hidden) #golf-tour-panel,
    body.tour-mobile-premium.tour-playing.tour-left-user-shown:not(.tour-mobile-left-hidden) .mobile-manual-controls,
    body.tour-mobile-premium.tour-playing.tour-left-user-shown:not(.tour-mobile-left-hidden) .tour-measure-btn {
        display: block !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body.tour-mobile-premium.tour-playing.tour-left-user-shown:not(.tour-mobile-left-hidden) .tour-measure-btn {
        display: inline-flex !important;
    }

    /* Override older 900px/600px mobile rules that inflate panels */
    body.tour-mobile-premium .yt-hole-panel,
    body.tour-mobile-premium .yt-hole-field,
    body.tour-mobile-premium .yt-controls-glass {
        display: none !important;
    }

    @media screen and (max-width: 390px) {
        body.tour-mobile-premium .mobile-hole-selector {
            left: calc(8px + env(safe-area-inset-left)) !important;
            right: calc(8px + env(safe-area-inset-right)) !important;
            gap: 6px !important;
            padding: 0 8px !important;
        }

        body.tour-mobile-premium .mobile-hole-btn {
            width: 28px !important;
            height: 28px !important;
            min-width: 28px !important;
            font-size: 11px !important;
        }

        body.tour-mobile-premium .mobile-hole-dropdown {
            min-width: 48px !important;
        }

        body.tour-mobile-premium .course-top-bar {
            width: auto !important;
            max-width: min(calc(100vw - 66px), 95vw) !important;
            left: calc(50% + 20px) !important;
        }

        body.tour-mobile-premium .course-top-bar .course-name-text,
        body.tour-mobile-premium #course-name-p.course-name-text {
            /* ~25% smaller than the previous clamp(14,3.8vw,18). */
            font-size: clamp(10.5px, 2.85vw, 13.5px) !important;
        }
    }

    @media screen and (max-height: 720px) {
        body.tour-mobile-premium .course-header-glass {
            min-height: 48px !important;
            padding: 6px 10px 7px !important;
        }

        body.tour-mobile-premium #golf-tour-panel {
            top: calc(104px + env(safe-area-inset-top)) !important;
        }

        body.tour-mobile-premium .tour-copyright-under-title {
            /* Logo (top:4 + 58 = 62) → panel (top:104).  Keep pill at 72 px. */
            top: calc(72px + env(safe-area-inset-top)) !important;
        }

        body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding {
            gap: 6px !important;
            padding: 8px 5px !important;
        }

        body.tour-mobile-premium .mobile-manual-controls {
            transform: scale(0.9);
            transform-origin: bottom left;
            bottom: calc(104px + env(safe-area-inset-bottom)) !important;
        }

        body.tour-mobile-premium .mobile-yardage-par-bar,
        body.tour-mobile-premium .mobile-play-toggle,
        body.tour-mobile-premium #mobile-left-chrome-toggle {
            bottom: calc(56px + 5px + env(safe-area-inset-bottom)) !important;
        }

        body.tour-mobile-premium #center-play-btn {
            width: 112px !important;
            height: 112px !important;
            min-height: 112px !important;
        }
    }

/* Desktop only (+25% chrome vs phone premium base; cellphone rules above unchanged) */
@media screen and (min-width: 769px) {
    body.tour-mobile-premium .course-top-bar {
        top: calc(10px + env(safe-area-inset-top)) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        max-width: min(calc(100vw - 140px), 92vw) !important;
    }

    body.tour-mobile-premium .course-top-bar .course-name-text,
    body.tour-mobile-premium #course-name-p.course-name-text {
        font-size: clamp(17px, 1.35vw, 22px) !important;
    }

    body.tour-mobile-premium .course-top-bar .course-location-text,
    body.tour-mobile-premium #course-location-p.course-location-text {
        font-size: clamp(12px, 0.95vw, 15px) !important;
    }

    body.tour-mobile-premium .course-header-glass {
        min-height: 56px !important;
        padding: 9px 18px 10px !important;
        border-radius: 18px !important;
    }

    body.tour-mobile-premium a.tour-left-brand,
    body.tour-mobile-premium .tour-left-brand {
        top: calc(10px + env(safe-area-inset-top)) !important;
        left: calc(12px + env(safe-area-inset-left)) !important;
    }

    body.tour-mobile-premium .tour-left-brand-logo {
        width: 80px !important;
        height: 80px !important;
    }

    /* Task 2 — Desktop: copyright vertically centered between the brand
       logo above (ends at top:10 + 80 = 90 px) and the controls panel
       below (starts at top:132 px).  Gap = 42 px, pill ≈ 22 px tall, so
       center top = 90 + (42 − 22) / 2 = 100 px.  flex display keeps the
       inline text crisply centered. */
    body.tour-mobile-premium .tour-copyright-under-title {
        top: calc(100px + env(safe-area-inset-top)) !important;
        left: calc(12px + env(safe-area-inset-left)) !important;
        width: 80px !important;
        height: 22px !important;
        font-size: 11px !important;
        padding: 0 5px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }

    body.tour-mobile-premium #golf-tour-panel {
        top: calc(132px + env(safe-area-inset-top)) !important;
        left: calc(12px + env(safe-area-inset-left)) !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding {
        width: 78px !important;
        padding: 10px 6px !important;
        border-radius: 22px !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding > #searchCoursesButton,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons .golf-panel-btn,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons #fullScreenButton,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons .gp-feedback-trigger.gp-feedback-tour {
        width: 65px !important;
        min-width: 65px !important;
        max-width: 65px !important;
        min-height: 60px !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-btn-label {
        width: 65px !important;
        max-width: 65px !important;
        min-width: 65px !important;
        font-size: 12.5px !important;
    }

    body.tour-mobile-premium #golf-tour-panel #googleMapButton .golf-panel-btn-label,
    body.tour-mobile-premium #golf-tour-panel #moreInfoButton .golf-panel-btn-label,
    body.tour-mobile-premium #golf-tour-panel .gp-feedback-trigger.gp-feedback-tour .golf-panel-btn-label {
        font-size: 10.5px !important;
        line-height: 1.05 !important;
        overflow-wrap: break-word !important;
    }

    body.tour-mobile-premium #golf-tour-panel .golf-panel-btn::before {
        width: 27.5px !important;
        height: 27.5px !important;
        min-width: 27.5px !important;
        min-height: 27.5px !important;
        flex: 0 0 27.5px !important;
    }

    body.tour-mobile-premium #center-play-btn {
        width: 108px !important;
        height: 108px !important;
        min-height: 108px !important;
    }

    body.tour-mobile-premium #center-play-btn .center-play-label {
        font-size: 13px !important;
    }

    body.tour-mobile-premium .mobile-manual-controls {
        left: calc(18px + env(safe-area-inset-left)) !important;
        /* Desktop stack now repositions this via JS; this is just a sensible fallback */
        bottom: calc(140px + env(safe-area-inset-bottom)) !important;
        width: 118px !important;
        height: 106px !important;
        min-height: 106px !important;
        padding: 5px !important;
        transform: scale(1.25) !important;
        transform-origin: bottom left !important;
    }

    /* Bottom stack: play (left) → yards/par → hole selector (content width, centered on page) */
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-tour-stack {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        transform: translateX(-50%) !important;
        z-index: 60 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
        pointer-events: none !important;
    }

    /* Row above hole selector: Play/Stop + Hole/Yards/Par */
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-top-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        pointer-events: none !important;
        margin: 0 0 18px 0 !important; /* small gap to hole selector */
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-top-row > * {
        pointer-events: auto !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-tour-stack > * {
        pointer-events: auto !important;
        position: static !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        top: auto !important;
        transform: none !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-play-toggle {
        height: 43px !important;
        padding: 0 16px !important;
        font-size: 15px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-yardage-par-bar {
        width: auto !important;
        min-width: 200px !important;
        max-width: none !important;
        height: 43px !important;
        padding: 0 12px !important;
        margin: 0 !important;
        align-self: center !important;
        flex-shrink: 0 !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-yardage-par-bar .stat {
        font-size: 15px !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-yardage-par-bar .stat-icon {
        width: 19px !important;
        height: 19px !important;
        flex: 0 0 19px !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-yardage-par-bar .divider {
        height: 22px !important;
    }

    /* #11 — Desktop hole selector ~20% larger (buttons, fonts, height) for a
       more polished, readable strip. Cellphone rules above are untouched. */
    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-selector {
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
        margin-top: 12px !important; /* ensure visible gap from Play/Stats row */
        height: 64px !important;
        max-height: 64px !important;
        padding: 0 16px !important;
        gap: 12px !important;
        overflow: visible !important;
        flex-shrink: 0 !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-dropdown {
        height: 48px !important;
        min-width: 132px !important;
        max-width: 210px !important;
        font-size: 17px !important;
        padding: 0 28px 0 14px !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-buttons {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        overflow-x: visible !important;
        gap: 10px !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-btn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        font-size: 18px !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-btn-yds {
        font-size: 11px !important;
        margin-top: 3px !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-page-btn {
        width: 36px !important;
        min-width: 36px !important;
        height: 46px !important;
        font-size: 26px !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Task 1 — Mobile-only larger touch targets for hole selector buttons.
   Apple/Google accessibility guidelines: minimum tap target = 48px.
   Applies only to mobile viewports (max-width: 768px) so desktop is
   unaffected.  Uses higher specificity (body.tour-mobile-premium … +
   media query) so it wins over the 30 px base rule above.
   ────────────────────────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
    /* #9 — Hole selector is 56px tall now; lift the play/stats row to clear it
       with a tighter 8px gap (was 60px + 10px) so more 3D imagery shows. */
    body.tour-mobile-premium .mobile-yardage-par-bar,
    body.tour-mobile-premium .mobile-play-toggle {
        bottom: calc(56px + 5px + env(safe-area-inset-bottom)) !important;
    }

    /* #5 — Keep the Play Tour pill on the LEFT and pin the Hole/Yards/Par pill
       to the RIGHT so they never overlap (was centred and collided with Play). */
    body.tour-mobile-premium .mobile-yardage-par-bar {
        left: auto !important;
        right: calc(8px + env(safe-area-inset-right)) !important;
        transform: none !important;
        width: auto !important;
        max-width: calc(100vw - 178px) !important;
    }

    body.tour-mobile-premium .mobile-hole-selector {
        height: 56px !important;
        max-height: 56px !important;
        border-radius: 22px !important;
        padding: 0 8px !important;
        gap: 6px !important;
    }

    /* #4 — Start/end gutters + scroll padding so the FIRST and LAST hole
       buttons are never clipped at the scroll extremes, while preserving smooth
       horizontal scrolling. */
    body.tour-mobile-premium .mobile-hole-buttons {
        gap: 8px !important;
        padding-inline: 10px !important;
        scroll-padding-inline: 10px !important;
    }

    /* #4 — ~5% smaller hole buttons on mobile (48 → 46). */
    body.tour-mobile-premium .mobile-hole-btn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    body.tour-mobile-premium .mobile-hole-btn-yds {
        font-size: 9.5px !important;
        margin-top: 2px !important;
    }

    body.tour-mobile-premium .mobile-hole-page-btn {
        width: 42px !important;
        min-width: 42px !important;
        height: 46px !important;
        font-size: 27px !important;
        line-height: 1 !important;
    }

    /* #6 — Narrow 3-line Change View pill on mobile/tablet (the <=560px block
       refines it further for phones). */
    body.tour-mobile-premium .view-mode-toggle {
        white-space: pre-line !important;
        padding: 4px 8px !important;
        min-height: 28px !important;
        font-size: 10px !important;
        line-height: 1.18 !important;
        letter-spacing: 0.02em !important;
        max-width: 58px !important;
        margin-left: 8px !important;
    }
}

/* Sub-390 px phones (Galaxy Fold, small Androids): bump matched override
   above so the 48 px touch target sticks instead of falling back to 28 px. */
@media screen and (max-width: 390px) {
    body.tour-mobile-premium .mobile-hole-btn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        font-size: 15px !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   "Change View to 2D" / "Change View to 3D" toggle — pill sitting to the RIGHT
   of the course name/location, vertically centred against the title text with a
   small gap. Defaults to "Change View to 2D" (i.e. current view is 3D). When
   active (2D) it turns gold and reads "Change View to 3D".
   ────────────────────────────────────────────────────────────────────── */
body.tour-mobile-premium .view-mode-toggle {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    height: auto !important;
    min-height: 30px !important;
    padding: 5px 12px !important;
    border-radius: 999px !important;
    background: rgba(0, 24, 15, 0.82) !important;
    border: 1px solid rgba(198, 154, 48, 0.28) !important;
    color: #ffffff !important;
    font-family: Inter, Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(10px, 1.05vw, 12px) !important;
    line-height: 1.1 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    text-align: center !important;
    white-space: pre-line !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease !important;
}

body.tour-mobile-premium .view-mode-toggle:hover {
    border-color: rgba(244, 200, 74, 0.5) !important;
}

body.tour-mobile-premium .view-mode-toggle.is-2d {
    border-color: rgba(244, 200, 74, 0.6) !important;
    color: #f4c84a !important;
    background: rgba(28, 22, 0, 0.82) !important;
}

/* Narrow / cellphone screens: let the toggle label wrap to a couple of short
   lines so it stays compact and leaves room for the (wrapping) course name. */
@media (max-width: 560px) {
    /* #6 — Three short stacked lines ("Change" / "View to" / "3D") so the pill is
       narrow, leaving more width for the course name. Nudged right of the title. */
    body.tour-mobile-premium .view-mode-toggle {
        white-space: pre-line !important;
        padding: 4px 7px !important;
        min-height: 26px !important;
        font-size: 9px !important;
        line-height: 1.18 !important;
        letter-spacing: 0.01em !important;
        max-width: 50px !important;
        margin-left: 8px !important;
    }
    body.tour-mobile-premium .course-top-bar {
        gap: 6px !important;
    }
}

body.hide-yt-controls .view-mode-toggle { display: none !important; }

/* ──────────────────────────────────────────────────────────────────────────
   #14 — Desktop-only "Measure any Distance" button (sits just above the manual
   controls; JS positions it via fixed left/bottom). Styled to match the other
   premium pills. Never shown on cellphone/mobile.
   ────────────────────────────────────────────────────────────────────────── */
body.tour-mobile-premium .tour-measure-btn {
    position: fixed !important;
    z-index: 59 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: rgba(0, 24, 15, 0.82) !important;
    border: 1px solid rgba(198, 154, 48, 0.28) !important;
    color: #ffffff !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    white-space: nowrap !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease !important;
}

body.tour-mobile-premium .tour-measure-btn:hover {
    border-color: rgba(244, 200, 74, 0.5) !important;
    background: rgba(0, 32, 20, 0.82) !important;
}

body.tour-mobile-premium .tour-measure-btn.is-active {
    border-color: rgba(244, 200, 74, 0.65) !important;
    color: #f4c84a !important;
    background: rgba(28, 22, 0, 0.82) !important;
}

body.tour-mobile-premium .tour-measure-btn .tour-measure-icon {
    flex: 0 0 auto !important;
}

/* Safety: never display the desktop measure tool on cellphone/mobile. */
@media screen and (max-width: 768px) {
    body.tour-mobile-premium .tour-measure-btn {
        display: none !important;
    }
}

/* =====================================================================
   Golfapedia 3D tour control refinements (cb20260530b)
   Items: 8 (desktop hole-selector responsive), 9/15 (Show/Hide button
   text + alignment), 10 (light-green selected hole), 16 (Change View pill).
   These rules are appended last so they win over the matching base rules
   above at equal specificity.
   ===================================================================== */

/* ── Items 9 & 15: Show/Hide controls button now has an icon + text label.
   Icon stays on the LEFT, text on the RIGHT. The button sizes to content. ── */
body.tour-mobile-premium #mobile-left-chrome-toggle {
    width: auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
}
body.tour-mobile-premium #mobile-left-chrome-toggle .chrome-toggle-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    line-height: 1 !important;
    color: inherit !important;
    white-space: nowrap !important;
}

/* Desktop: full wording "Show Controls" / "Hide Controls" in the bottom stack. */
@media (min-width: 769px) {
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-top-row #mobile-left-chrome-toggle {
        width: auto !important;
        height: 43px !important;
        padding: 0 15px !important;
        gap: 8px !important;
    }
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-top-row #mobile-left-chrome-toggle .chrome-toggle-label {
        font-size: 14px !important;
    }

    /* ── Item 8: keep the desktop hole selector from growing under the manual
       controls pad (fixed bottom-left). Cap its width and let the buttons
       scroll inside it (the ‹ › arrows appear automatically on overflow). ── */
    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-selector {
        max-width: min(calc(100vw - 360px), 960px) !important;
        overflow: hidden !important;
    }
    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-buttons {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
    }
    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-buttons::-webkit-scrollbar {
        display: none !important;
    }
}

/* Mobile: compact "Show" / "Hide" wording, tighter pill. */
@media (max-width: 768px) {
    body.tour-mobile-premium #mobile-left-chrome-toggle {
        height: 34px !important;
        padding: 0 9px !important;
        gap: 5px !important;
    }
    body.tour-mobile-premium #mobile-left-chrome-toggle .chrome-toggle-label {
        font-size: 11px !important;
    }

    /* Item 15: reserve room for Show/Hide + Play, but allow a wider stats pill.
       Tighter gaps/padding so Overview / Yards / Par show full text. */
    body.tour-mobile-premium .mobile-yardage-par-bar {
        max-width: calc(100vw - 178px) !important;
        gap: 4px !important;
        padding: 0 5px !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat {
        gap: 2px !important;
        flex-shrink: 0 !important;
        min-width: auto !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat-text {
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat-hole {
        max-width: none !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .stat-icon {
        width: 12px !important;
        height: 12px !important;
        flex: 0 0 12px !important;
    }

    body.tour-mobile-premium .mobile-yardage-par-bar .divider {
        height: 14px !important;
    }
}

/* ── Item 10: selected/current hole uses a light, on-theme green (replaces the
   previous gold highlight). Returns to the base style when not selected. ── */
body.tour-mobile-premium .mobile-hole-btn.active {
    border-color: #4cae67 !important;
    background: rgba(45, 154, 74, 0.30) !important;
    color: #e6f7ec !important;
    box-shadow: 0 0 0 1px rgba(76, 174, 103, 0.45) !important;
}
body.tour-mobile-premium .mobile-hole-btn.active .mobile-hole-btn-yds {
    color: rgba(230, 247, 236, 0.85) !important;
}

/* ── Item 16: "Change View to 3D / 2D" pill on phones — let the pill size to its
   text so the label never overflows the rounded background. ── */
@media (max-width: 768px) {
    body.tour-mobile-premium .view-mode-toggle {
        width: max-content !important;
        max-width: 42vw !important;
        padding: 4px 11px !important;
        font-size: 9.5px !important;
        line-height: 1.18 !important;
        text-align: center !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
}
@media (max-width: 560px) {
    body.tour-mobile-premium .view-mode-toggle {
        width: max-content !important;
        max-width: 44vw !important;
        padding: 4px 10px !important;
        font-size: 9px !important;
    }
}

/* Floating exit control when browser fullscreen is active (cb20260531d) */
#gp-tour-fs-exit {
    display: none;
    position: fixed;
    top: max(0.65rem, env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    z-index: 2147483000;
    min-width: 48px;
    min-height: 48px;
    padding: 0.55rem 0.85rem;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    background: linear-gradient(145deg, #1e6fd6 0%, #1558b0 100%);
    color: #fff;
    font-family: var(--tour-font-ui, Inter, Arial, sans-serif);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transform: rotate(90deg);
    transform-origin: center center;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    line-height: 1;
    touch-action: manipulation;
}
#gp-tour-fs-exit.is-visible {
    display: inline-flex;
}
#gp-tour-fs-exit:hover {
    background: linear-gradient(145deg, #2580ef 0%, #1a64c4 100%);
}
#gp-tour-fs-exit:active {
    transform: rotate(90deg) scale(0.96);
}
#gp-tour-fs-exit .gp-tour-fs-exit-icon {
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 400;
}

/* Taller AI chat on 3D tour mobile only */
@media (max-width: 600px) {
    body.gp-tour3d-page #aiModal .modal-content.ai-modal-modern {
        height: min(88dvh, calc(100dvh - 28px)) !important;
        max-height: min(88dvh, calc(100dvh - 28px)) !important;
    }
    body.gp-tour3d-page #aiModal .ai-chat-messages {
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   QA pass — no-JS / Cesium-failed fallback card (FIX 5).
   Shown via <noscript> for JS-disabled visitors, and made visible by JS
   (.tour-noscript-fallback.is-visible) when the 15s load timeout fires.
   Visual style matches the spinner overlay so the transition is seamless.
   ────────────────────────────────────────────────────────────────────────── */
.tour-noscript-fallback {
    position: fixed;
    inset: 0;
    z-index: 21000; /* above the spinner overlay (20000) so a timeout replaces it */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: linear-gradient(145deg, #0a1f14 0%, #143528 45%, #1a4030 100%);
    color: #f4f6f5;
    font-family: 'Inter', Arial, sans-serif;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}
.tour-noscript-card {
    width: min(92vw, 520px);
    margin: 1rem auto;
    padding: 28px 22px;
    text-align: center;
    background: rgba(8, 22, 16, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.tour-noscript-logo {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.45);
    object-fit: cover;
}
.tour-noscript-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}
.tour-noscript-location {
    margin: 0 0 12px;
    font-size: 1rem;
    color: rgba(240, 216, 160, 0.88);
}
.tour-noscript-location:empty { display: none; }
.tour-noscript-desc {
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.45;
    color: #e6ece8;
}
.tour-noscript-message {
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #cdd6d2;
}
.tour-noscript-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
}
.tour-noscript-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(244, 200, 74, 0.45);
    background: rgba(22, 58, 42, 0.7);
    color: #f4f6f5;
    font: 600 16px 'Inter', Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.tour-noscript-btn:hover,
.tour-noscript-btn:focus-visible {
    background: rgba(34, 92, 68, 0.85);
    border-color: #f4c84a;
    outline: none;
}
.tour-noscript-btn-primary {
    background: #f4c84a;
    color: #10261b;
    border-color: #f4c84a;
}
.tour-noscript-btn-primary:hover,
.tour-noscript-btn-primary:focus-visible {
    background: #f5d367;
    border-color: #f5d367;
}

/* JS-triggered "show" state for the 15s load-timeout fallback. <noscript> always
   shows when JS is disabled; this class lets Tour3D.js render the same card
   on JS-enabled clients when Cesium fails to start. */
.tour-noscript-fallback.is-visible { display: flex !important; }

/* ──────────────────────────────────────────────────────────────────────────
   QA pass — mobile touch-target & dropdown sizing (FIX 6).
   iOS Safari zooms into any <input>/<select> with a computed font-size < 16px
   on focus, which is jarring on the 3D tour page. Bumping the hole selector
   to 16px and giving it a 44px+ touch target satisfies WCAG 2.5.5 and stops
   the auto-zoom dead.
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    #yt-hole-select {
        min-height: 44px !important;
        font-size: 16px !important; /* prevent iOS Safari focus auto-zoom */
        padding: 8px 26px 8px 10px !important;
    }
    /* Hole-info dropdown stack already exists at 200px width; widen the field
       and keep options legible at 16px. */
    #yt-hole-select option { font-size: 16px !important; padding: 12px !important; }
    /* Primary action buttons inside the left tool rail meet AAA 44x44. */
    body.tour-mobile-premium #golf-tour-panel .golf-panel-sliding > #searchCoursesButton,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons .golf-panel-btn,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons #fullScreenButton,
    body.tour-mobile-premium #golf-tour-panel .golf-top-buttons .gp-feedback-trigger.gp-feedback-tour {
        min-height: 48px !important; /* was 44px; bump to AAA recommended for primary */
    }
    /* Play/pause inside the progress bar — bump from 32→40 to clear the AA 24px
       minimum with comfortable spacing for thumbs. */
    .yt-playpause-btn {
        width: 40px !important;
        height: 40px !important;
        flex: 0 0 40px !important;
    }
    .yt-playpause-btn svg { width: 15px !important; height: 15px !important; }
}

/* ──────────────────────────────────────────────────────────────────────────
   QA pass — iOS Safari Fullscreen API fallback (FIX 6).
   iOS Safari does NOT support requestFullscreen() on arbitrary elements
   (only <video>). Tour3D.js sets body.gp-tour-pseudo-fullscreen as a CSS
   substitute: cover the entire viewport so the Cesium canvas is unobstructed.
   ────────────────────────────────────────────────────────────────────────── */
body.gp-tour-pseudo-fullscreen,
body.gp-tour-pseudo-fullscreen html {
    overflow: hidden !important;
}
body.gp-tour-pseudo-fullscreen #cesium,
body.gp-tour-pseudo-fullscreen #cesiumContainer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 30000 !important;
}
body.gp-tour-pseudo-fullscreen .course-top-bar,
body.gp-tour-pseudo-fullscreen .tour-left-brand,
body.gp-tour-pseudo-fullscreen #tour-copyright-under-title {
    z-index: 30001 !important;
}
/* Visible "Exit Full Screen" affordance in pseudo-fullscreen — sits above the
   Cesium canvas in the top-right and is tappable at 44x44. */
.gp-pseudo-fs-exit {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    z-index: 30002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: rgba(8, 22, 16, 0.85);
    color: #f4c84a;
    font: 700 16px 'Inter', Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    -webkit-appearance: none;
    appearance: none;
}
.gp-pseudo-fs-exit:hover,
.gp-pseudo-fs-exit:focus-visible {
    background: rgba(22, 58, 42, 0.95);
    outline: none;
}
body.gp-tour-pseudo-fullscreen .gp-pseudo-fs-exit { display: flex; }

/* ==========================================================================
   DESKTOP-ONLY layout refinements (cb20260608desk) — maximise the satellite
   imagery by pushing chrome to the edges. Appended last so these win over the
   matching base/desktop rules above at equal specificity. Cellphone/tablet
   (<=768px) layout is intentionally untouched.
   ========================================================================== */
@media screen and (min-width: 769px) {

    /* ---- Top bar: sit flush against the very top of the page ---------------- */
    body.tour-mobile-premium .course-top-bar {
        top: 0 !important;
    }
    /* Square off the top corners + make the glass a bit SHORTER for the title. */
    body.tour-mobile-premium .course-header-glass {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        min-height: 0 !important;
        padding: 4px 16px 5px !important;
    }
    /* Tighten the gold rule's vertical margins so the box can be shorter. */
    body.tour-mobile-premium .course-header-rule {
        margin: 2px 0 3px !important;
    }

    /* ---- Location + meta on ONE small-font line (no word wrapping) ---------- */
    /* The wrapper becomes a centered inline row holding both the location and the
       "| PRIVATE | 18 HOLES" meta, sitting under the title + gold rule. */
    body.tour-mobile-premium .course-header-text > .course-subline {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: baseline !important;
        justify-content: center !important;
        column-gap: 0 !important;
        width: 100% !important;
        margin-top: 1px !important;
    }
    /* City / State / Country: small, single-line, ~15% smaller than before. */
    body.tour-mobile-premium .course-top-bar .course-location-text,
    body.tour-mobile-premium #course-location-p.course-location-text {
        display: inline-block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        font-size: 0.61rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.12em !important;
        text-transform: uppercase !important;
        white-space: nowrap !important;
    }
    /* Meta row sits immediately to the right of the location, no top margin. */
    body.tour-mobile-premium .course-top-bar #course-meta-row-p.course-tour-meta-row {
        width: auto !important;
        margin: 0 !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
    /* Meta text + separators ~15% smaller too, so the whole subline matches. */
    body.tour-mobile-premium .course-top-bar .course-club-type-text,
    body.tour-mobile-premium .course-top-bar .course-hole-count-text,
    body.tour-mobile-premium .course-top-bar .course-par3-text,
    body.tour-mobile-premium .course-top-bar .course-meta-sep {
        font-size: 0.58rem !important;
    }
    /* Extra "|" separator before the word PRIVATE (between location and meta). */
    body.tour-mobile-premium .course-top-bar #course-meta-row-p.course-tour-meta-row::before {
        content: "|";
        display: inline-block;
        margin: 0 0.4rem;
        color: var(--tour-gold);
        font-size: 0.61rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.3;
        opacity: 0.95;
    }

    /* ---- Bottom: anchor stack flush to bottom, centered horizontally --------- */
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-tour-stack {
        bottom: 0 !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
        align-items: center !important;
    }
    /* No extra margin above/below the selector — the small in-flow stack gap
       (3px, set in JS) is the only separation from the Play/stats row. */
    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-selector {
        margin: 0 !important;
    }

    /* ---- Change View 2D/3D: top-right anchored control (desktop + mobile) ---- */
    body.tour-mobile-premium .view-mode-toggle {
        position: fixed !important;
        top: calc(env(safe-area-inset-top)) !important;
        left: auto !important;
        right: calc(env(safe-area-inset-right)) !important;
        bottom: auto !important;
        align-self: auto !important;
        margin: 0 !important;
        z-index: 10002 !important;
        white-space: pre-line !important;
        max-width: none !important;
        min-height: 38px !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 14px !important;
        border-bottom-right-radius: 14px !important;
    }

    /* ---- Manual controls: anchor to the bottom-left of the imagery --------- */
    /* (JS positionDesktopManualControlsToHoleSelector pins the exact left/bottom;
       this is the matching fallback so there's no flash before JS runs.) */
    body.tour-mobile-premium .mobile-manual-controls {
        left: calc(18px + env(safe-area-inset-left)) !important;
        bottom: calc(14px + env(safe-area-inset-bottom)) !important;
    }
}

/* ==========================================================================
   UI polish pass (2026-06-10) — mobile title anchor, bottom hole selector,
   mobile bottom control row, desktop 2D toggle sizing.
   ========================================================================== */

@media screen and (max-width: 768px) {
    body.tour-mobile-premium .course-top-bar {
        top: calc(env(safe-area-inset-top)) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100vw - 88px) !important;
    }

    body.tour-mobile-premium .course-header-glass {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 16px !important;
        border-bottom-right-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        padding: 6px 14px 7px !important;
    }

    /* Cellphone: kill the oversized empty gap between the course name and the
       location/meta line. The gold divider element is enough on its own, so
       tighten its margins and drop the location's extra top margin + the
       padding it reserved for a (hidden) second gold rule. */
    body.tour-mobile-premium .course-header-rule {
        margin: 2px 0 2px !important;
    }
    body.tour-mobile-premium .course-top-bar .course-location-text,
    body.tour-mobile-premium #course-location-p.course-location-text {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.tour-mobile-premium .mobile-hole-selector {
        left: 0 !important;
        right: 0 !important;
        bottom: calc(env(safe-area-inset-bottom)) !important;
        border-radius: 0 !important;
        border-top-left-radius: 18px !important;
        border-top-right-radius: 18px !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    /* Change View 2D/3D pill: anchor to the TOP-RIGHT of the viewport on
       phones (it otherwise sits in static flow at the top-left of the
       .mobile-tour-ui overlay). Mirrors the desktop top-right treatment. */
    body.tour-mobile-premium .view-mode-toggle {
        position: fixed !important;
        top: calc(env(safe-area-inset-top)) !important;
        right: calc(env(safe-area-inset-right)) !important;
        left: auto !important;
        bottom: auto !important;
        align-self: auto !important;
        margin: 0 !important;
        z-index: 10002 !important;
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 14px !important;
        border-bottom-right-radius: 14px !important;
    }

    body.tour-mobile-premium .mobile-bottom-controls-row {
        position: fixed !important;
        left: calc(8px + env(safe-area-inset-left)) !important;
        right: calc(8px + env(safe-area-inset-right)) !important;
        /* Hole selector is 56px tall and flush with the bottom; keep a small 5px gap above it. */
        bottom: calc(56px + 5px + env(safe-area-inset-bottom)) !important;
        z-index: 62 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-evenly !important;
        gap: 8px !important;
        pointer-events: none !important;
    }

    body.tour-mobile-premium .mobile-bottom-controls-row > * {
        pointer-events: auto !important;
        position: static !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        top: auto !important;
        transform: none !important;
        flex: 0 1 auto !important;
        margin: 0 !important;
    }

    body.tour-mobile-premium .mobile-bottom-controls-row #mobile-left-chrome-toggle {
        width: auto !important;
        min-width: 0 !important;
        height: 34px !important;
    }

    body.tour-mobile-premium .mobile-bottom-controls-row .mobile-play-toggle {
        height: 34px !important;
        left: auto !important;
    }

    body.tour-mobile-premium .mobile-bottom-controls-row .mobile-yardage-par-bar {
        width: auto !important;
        max-width: min(52vw, 220px) !important;
        height: 34px !important;
        left: auto !important;
        right: auto !important;
    }

    /* When the bottom row is active, hide the old fixed positions. */
    body.tour-mobile-premium.tour-mobile-bottom-row .mobile-play-toggle,
    body.tour-mobile-premium.tour-mobile-bottom-row .mobile-yardage-par-bar,
    body.tour-mobile-premium.tour-mobile-bottom-row #mobile-left-chrome-toggle {
        position: static !important;
    }

    body.tour-mobile-premium.tour-mobile-bottom-row .mobile-play-toggle,
    body.tour-mobile-premium.tour-mobile-bottom-row .mobile-yardage-par-bar {
        bottom: auto !important;
    }
}

@media screen and (min-width: 769px) {
    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-tour-stack {
        left: 50% !important;
        right: auto !important;
        bottom: 0 !important;
        transform: translateX(-50%) !important;
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
        align-items: center !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-bottom-top-row {
        width: auto !important;
        max-width: 100% !important;
        justify-content: center !important;
        align-self: center !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .mobile-hole-selector {
        position: static !important;
        left: auto !important;
        right: auto !important;
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
        border-radius: 0 !important;
        border-top-left-radius: 18px !important;
        border-top-right-radius: 18px !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-hole-selector-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
        align-self: center !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-hole-selector-row .mobile-hole-selector {
        flex: 0 0 auto !important;
        width: max-content !important;
        max-width: min(calc(100vw - 28px), 960px) !important;
    }

    body.tour-mobile-premium.tour-desktop-bottom-stack .desktop-hole-selector-row .view-mode-toggle {
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        flex: 0 0 auto !important;
        min-height: 48px !important;
        min-width: 132px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        white-space: pre-line !important;
        border-radius: 14px !important;
    }

    body.tour-mobile-premium .view-mode-toggle {
        min-height: 44px !important;
        padding: 10px 18px !important;
        font-size: 13px !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Top-right share button (gp-shared-ui.js).
   ────────────────────────────────────────────────────────────────────────── */
#tour-share-button {
    position: fixed;
    top: calc(var(--tour-safe-top) + 10px);
    right: calc(var(--tour-safe-right) + 10px);
    z-index: 10003;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(0, 24, 15, 0.82);
    border: 1px solid rgba(198, 154, 48, 0.45);
    color: var(--tour-text);
    font-family: var(--tour-font-ui);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(var(--tour-glass-blur));
    -webkit-backdrop-filter: blur(var(--tour-glass-blur));
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
#tour-share-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: var(--tour-gold);
}
#tour-share-button:hover,
#tour-share-button:focus-visible {
    border-color: rgba(244, 200, 74, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.46);
    outline: none;
}
/* Embedded (iframe) views hide the share button — visitors should share the
   host page, and the licensing chrome stays minimal. */
html.gp-tour-in-iframe #tour-share-button { display: none !important; }

@media (max-width: 768px) {
    /* Cellphone: hide the Share button entirely — it crowds the compact phone
       chrome and the top-right corner is reserved for the Change View pill.
       Desktop/tablet keep the button (see rules above). */
    #tour-share-button {
        display: none !important;
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Research sidebar — server-rendered course summary + crawlable links.
   Second card below the interactive info card inside #sidebar; rendered by
   Tour3DHtmlEndpoint (see the TOUR3D_RESEARCH_SEO placeholder in Tour3D.html).
   ────────────────────────────────────────────────────────────────────────── */
#sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#sidebar .tour-research-seo {
    align-items: flex-start !important;
    text-align: left !important;
    padding: 1.1rem 1.5rem !important;
    max-height: 38vh;
    overflow-y: auto;
    font-size: 0.9rem;
}
.tour-research-seo-title {
    color: #1e3c72;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35em;
}
.tour-research-seo-subtitle {
    color: #1e3c72;
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0.8em 0 0.3em;
}
.tour-research-seo-facts {
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 0.5em;
}
.tour-research-seo-summary {
    color: #3d4756;
    line-height: 1.45;
    margin: 0 0 0.6em;
}
.tour-research-seo ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tour-research-seo li {
    margin: 0.2em 0;
}
.tour-research-seo a {
    color: #0f3d74;
    font-weight: 600;
    text-decoration: underline;
}
.tour-research-seo-directory {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1.25em;
    margin: 0.8em 0 0;
}
