* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Roboto Mono, Monospace;
    background:
    linear-gradient(-90deg, #CFD5FF, 1px, transparent 1px),
    linear-gradient(#CFD5FF, 1px, transparent 1px),
    #f2f2f2;
    background-size:
    8px 8px,
    8px 8px,
    80px 80px,
    80px 80px,
    80px 80px,
    80px 80px,
    80px 80px,
    80px 80px;
    background-color: #eaeaea;
}
body.map-background {
    background-size: cover;
    background-position: center;
}

.screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.center-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}
.center-content > * {
    pointer-events: auto;
}

.scene-svg-wrap {
    position: relative;
    width: min(120vmin, 800px);
    max-width: 180vw;
}
.scene-svg-wrap svg {
    width: 100%;
    height: auto;
    display: block;
}
#audioPath {
    stroke: #0000FF !important;
    stroke-width: 2;
    fill: none !important;
}
#audioPathPassed {
    stroke: purple;
    stroke-width: 2;
    fill: none;
    pointer-events: none;
}
.scene-svg-wrap .dot {
    transition: none;
    fill: #1a1a1a;
}

.controls {
    position: absolute;
    transform: translate(-50%, -150%);
}
.play-button{
    cursor: pointer;
    font-size: clamp(0.5rem, 1.4vw, 0.7rem);
    font-family: Roboto Mono, Monospace;
    text-transform: uppercase;
    color: #717171;
    background: none;
    border: none;
    margin: 2px 20px;
    opacity: 0.9;
    transition: opacity 0.2s;
    text-decoration: underline;
}

.pause-button {
    cursor: pointer;
    font-size: clamp(0.5rem, 1.4vw, 0.7rem);
    font-family: Roboto Mono, Monospace;
    text-transform: uppercase;
    color: #717171;
    background: none;
    border: none;
    padding: 2px 0;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.play-button:hover, .pause-button:hover {
    opacity: 1;
}

.captions {
    width: min(85vw, 520px);    
    font-family: 'Silkscreen', monospace; 
    font-size: clamp(1.5rem, 3vmin, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.2; 
    color: #FFFFFF;
    -webkit-text-stroke: 8px #0000FF;
    paint-order: stroke fill;
    text-align: center;
    position: absolute;
}
.captions.empty {
    color: #888;
    font-style: italic;
}

.nav-ring {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}
.nav-ring .nav-link {
    pointer-events: auto;
}
.nav-link {
    position: absolute;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(140px, 28vw);
    transition: transform 0.8s ease;
    z-index: 10;
    text-decoration: none;
    color: #717171;
    transform: translate(-50%, -50%);
}
.nav-link.is-animating {
    transition: none;
}
.nav-link:hover {
    transform: translate(-50%, -50%) rotate(var(--link-rotate, 0deg)) scale(1.08);
}
.nav-link .arrow-icon {
    width: clamp(18px, 4vmin, 24px);
    height: clamp(18px, 4vmin, 24px);
    margin-bottom: 2px;
    flex-shrink: 0;
}
.nav-link .arrow-icon svg {
    width: 100%;
    height: 100%;
    fill: #717171;
}
.nav-link:hover .arrow-icon svg {
    fill: #515050;
}
.nav-link .link-label {
    font-size: clamp(0.55rem, 1.5vmin, 0.7rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.25;
}

.nav-link .link-distance {
    font-size: clamp(0.55rem, 1.5vmin, 0.7rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.25;
    opacity: 0.5;
}


.credit {
    position: fixed;
    bottom: clamp(12px, 2vmin, 20px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.6rem, 1.2vmin, 0.65rem);
    color: #717171;
    letter-spacing: -0.02em;
    z-index: 5;
    text-align: center;
    width: 100%;
}

.credit i {
    color: #2d2d2d;
}

.center-content.changing .scene-svg-wrap {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}
.center-content.changing .captions {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}