: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;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    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: system-ui, -apple-system, sans-serif;
    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; }        
}