*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #101010;
    color: #111;
}

#top-menu {
    display: none;
}

#content {
    display: flex;
    flex: 1;
}

#map-container {
    flex: 1;
    position: relative;
}

#map {
    height: 100%;
    background: #000;
    position: relative;
    z-index: 0;
}

#briefing {
    width: 360px;
    background-color: #f7f7ec;
    background-image: linear-gradient(180deg, #eef2e8 0%, #f7f7ec 100%), linear-gradient(rgba(255,255,255,0.18) 1px, transparent 1px);
    background-size: auto, 100% 24px;
    background-repeat: no-repeat, repeat;
    color: #111;
    padding: 20px 30px;
    overflow: hidden;
    box-shadow: -5px 0 18px rgba(0, 0, 0, 0.35);
    border-left: 6px solid #444;
    border-right: 1px dashed #ccc;
    font-size: 13px;
    line-height: 1.55;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    z-index: 1;
}

.briefing-body {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.briefing-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #bbb;
    background: rgba(247, 247, 236, 0.95);
    text-align: right;
    margin-bottom: 12px;
}

.briefing-footer a {
    color: #222;
    text-decoration: none;
    letter-spacing: 0.12em;
}

.briefing-footer a:hover {
    text-decoration: underline;
}

#briefing::before,
#briefing::after {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    width: 16px;
    background-image:
        radial-gradient(circle 4px at center, #666 4px, transparent 4px),
        linear-gradient(90deg, transparent 8px, #ccc 8px, transparent 9px);
    background-size: 100% 48px, 100% 100%;
    background-repeat: repeat-y, no-repeat;
    background-position: center 0, center 0;
    pointer-events: none;
    z-index: 2;
}

#briefing::before {
    left: 8px;
}

#briefing::after {
    right: 8px;
}

#briefing h2 {
    margin: 0 0 12px;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #222;
}

#briefing h3 {
    margin: 10px 0 6px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #222;
}

#briefing p,
#briefing li,
#briefing td {
    font-family: inherit;
    font-size: 12px;
    color: #222;
}

#briefing table {
    width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
}

#briefing table tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.95);
}

#briefing table tr:nth-child(even) {
    background: rgba(215, 243, 214, 0.9);
}

#briefing table td {
    border: 1px dotted #999;
    padding: 4px 6px;
    text-align: center;
}

#briefing ul {
    margin: 6px 0;
    padding-left: 18px;
}

#briefing li {
    margin: 3px 0;
}

#close-briefing {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #222;
    display: none;
    z-index: 11;
}

#controls {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f3f3e8;
    padding: 12px;
    border: 1px solid #888;
    border-radius: 4px;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.28);
    z-index: 1000;
}

#controls label {
    display: block;
    margin: 6px 0;
    color: #111;
}

#controls select,
#controls input[type="checkbox"] {
    font-family: inherit;
    font-size: 12px;
}

button {
    margin: 5px 0;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    background: #e8e2d5;
    border: 1px solid #666;
    border-radius: 3px;
    color: #111;
}

button:hover {
    background: #ded7c3;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    #top-menu {
        display: flex;
        justify-content: center;
        background: #f3f3e8;
        padding: 10px;
        border-bottom: 1px solid #888;
        z-index: 1000;
    }

    #top-menu button {
        margin: 0 10px;
        font-size: 14px;
    }

    #content {
        flex-direction: column;
        flex: 1;
    }

    #map-container {
        flex: 1;
        position: relative;
    }

    #map {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    #briefing {
        display: none;
        width: 100%;
        height: 100%;
        flex: 1;
    }

    #briefing.active {
        display: flex;
    }

    #map-container.hidden {
        display: none;
    }

    #close-briefing {
        display: block;
    }
}