/* ==========================================================================
   GLOBAL LAYOUT CONFIGURATION
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    background-color: #121212;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

/* ==========================================================================
   MAIN MAP CANVAS LAYERING
   ========================================================================== */
#map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   INDEPENDENT PANEL STEP COMPONENT (Default Side-Docked Mode)
   ========================================================================== */
#story-sidebar {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 320px;
    max-width: 90%;
    background: rgba(18, 18, 18, 0.92);
    color: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border: none !important; /* Forces all borders off completely */
    z-index: 9999 !important;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none; /* Lets drags/swipes reach the map underneath */
}

#step-title {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 42px; /* Large font specification */
    font-weight: 700;
    line-height: 1.2;
}

.highlight {
    color: #9ae2ef; /* Highlighted text color */
}

#step-deck {
    margin: 0 0 18px 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
}

#step-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #cccccc;
    font-weight: 300;
}

/* DYNAMIC POSITION SHIFT: Applied via JS when Step 1 triggers centered focus */
#story-sidebar.centered-mode {
    top: 50%;
    left: 50%;
    width: 500px;
    padding: 40px;
    transform: translate(-50%, -50%);
}

#story-sidebar.faded-out {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================================================
   FLOATING OVERVIEW INSET MINI-MAP COMPONENT
   ========================================================================== */
#inset-map-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.6); /* Thin white frame layout boundary border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    overflow: hidden;
    z-index: 9999 !important;
}

#inset-map {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   RESPONSIVE RESPOND BREAKPOINTS (Mobile Optimization Overrides)
   ========================================================================== */
@media (max-width: 767px) {
    #story-sidebar {
        top: 10px;
        left: 10px;
        width: calc(100% - 160px);
        box-sizing: border-box;
        padding: 20px;
    }
    
    #story-sidebar.centered-mode {
        width: calc(100% - 32px);
        padding: 24px;
    }
    
    #step-title {
        font-size: 32px; /* Automatically scales typography text sizes on smaller devices */
    }
    
    #inset-map-container {
        bottom: auto;
        top: 10px;
        right: 10px;
        width: 110px;
        height: 110px;
    }
}
