html, body {
    margin:0;
    padding:0;
    overflow:hidden;
    background-color:#000;
    font-family: 'Roboto', sans-serif;
	font-size: 1em;
	/* Safe area for mobile */
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}
a{
    color:currentColor;
}
#app{
    width:100vw;
    height:100vh;
    position:absolute;
}
.rrlogo {
    text-align: center;
}
.menu{
    color:#ddd;
    background-color: #e60012;
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:300px;
    box-shadow: 5px 0px 5px 0px rgba(0,0,0,.6);
    height:100vh;
    transition: transform .2s;
    transform: translateX(calc(-100% - 10px));
    z-index:1;
    cursor: pointer;
}
.switch{
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    bottom: 5px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  /* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #a41515;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 24px;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
  }
  
  input:checked + .slider {
    background-color: #1450a0;
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px #1450a0;
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(22px);
    -ms-transform: translateX(22px);
    transform: translateX(22px);
  }
  

.menu:hover{
    transform: translateX(-100%);
}
.menu:after{
    content: '';
    position:absolute;
    right:0px;
    width:5px;
    top:0;
    bottom:0;
    height:100%;
    background-color: #a41515;
    
}
.menu.active{
    transform:translateX(0%);
    cursor: default;
}
.menu.active:hover{
    transform:translateX(0%)!important;
}
.menu .menu__button {
    cursor:pointer;
    color:#fff;
    font-size:18px;
    position:absolute;
    right:-30px;
    width:30px;
    height:150px;
    background-color: #a41515;
    top:0;
    bottom:0;
    display:block;
    margin:auto;
    border-top-right-radius: 8px ;
    border-bottom-right-radius: 8px ;
    box-shadow: 5px 0px 5px 0px rgba(0,0,0,.6);
    line-height:150px;
    text-align: center;
    transition: width .2s, right .2s;
}
.menu .menu__button:before {
    content: '\2630';
}
.menu.active .menu__button:before {
    content: '\2715';
}
.menu.active .menu__button {
    width:20px;
    right: -20px;
    text-align: left;
}

.menu__inner{
    padding:10px;
    padding-right:20px;
	padding-bottom: calc(20px + env(safe-area-inset-bottom)); /* extra bottom padding + safe area */
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    max-height: calc(100vh - 30px);
}
.menu__logo{
    text-align: center;
    margin-top:20px;
    padding-bottom:12px; /* extra spacing under logo */
}
.rrlogo {
      text-align: center;
}
.menu__actions{
    display:flex;
    margin-top:10px;
}

.rrlogo figure img {
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    -webkit-transition: .3s ease-in-out;
    transition: .3s ease-in-out;
}
.rrlogo figure:hover img {
    -webkit-filter: grayscale(0);
    filter: grayscale(0);
}

.menu__actions{
    display:flex;
    margin-top:10px;
}
.menu__tab{
    cursor: pointer;
    background-color: #1e1111;
    color:#aaa;
    display:block;
    width: 200px;
    height: 40px;
    border-top-left-radius: 1em;
    border-top-right-radius: 1em;
    border-bottom-left-radius: 0em;
    border-bottom-right-radius: 0em;
    border: 0px
}
.menu__tab.active{
    background: repeating-linear-gradient(
    45deg, 
    #333333 0px,        
    #333333 5px, 
    #3d3d3d 5px,
    #3d3d3d 10px
    );
    color:#ddd;
    font-weight:bold;
}

.menu__tab:hover{
    background-color:#888;
    color:#ddd;
}

.menu__content{
    background-color:#222;
    overflow-y:auto;
    max-height: 60vh;
}
.menu__content > * {
    display:none;
}
.menu__content > .active {
    display:block;
}

/* Themed scrollbars for menu panels */
.menu__content, .menu__content > * {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}

/* WebKit-based browsers */
.menu__content::-webkit-scrollbar, .menu__content > *::-webkit-scrollbar {
    width: 10px;
}
.menu__content::-webkit-scrollbar-track, .menu__content > *::-webkit-scrollbar-track {
    background: transparent;
}
.menu__content::-webkit-scrollbar-thumb, .menu__content > *::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.menu__content::-webkit-scrollbar-thumb:hover, .menu__content > *::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.14);
}

/* Slightly more prominent when menu is active */
.menu.active .menu__content > *::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
}
.menu.active .menu__content > *::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

.bgmPlayer{
    width: 100%;
}
#areaList, #settings, #about {
    padding:5px;
    margin:0;
    list-style: none;;
}
#areas, #layers {
    list-style: none;
    margin:0;
    padding:0;
}

#about {
    font-size: 1em;
    line-height: 1.5em;
}
.area {
    padding:5px;
    
    background-color: rgb(130 94 108);
    border-bottom:2px solid #333;
    border-radius: 5px;
    
    transition: background-color .2s;
    margin:4px;
    box-sizing: border-box;
    font-size: .9em;
    color:#fff;
    
}
.area:hover {
    background-color: #888!important;
}
.area__header{
    cursor:pointer;
    display:flex;
    align-items: center;
    position: relative;
}
.material-icons{
    margin-right:5px;
}
.custom-icons{
    margin-right:10px;
    width: 24px;
    height: auto;
}
.area__info {
    overflow:hidden;
    max-height:0;
    transition:max-height .2s;
}
.area__info__inner {
    display:flex;
    background-color: rgba(0,0,0,.2);
    border-radius: 50px;
    align-items: center;
    margin:5px 0;
}
.area.active .area__info {
    max-height:80px;
}
.area__info__img {
    width:50px;
    position: relative;
    border-radius: 50px;
    overflow:hidden;
    border:2px solid #ddd;
    margin:5px;
}
.area__info__img:hover {
    border-color:#fff;
}
.area__info__name {
    padding-left:10px;
}
.area__info__name a {
    color: #fff;
    text-decoration: none;
    display:block;
}
.area__info__name a:nth-child(2) {
    font-size:.6em;
    margin-top:.3em
}
.area__info__name a:nth-child(2):hover {
    color:#aaa;
}
.area__info__name a:hover {
    color: #fff;
}
.area__info__img img {
    width:50px;
    display:block;
}
.settings__checkbox{
    margin: 2px;
}
#error{
    color:red;
    font-size:20px;
    position:absolute;
    width:100%;
    text-align: center;
    top:50%;
    transform:translateY(-50%);
    display:none;
}
#error.active{
    display:block!important;
}
#error a{
    color:white;
    font-size:18px;
}
#loading {
    /* display:none; */
    opacity: 0;
    pointer-events: none;
    user-select: none;
    transition: opacity 1s;
    position:fixed;
    z-index:10;
    background-color: #000;
    width:100vw;
    height:100vh;
    overflow:hidden;
    top:0;
    left:0;
    color:#ddd;
}
#loading.active {
    pointer-events: auto;
    opacity:1;
    
}
#loading > div{
    position:absolute;
    width:300px;
    left:0;
    right:0;
    margin:auto;
    top:50%;
    transform: translateY(-50%);
    text-align: center;
}
#loading > div img{
    display:block;
    margin:auto;
    margin-bottom:10px;
}
.content {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
.loading-bar{
    width:100%;
    border:2px solid #ddd;
    border-radius: 5px;
    height:30px;
    position: relative;
    padding:5px;
    box-sizing: border-box;
}
.loading-bar__inner{
    width: 0;
    background-color:rgb(0, 195, 255);
    height:100%;
    transition:width .2s;
}

.tour{
    text-align: center;
}
.tour button{
    color:#fff;
    border:0;
    display:block;
    margin:auto;
    padding:8px 20px;
    font-size:1.2em;
    border-radius: 5px;
    border-bottom:4px solid #222;
    background-color: rgb(32, 111, 214);
    cursor:pointer;
    transition: background-color .2s;
}
.tour button:hover{
    background-color: #222!important;
}
.tour button.active{
    background-color: rgb(218, 88, 55)
}
.tour button span{
    vertical-align: middle;
}
.reverse-range{
    direction: rtl;
}
.artist_mobile {
    display: none;
}
.artist_mobile {
    display: flex;
    position: fixed;
    right: 0;
    bottom: 0;
    width: auto;
    height: 64px;
    margin: 2%;
    background-color: rgba(0, 0, 0, .6);
}

.artist_mobile .area__info__name {
    padding-left: 20px;
    padding-right: 20px;
}

/* Copy button in area header */
.area__header{ position: relative; }
.area__copy{
    position: absolute;
    right: 6px;
    top: 40%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.area__copy .material-icons{ font-size: 16px; line-height: 1; }
.area__copy:hover{ background: rgba(255,255,255,0.06); }

/* Show copy button only when the area is active */
.area.active .area__header .area__copy{ display: inline-flex; }

/* Copy toast */
.copy-toast{
    transform: translate(-150%, -100%);
    background: #5bd663;
    color: #00320b;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: opacity .3s ease, transform .3s ease;
    opacity: 0;
    white-space: nowrap;
    font-size: 0.9rem;
}
.copy-toast--hide{
    opacity: 0;
    transform: translate(-120%, -100%);
}
.copy-toast:not(.copy-toast--hide){
    opacity: 1;
    transform: translate(-50%, -100%);
}

/* Align map toggle to the left edge */
.map-toggle{
    display:flex;
    align-items:center;
    gap:8px;
    justify-content:flex-start;
    padding-left: 4px; /* align to menu inner padding */
    padding-top: 12px; /* added spacing above the toggle */
}
.map-toggle .map-toggle-label{
    font-size: 0.95rem;
    color: #ddd;
    transform: translateY(-2px); /* nudge label slightly up to line with slider */
}
/* Ensure the switch aligns vertically within the toggle row */
.map-toggle .switch{ bottom: 0.3; }

/* Inline tour button: keep at right edge of toggle row */
.map-toggle .tour{ margin-left: auto; }
.map-toggle .tour button{ width: 45px; height: 31px; padding: 0; border-radius: 10px; }


@media (max-height: 600px) {
    .map-toggle{ padding-left: 2px; }
    .menu{
        /* Keep menu anchored on left but narrower for short screens */
        width: min(260px, 80vw);
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        box-shadow: 5px 0 12px rgba(0,0,0,0.6);
    }
    .menu.active{
        transform: translateX(0%);
    }
    .menu .menu__button{
        top: 8px;
        height: 48px;
        line-height: 48px;
    }
    .menu__logo{ display: none; }

    /* Compact spacing */
    .menu__actions{ gap: 6px; margin-top:6px; }
    .menu__tab{ height: 34px; width: 200px; padding: 0 6px; font-size: 0.92rem; }

    /* Panels and scrolling */
    /* Give the content area the remaining vertical space and make it the scrolling region */
    .menu__content{ max-height: none; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
    .menu__content > *{ padding: 6px; box-sizing: border-box; min-height: 0; }

    /* Reduce the visual footprint of the audio player and tour button */
    .bgm { max-height: 72px; overflow: visible; }
    .custom-player { padding: 4px 0; }
    .custom-player .player-controls { height: 44px; }
}

/* Slight spacing for time display */
.custom-player .time-display { padding-right: 8px; }
#layers_select{
    appearance: menulist-button;
    -webkit-appearance: menulist-button;
    -moz-appearance: menulist-button;
    background-color: #13111e;
    color: #fff;
    border: 1px solid #ffffffad;
    cursor: pointer;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 5px;
    padding: 6px 10px;
    height: 42px;
    border-radius: 6px;
    font-size: 1rem;
    text-align: left;
    text-shadow: 1px 0px 3px black, -1px 0px 3px black, 0px 0px 3px black, 0px 0px 3px black, 0px 0px 3px black; 
    background-size: 100% 100%;
    background-position: left;
    background-repeat: no-repeat; }

#layers_select option{
    background-color: #222034;
    color: #fff;
}
