html,body{
    margin:0;
    height:100%;
    background:#000;
    font-family:Arial, Helvetica, sans-serif;
    overflow:hidden;
}
 
#globeWrap{
    width:100vw;
    height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#000;
}
 
#globeViz{
    width:100%;
    height:100%;
}
 
#map{
    width:100vw;
    height:100vh;
    display:none;
}
 
#info-box{
    position:fixed;
    top: 64px; 
    right: 16px;
    background: rgba(0,0,0,0.75);
    color:#eee;
    padding: 8px 12px;
    border-radius:6px;
    font-size:14px;
    border:1px solid rgba(255,255,255,0.1);
    z-index:5500;
    pointer-events:none;
}
 
#city-info{
    position:absolute;
    min-width:360px;
    max-width:420px;
    max-height:80vh;
    max-height:80dvh;
    background:rgba(0,0,0,0.85);
    color:#fff;
    padding:20px 22px;
    border-radius:10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index:5000;
    pointer-events:auto;
    display:none;
    transform-origin: top left;
    font-family:Arial, Helvetica, sans-serif;
    overflow-y:auto;
    box-sizing:border-box;
}
 
#city-info.mobile-sheet{
    position:fixed;
    left:50%;
    right:auto;
    bottom:0;
    top:auto;
    width:92%;
    max-width:420px;
    border-radius: 16px 16px 0 0;
    transform:translateX(-50%) translateY(100%);
    transition: transform 0.3s ease;
}
#city-info.mobile-sheet.visible{
    transform: translateX(-50%) translateY(0);
}
 
 
/*help button*/
#help-btn{
    position: fixed;
    top:24px;
    right:24px;
    z-index: 6000;
    width:32px;
    height:32px;
    border-radius:50%;
    border:1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.75);
    color:#eee;
    font-size:16px;
    cursor:pointer;
}
#info-box.hidden{
    display:none;
}
 
/*Top bar*/
#top-bar{
    position:fixed;
    top:24px;
    left:24px;
    z-index:5000;
    display:flex;
    gap:10px;
}
#search-input{
    border-radius:8px;
    border:none;
    outline:none;
}
#surprise-btn{
    padding:8px 12px;
    background: #ffa500;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-weight:600;
}
#surprise-btn:hover{
    background:#ffb733;
}
 
#search-results{
    position:absolute;
    top:40px;
    left:0;
    width:100%;
    background:rgba(0,0,0,0.85);
    border-radius: 6px;
    padding: 6px 0;
    display:none;
    z-index:5000;
}
.search-item{
    padding:8px 12px;
    cursor:pointer;
    color:#fff;
    font-size:14px;
}
.search-item:hover{
    background:rgba(255,255,255,0.1);
}
 
body.mode-3d #search-results{
    width:320px;
    font-size:17px;
    padding:14px 16px;
}
body.mode-3d #surprise-btn{
    padding:14px 20px;
    font-size:17px;
}
body.mode-2d #top-bar{
    top:16px;
    left:60px;
}
body.mode-2d #search-input{
    width:200px;
    padding:10px 12px;
    font-size:16px;
}
body.mode-2d #surprise-btn{
    padding:10px 14px;
    font-size:16px;
}
 
.leaflet-control-zoom{
    display:flex !important;
    flex-direction: row !important;
}
.leaflet-control-zoom-in{
    border-radius: 6px 0 0 6px !important;
}
.leaflet-control-zoom-out{
    border-radius: 0 6px 6px 0 !important;
}
.leaflet-bottom.leaflet-left{
    margin-bottom:40px;
    margin-left:16px;
}
 
/* favourite*/
#favorites-btn{
    padding: 8px 12px;
    background:rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #ffd166;
    font-size:18px;
    cursor: pointer;
}
#favorites-panel{
    position:absolute;
    top:48px;
    right:0;
    width:260px;
    background: rgba(0,0,0,0.9);
    border-radius:8px;
    padding: 6px 0;
    display:none;
    z-index:5000;
}
.favorites-empty{
    padding:12px;
    color:#aaa;
    font-size:13px;
}
 
#city-favorite{
    position: absolute;
    top:8px;
    left:8px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: #888;
    height:42px;
    width:42px;
    border-radius:50%;
    cursor:pointer;
    font-size:16px;
    line-height:1;
    z-index:10;
}
#city-favorite.active{
    color:#ffd166;
}
#city-favorite:hover{
    background: rgba(255,255,255,0.12);
}
.sheet-handle{
    display:none;
}
#city-info.mobile-sheet .sheet-handle{
    display:block;
    width:40px;
    height:4px;
    background:rgba(255,255,255,0.3);
    border-radius:2px;
    margin: 6px auto 10px auto;
}
#city-info.mobile-sheet{
    padding-bottom: calc(20px+ env(safe-area-inset-bottom));
    max-height:55vh;
    max-height:55dvh;
}

#city-close{
    position:absolute;
    top:8px;
    right:8px;
    background: rgba(255,255,255,0.06);
    border:none;
    color:#fff;
    height:28px;
    width:28px;
    border-radius:50%;
    cursor:pointer;
    font-size:14px;
    line-height:1;
}
#city-close:hover {background:rgba(255,255,255,0.12);}
 
#city-info h3{
    margin:0 0 6px 0;
    font-size:16px;
    font-weight: 600;
}
 
#city-info .dish-img {
  width: 100%;
  height: 270px;      
  object-fit: cover;  
  border-radius: 10px;
  margin-bottom: 10px;
  background: #222222;
}
 
#city-info .dish{
    font-size: 32px;
    margin-bottom:4px;
    color: #ffa500;
}
#city-info .cuisine{
    font-size: 28px;
    margin-bottom:8px;
    color:#ccc;
}
#city-info .desc{
    font-size:18px;
    color:#ddd;
    margin-bottom:10px;
    line-height:1.4;
}
#city-info .rec{
    background:rgba(255,255,255,0.06);
    padding:8px;
    border-radius:6px;
    margin-bottom:6px;
}
#city-info .rec strong{
    font-size: 16px;
}
#city-info.mobile-sheet .rec:last-child{
    margin-bottom:12px;
}
#city-info .price{
    color:#87e787;
    margin-left:4px;
}
#city-info .address{
    font-size:14px;
    color:#6ea8ff;
    text-decoration:none;
}
#city-info a:hover{
    text-decoration:underline;
}
 
#city-info .field {
  margin-bottom: 6px;
}
#city-info .label{
    display: inline-block;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:0.5px;
    color: #888;
    width: 60px;
}
#city-info .value {
  font-size: 14px;
  color: #eee;
}
#city-info .value.dish {
    font-size:16px;
    font-weight:600;
    color:#ffa500;
}
#city-info .recs-heading {
    font-size:11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color:#888;
    margin:14px 0 6px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top:10px;
}
 
#label-layer { 
    position: absolute; 
    left: 0; 
    top: 0; 
    width: 100vw; 
    height: 100vh; 
    pointer-events: none; 
    z-index: 45; 
    transition: opacity 0.15s ease;
}
.city-label { 
    pointer-events: auto; 
    cursor: pointer; 
    transform: translate(-50%,-50%); 
    transition: left 0.05s linear, top 0.05s linear;
}
.city-label .dot { 
    display:inline-block; 
    width:8px; height:8px; 
    background:#ffa500; 
    border-radius:50%; 
    margin-right:6px; 
    vertical-align:middle; 
    box-shadow:0 0 6px rgba(255,165,0,0.9); 
}
.city-label:hover { 
    transform: translate(-50%,-50%) scale(1.06); 
    box-shadow: 0 6px 18px rgba(0,0,0,0.6); 
}
.city-label.text{
    vertical-align:middle;
}
 
 
#history-btn{
    position:fixed;
    top: 24px;
    right:64px;
    z-index: 6000;
    width:32px;
    height:32px;
    border-radius:50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.75);
    color:#eee;
    font-size:16px;
    cursor:pointer;
}
#timeline-strip{
    position:fixed;
    bottom:12px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
    max-width:90vw;
    overflow-x: auto;
    z-index:4000;
    padding:6px;
}
#timeline-strip.open{
    display:flex;
}
.timeline-item{
    flex-shrink:0;
    background:rgba(0,0,0,0.75);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding:6px 12px;
    color: #eee;
    font-size:12px;
    white-space: nowrap;
    cursor: pointer;
}
.timeline-item:hover{
    background: rgba(255,255,255,0.15);
}
.timeline-num{
    color:#ffa500;
    font-weight:600;
    margin-right:4px;
}
.timeline-empty{
    color:#888;
    font-size:12px;
    padding:6px 12px;
    white-space:nowrap;
}
 
#start-screen{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.92);
    z-index:10000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#start-screen.hidden{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
}
.start-content{
    max-width:480px;
    text-align:center;
    color:#eee;
}
.start-content h1{
    font-size:28px;
    margin: 0 0 8px 0;
    color:#ffa500;
}
.start-tagline{
    color: #aaa;
    font-size: 14px;
    margin-bottom:20px;
}
.start-characters{
    display:flex;
    justify-content:center;
    gap:16px;
    margin-bottom:20px;
}
.start-char{
    height:140px;
    width:auto;
    object-fit:contain;
}
.start-instructions{
    list-style:none;
    padding:0;
    margin: 0 0 24px 0;
    text-align: left;
    display: inline-block;
}
.start-instructions li{
    font-size: 14px;
    margin-bottom:10px;
    color: #ddd;
}
#start-btn{
    background: #ffa500;
    border:none;
    border-radius:8px;
    padding: 14px 28px;
    font-size:16px;
    color: #111;
    cursor:pointer;
}
#start-btn:hover{
    background:#ffb733;
}
#near-me-btn{
    padding:8px 12px;
    background:rgba(255,255,255,0.1);
    border:1px solid rgba(255,255,255,0.2);
    border-radius:8px;
    color: #7fd4ff;
    font-size: 14px;
    cursor:pointer;
    white-space:nowrap;
}
#near-me-btn:hover{
    background:rgba(255,255,255,0.18);
}
#near-me-btn:disabled{
    opacity:0.5;
    cursor: wait;
}
.empty-state{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    padding:20px 16px;
    gap: 10px;
}
.empty-mascot{
    height: 64px;
    width: auto;
    opacity: 0.9;
}
.empty-state p{
    color:#aaa;
    font-size:13px;
    margin:0;
}
.empty-state-inline{
    flex-direction:row;
    padding: 4px 12px;
    gap:8px;
}
.empty-mascot-small{
    height:28px;
    width:auto;
}
.empty-state-inline span{
    color:#888;
    font-size:12px;
    white-space:nowrap;
}
 
#site-footer{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:6px 16px;
    background: rgba(0, 0, 0, 0.4);
    z-index:1;
    pointer-events:none;
}
.footer-credit{
    font-size:11px;
    color:#777;
}
.footer-char{
    height: 256px;
    width:auto;
    opacity:0.9;
}
.footer-char-right{
    transform: scaleX(-1);
}

#timeline-strip.open ~ #site-footer{
    display:none;
}
 
body.mode-2d #near-me-btn{
    position:fixed;
    top:auto;
    bottom:40px;
    left:90px;
    transform: none;
    z-index:4500;
}

@media (max-width:480px){
    body.mode-2d #top-bar{
        left:12px;
        top:12px;
        right:56px;
        gap:6px;
    }
    body.mode-2d #search-input{
        width:100%;
        min-width:0;
        font-size:14px;
        padding:8px 10px;
    }
    body.mode-2d #surprise-btn{
        padding:8px 10px;
        font-size:14px;
        white-space: nowrap;
    }
    body.mode-2d #info-box{
        top:70px;
    }
    body.mode-2d #near-me-btn{
        bottom:40px;
        left:70px;
        transform:none;
        padding:6px 10px;
        font-size:12px;
    }
    .start-char{height:90px;}
    .start-content h1{font-size:22px;}
    .start-instructions li{ font-size: 13px; }
 
    #city-info.mobile-sheet{
        max-height:55dvh;
        padding:12px 14px 20px 14px;
        font-size:13px;
        overflow-y:auto;
    }
    #city-info .dish-img{
        width:100px;
        height:90px;
    }
    #city-info h3{
        font-size:15px;
    }
    #city-info .value.dish{
        font-size:14px;
    }
    #city-info .desc{
        font-size:12px;
        line-height:1.4;
    }
    #city-info .rec{
        padding:6px 8px;
        margin-bottom:6px;
    }
    #city-close{
        position: sticky;
        top:0;
        z-index:10;
    }
 
    #near-me-btn{
        padding:6px 8px;
        font-size:12px;
    }
    #site-footer{
        padding:4px 10px;
    }
    .footer-char{
        height:20px;
    }
    .footer-credit{
        font-size:9px;
    }
}
 
body.mode-3d #help-btn,
body.mode-3d #history-btn{
    width: clamp(36px, 3vw, 56px);
    height: clamp(36px, 3vw, 56px);
    font-size: clamp(16px, 1.5vw, 24px);
}
body.mode-3d .timeline-item{
    padding: clamp(8px, 0.8vw, 14px) clamp(14px, 1.2vw, 22px);
    font-size: clamp(13px, 0.9vw, 17px);
}
body.mode-3d .timeline-num{
    font-size:15px;
}
body.mode-3d .start-content{
    max-width: 640px;   
}
body.mode-3d .start-content h1{
    font-size:36px;
}
body.mode-3d .start-tagline{
    font-size:17px;
}
body.mode-3d .start-char{
    height:180px;
}
body.mode-3d .start-instructions{
    font-size: 16px;
}
body.mode-3d #start-btn{
    padding: 18px 36px;
    font-size:18px;
}
body.mode-3d #surprise-btn,
body.mode-3d #near-me-btn{
    padding: clamp(12px, 1vw, 18px) clamp(16px, 1.5vw, 26px);
    font-size: clamp(15px, 1vw, 20px);
}
body.mode-3d #search-input{
    width: clamp(280px, 22vw, 480px);
    font-size: clamp(15px, 1vw, 20px);
    padding: clamp(12px, 1vw, 18px) clamp(14px, 1.2vw, 20px);
}
body.mode-3d .footer-char{
    height: clamp(120px, 10vw, 220px);
}
body.mode-3d .footer-credit{
    font-size: clamp(11px, 0.7vw, 14px);
}
