.sd-story-map,
.sd-story-map * {
    box-sizing: border-box;
}

.sd-story-map {
    width: 100%;
    max-width: 1180px;
    margin: 32px auto;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.sd-story-map [hidden] {
    display: none !important;
}

.sd-map-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: #111318;
    color: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.sd-map-header {
    padding: 28px 30px 16px;
}

.sd-map-eyebrow {
    margin: 0 0 8px;
    color: #aeb6c5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sd-map-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(27px, 5vw, 42px);
    line-height: 1.1;
}

.sd-map-description {
    margin: 12px 0 0;
    color: #b9c0cc;
}

.sd-map-status {
    min-height: 28px;
    padding: 0 30px 18px;
    color: #aeb6c5;
    font-size: 14px;
}

.sd-map-status[data-type="error"] {
    color: #ffaaaa;
}

.sd-map-status[data-type="warning"] {
    color: #ffd382;
}

.sd-map-lock {
    margin: 0 30px 30px;
    padding: 42px 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at top,
            rgba(93, 109, 150, 0.32),
            rgba(255, 255, 255, 0.05) 65%
        );
    text-align: center;
}

.sd-map-lock-icon {
    margin-bottom: 14px;
    font-size: 42px;
}

.sd-map-lock h2 {
    margin: 0 0 12px;
    color: #ffffff;
}

.sd-map-lock p {
    color: #c7cdd7;
}

.sd-map-balance {
    font-weight: 700;
}

.sd-map-unlock-button,
.sd-map-login-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 12px 22px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    color: #111318;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.sd-map-unlock-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.sd-map-graph {
    padding: 0 0 26px;
}

.sd-map-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 24px 30px;
}

.sd-map-canvas {
    position: relative;
    min-height: 420px;
    padding: 38px;
}

.sd-map-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: visible;
    pointer-events: none;
}

.sd-map-levels {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    gap: 80px;
    min-height: 340px;
}

.sd-map-level {
    width: 190px;
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 28px;
}

.sd-map-node {
    position: relative;
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 16px;
    background: #1b1f28;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.sd-map-node--start {
    border-width: 2px;
}

.sd-map-node--ending {
    background: #24202b;
}

.sd-map-node-badges {
    min-height: 23px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

.sd-map-node-badge {
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #dce1e9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sd-map-node-title {
    margin: 0;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.25;
}

.sd-map-node-identifier {
    margin: 8px 0 0;
    color: #9fa8b7;
    font-size: 12px;
}

.sd-map-node-ending {
    margin: 10px 0 0;
    color: #e8c8ff;
    font-size: 13px;
    font-weight: 700;
}

.sd-map-edge-line {
    fill: none;
    stroke: rgba(211, 217, 229, 0.5);
    stroke-width: 2;
}

.sd-map-edge-label text {
    fill: #c8ced8;
    font-size: 11px;
    font-weight: 700;
}

.sd-map-legend {
    padding: 0 30px;
    color: #aeb6c5;
    font-size: 13px;
}

.sd-map-error {
    margin: 0 30px 28px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 90, 90, 0.3);
    border-radius: 12px;
    background: rgba(255, 60, 60, 0.1);
    color: #ffb2b2;
}

.sd-map-message {
    padding: 16px;
    border: 1px solid #dddddd;
    border-radius: 8px;
}

@media (max-width: 700px) {
    .sd-story-map {
        margin: 0 auto;
    }

    .sd-map-card {
        border-radius: 0;
    }

    .sd-map-header,
    .sd-map-status {
        padding-left: 18px;
        padding-right: 18px;
    }

    .sd-map-lock {
        margin-left: 18px;
        margin-right: 18px;
    }

    .sd-map-viewport {
        padding-left: 12px;
        padding-right: 12px;
    }
}