:root {
    --bg: #05070a;
    --card: #111827;
    --accent: #00ffcc; /* The Prism Glow */
    --text-main: #f3f4f6;
    --text-dim: #9ca3af;
    --danger: #ef4444;
    
    /* Stateful Marker Configurations */
    --marker-blue: #007AFF;
    --marker-orange: #ff9500;
    --marker-grey: #9ca3af;

    /* Corporate Identity Framework Token Overlays */
    --slate: #2c3e50;
    --tribal: #d35400;
    --bg-neutral: #f9f6f2;
    --text-dark: #333333;
    
    /* System Accents Mapping overrides */
    --accent-wood: #8B5A2B;
    --accent-steel: #495057;
    --accent-blue: #0076a3;
    --accent-green: #1e7e34;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

/* --- The Glowing Header --- */
.prism-header {
    border-bottom: 1px solid rgba(0, 255, 204, 0.2);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo-glow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    font-weight: 800;
}

/* --- Audio Player UI & Control Blocks --- */
.audio-card {
    background: var(--card);
    margin: 20px;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #1f2937;
    text-align: center;
}

.play-trigger {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.1);
}

.play-trigger:active {
    transform: scale(0.9);
    background: var(--accent);
    color: var(--bg);
}

/* Dynamic CSS Glow Effect for Active Track Playback */
.audio-active-glowing {
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6) !important;
    background: rgba(0, 255, 204, 0.05);
    border-color: var(--accent) !important;
}

/* Teacher Multi-Batch Manual Replay Interface Button */
.replay-trigger {
    background: #1f2937 !important;
    color: var(--text-main) !important;
    border: 1px solid #374151 !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.replay-trigger:active {
    transform: scale(0.95);
    background: #374151 !important;
    border-color: #4b5563 !important;
}

/* --- Map Viewport & Container --- */
#map-container { 
    position: relative; 
    width: 100%; 
    overflow: hidden; 
    margin-top: 10px; 
    border-radius: 15px;
    background: #0f172a;
    border: 1px solid #1f2937;
}

#map-img { 
    width: 100%; 
    height: auto; 
    display: block; 
}

/* --- Stateful Map Marker Coordinates Mesh Matrix --- */
.map-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 90;
}

/* ACTIVE CURRENT LOCATION STATE (The Viewer) */
.map-marker.active {
    background: var(--marker-blue) !important;
    width: 20px;
    height: 20px;
    border-color: #ffffff;
    box-shadow: 0 0 15px var(--marker-blue), 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

/* Active Viewer Double Ripple Ring Animations */
.map-marker.active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--marker-blue);
    border-radius: 50%;
    animation: markerPulse 2.2s infinite ease-out;
    opacity: 0;
    box-sizing: content-box;
}

/* UNVISITED STANDBY TARGET STATE (Houses to Visit) */
.map-marker.unvisited {
    background: var(--marker-orange) !important;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.4);
}

/* VISITED COMPLETED STATE (Historical Trace Trail) */
.map-marker.visited {
    background: var(--marker-grey) !important;
    border-color: #d1d5db;
    box-shadow: none;
    opacity: 0.45;
}

.active-zone {
    fill: rgba(0, 255, 204, 0.3) !important;
    stroke: #00ffcc !important;
    stroke-width: 2px;
}

/* --- Multi-Lingual Onboarding Modal --- */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(5, 7, 10, 0.9);
    z-index: 9999;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.modal-content {
    background: #ffffff; 
    width: 88%; 
    max-width: 380px; 
    padding: 25px;
    border-radius: 16px; 
    text-align: center; 
    font-family: var(--font-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    color: #111827 !important;
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
}

.modal-content p {
    color: #4b5563 !important;
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-primary {
    background: #007AFF; 
    color: white; 
    border: none; 
    padding: 14px 20px;
    border-radius: 10px; 
    width: 100%; 
    font-size: 16px; 
    font-weight: 600; 
    margin-top: 15px; 
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.btn-secondary {
    background: #28a745; 
    color: white; 
    border: none; 
    padding: 12px 20px;
    border-radius: 10px; 
    width: 100%; 
    font-size: 16px; 
    font-weight: 600; 
    margin-top: 15px; 
    cursor: pointer;
}

.divider {
    margin: 22px 0; 
    border-bottom: 1px solid #e5e7eb; 
    text-align: center; 
    height: 1px;
}

.divider span { 
    background: #ffffff; 
    padding: 0 12px; 
    color: #6b7280; 
    font-size: 11px; 
    font-weight: 600; 
    letter-spacing: 1px;
    position: relative; 
    top: -10px; 
}

.select-dropdown {
    width: 100%; 
    padding: 12px; 
    border-radius: 8px; 
    font-size: 16px; 
    border: 1px solid #cbd5e1; 
    background-color: #f8fafc;
    color: #111827;
}

/* --- Corporate Identity Blueprint Layouts --- */
body.blueprint-body {
    background-color: var(--bg-neutral);
    color: var(--text-dark);
}

.hero { 
    background: var(--slate); 
    color: white; 
    padding: 50px 20px; 
    text-align: center; 
}

.hero h1 {
    margin: 10px 0 5px 0;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    font-weight: 800;
    color: white;
}

.hero p {
    margin: 0;
    color: #bdc3c7;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blueprint-container { 
    padding: 20px; 
    max-width: 800px; 
    margin: -40px auto 40px; 
}

.form-card { 
    background: white; 
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); 
}

.form-card h2 {
    color: var(--slate);
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    margin-top: 30px;
    font-size: 1.5rem;
    font-weight: 800;
}

.form-card h3 {
    color: var(--tribal);
    margin-top: 25px;
    font-size: 1.2rem;
    font-weight: 700;
}

.form-card p {
    color: var(--text-dark);
    font-size: 15px;
    margin-bottom: 15px;
}

.form-card ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.form-card li {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
}

.form-card strong {
    color: var(--slate);
}

.form-card code {
    background: #f4f6f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--tribal);
    font-size: 13px;
}

.pipeline-diagram {
    background: #fdfaf6;
    border: 1px dashed var(--tribal);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-family: monospace;
    font-size: 13px;
    color: var(--slate);
    margin: 25px 0;
    line-height: 1.8;
    overflow-x: auto;
    white-space: nowrap;
}

.privacy-mapping {
    background: #f4f6f7;
    padding: 15px 20px;
    border-left: 4px solid var(--slate);
    border-radius: 4px;
    font-family: monospace;
    margin: 15px 0;
    font-size: 14px;
    color: var(--text-dark);
}

.footer-branding {
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- Hardware Accelerated Keyframe Layers --- */
@keyframes markerPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* --- Responsive Media Mesh Targets --- */
@media(max-width: 768px) {        
    .hero h1 { font-size: 1.8rem; }        
    .form-card { padding: 25px; }        
    .pipeline-diagram { font-size: 11px; }    
}

/* UNIFIED ACCORDION ECOSYSTEM FLOATING INTERFACE */
.navigation-matrix-anchor {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 99999;
    font-family: var(--font-main);
}

.hamburger-toggle-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--accent-wood);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hamburger-toggle-trigger:hover {
    background-color: #724922;
    transform: scale(1.05);
}

.hamburger-toggle-trigger svg {
    transition: transform 0.3s ease;
}

.vertical-action-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* Accordion Panel Buttons Setup */
.floating-accessibility-btn {
    color: #ffffff !important;
    text-decoration: none;
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    transition: background-color 0.2s ease;
    cursor: pointer;
    width: auto;
}

/* Internal Link Drawer Setup */
.accordion-menu-drawer {
    display: none;
    background: #131c2e;
    border: 1px solid #334155;
    border-radius: 8px;
    width: 280px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    margin-bottom: 2px;
    overflow: hidden;
    animation: slideUp 0.2s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.accordion-menu-drawer a {
    color: #f8fafc !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    border-bottom: 1px solid #1e293b;
    transition: all 0.15s;
    text-align: left;
}

.accordion-menu-drawer a:last-child {
    border-bottom: none;
}

.accordion-menu-drawer a:hover {
    background-color: #1e293b;
    color: #00ffcc !important;
}

/* Universal Floating Navigation Architecture */
.universal-back-home-anchor {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #1e293b;
    color: #f8fafc !important;
    border: 1px solid #334155;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 99999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.floating-related-deck-container {
    position: fixed;
    z-index: 99999;
    font-family: sans-serif;
}

/* DESKTOP & LAPTOP SCREEN SPECIFIC CONFIGURATIONS */
@media (min-width: 769px) {
    .floating-related-deck-container {
        right: 0;
        top: 35%;
        transform: translateY(-50%);
    }
    .related-deck-trigger-btn {
        background: #131c2e;
        color: #00ffcc;
        padding: 12px 8px;
        font-size: 11px;
        font-weight: bold;
        border: 1px solid #334155;
        border-right: none;
        border-radius: 8px 0 0 8px;
        cursor: pointer;
        writing-mode: vertical-rl;
        text-transform: uppercase;
        letter-spacing: 1px;
        box-shadow: -4px 4px 12px rgba(0,0,0,0.3);
    }
    .related-deck-content {
        display: none;
        position: absolute;
        right: 0;
        top: 0;
        background: #131c2e;
        min-width: 240px;
        border: 1px solid #334155;
        border-radius: 8px 0 0 8px;
        box-shadow: -8px 8px 24px rgba(0,0,0,0.5);
    }
    .floating-related-deck-container:hover .related-deck-content {
        display: block;
    }
    .floating-related-deck-container:hover .related-deck-trigger-btn {
        display: none;
    }
}

/* SMARTPHONE & MOBILE DEVICE SPECIFIC CONFIGURATIONS */
@media (max-width: 768px) {
    .accordion-menu-drawer { 
        width: 250px; 
    }
    .floating-accessibility-btn { 
        padding: 12px 18px; 
        font-size: 0.75rem; 
    }
    .floating-related-deck-container {
        left: 0;
        bottom: 0;
        width: 100%;
        background: #131c2e;
        border-top: 2px solid #334155;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
        padding: 10px;
    }
    .related-deck-trigger-btn {
        display: none !important;
    }
    .related-deck-content {
        display: block !important;
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        width: 100%;
    }
    .related-deck-links-wrapper {
        display: flex !important;
        gap: 10px;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 5px;
    }
    .related-deck-links-wrapper a {
        flex: 1;
        white-space: nowrap;
        text-align: center;
        background: #1e293b;
        border-radius: 6px !important;
        border: 1px solid #334155 !important;
    }
}

@media (max-width: 680px) {
    .navigation-matrix-anchor {
        position: static;
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 40px;
        padding: 10px 0;
    }
    .hamburger-toggle-trigger {
        display: none !important;
    }
    .vertical-action-stack {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    .floating-accessibility-btn {
        width: 100%;
        border-radius: 8px;
        justify-content: center;
        padding: 14px;
    }
    .accordion-menu-drawer {
        width: 100%;
        border-radius: 8px;
    }
}

/* Inner Layout Elements */
.related-deck-content .deck-header {
    background: #1e293b;
    color: #94a3b8;
    font-size: 10px;
    font-weight: bold;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.related-deck-content a {
    color: #f8fafc;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    border-bottom: 1px solid #1e293b;
    transition: all 0.2s;
}
.related-deck-content a:hover {
    background-color: #1e293b;
    color: #00ffcc;
}