
:root{
  --bg:#000; --panel:#0c0c0d; --panel2:#141416; --line:#26262a;
  --fg:#f2f2f2; --dim:#8e8e93; --dim2:#5c5c61;
  --accent:#ffffff; --r58:#e8b33c;
  --safe-b:env(safe-area-inset-bottom,0px); --safe-t:env(safe-area-inset-top,0px);
}
#stage3d{position:absolute;inset:0;z-index:2500;background:#000;overflow:hidden;visibility:hidden;pointer-events:none;--safe-t:env(safe-area-inset-top,0px)}
#stage3d.on{visibility:visible;pointer-events:auto}
#stage3d:empty{display:none}
#n3dMap{position:absolute;inset:0;background:#000}
.maplibregl-ctrl-attrib{display:none}
.maplibregl-canvas{outline:none}
#n3dSeaglow{position:absolute;pointer-events:none;width:1600px;height:1100px;left:-9999px;top:-9999px;
  transform:translate(-50%,-50%);mix-blend-mode:screen;opacity:0;
  background:radial-gradient(ellipse at center,rgba(255,225,170,.55) 0%,rgba(255,200,120,.22) 22%,rgba(255,170,80,.06) 45%,rgba(0,0,0,0) 70%);
  transition:opacity .6s}
.n3dPnl{position:absolute;z-index:20;background:rgba(10,10,11,.86);border:1px solid var(--line);
  border-radius:14px;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
#n3dBrand{left:14px;top:calc(var(--safe-t) + 12px);padding:10px 14px;pointer-events:none;background:none;border:0;backdrop-filter:none}
#n3dBrand b{display:block;font-size:22px;letter-spacing:.06em;font-weight:700;color:var(--r58);line-height:1.05}
#n3dBrand span{display:block;font-size:11px;letter-spacing:.28em;color:var(--dim);margin-top:4px}
#n3dBrand i{display:block;font-style:normal;font-size:9px;letter-spacing:.12em;color:var(--dim2);margin-top:6px}
#n3dClock{left:190px;top:calc(var(--safe-t) + 14px);display:flex;gap:8px;align-items:center;padding:0;background:none;border:0;backdrop-filter:none}
#n3dClock .pill{background:rgba(10,10,11,.86);border:1px solid var(--line);border-radius:12px;padding:9px 13px;
  font-size:13.5px;letter-spacing:.06em;display:flex;align-items:center;gap:8px;backdrop-filter:blur(14px);cursor:pointer;white-space:nowrap}
#n3dClock .pill.on{border-color:#3a3a40}
#n3dRt .dot{width:6px;height:6px;border-radius:50%;background:#2ec27e;box-shadow:0 0 6px #2ec27e}
#n3dRt.off .dot{background:var(--dim2);box-shadow:none}
#n3dMode{color:var(--fg);font-weight:600}
#n3dCats{left:14px;top:calc(var(--safe-t) + 96px);padding:4px 0;width:158px}
#n3dCats .c{display:flex;align-items:center;gap:10px;padding:9px 14px;font-size:12.5px;letter-spacing:.12em;color:var(--dim);cursor:pointer;
  border-bottom:1px solid rgba(255,255,255,.04);user-select:none}
#n3dCats .c:last-child{border-bottom:0}
#n3dCats .c svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.6;flex:0 0 auto}
#n3dCats .c.on{color:var(--fg);background:rgba(255,255,255,.06)}
#n3dCats .c.on svg{stroke:var(--r58)}
#n3dCats .c.na{opacity:.38;cursor:default}
#n3dLmnote{left:14px;top:calc(var(--safe-t) + 420px);padding:10px 14px;font-size:11.5px;color:var(--dim);letter-spacing:.06em;line-height:1.5}
#n3dLmnote b{color:var(--r58);font-weight:600;letter-spacing:.14em}
#n3dNav{right:14px;top:calc(var(--safe-t) + 14px);display:flex;flex-direction:column;gap:8px;background:none;border:0;backdrop-filter:none;padding:0}
#n3dNav button{width:52px;height:52px;border-radius:14px;background:rgba(10,10,11,.86);border:1px solid var(--line);color:var(--fg);
  font-size:20px;cursor:pointer;backdrop-filter:blur(14px);display:flex;align-items:center;justify-content:center;transition:.12s}
#n3dNav button:active{transform:scale(.95)}
#n3dNav button.s{font-size:11px;letter-spacing:.06em;font-weight:600}
#n3dCompass{position:relative}
#n3dCompass svg{width:34px;height:34px;transition:transform .05s linear}
#n3dExag{right:14px;bottom:calc(var(--safe-b) + 86px);padding:8px 10px 10px;text-align:center}
#n3dExag .t{font-size:10.5px;color:var(--dim);letter-spacing:.14em;margin-bottom:6px}
#n3dExag .row{display:flex;gap:4px}
#n3dExag button{background:none;border:1px solid transparent;color:var(--dim);font-size:13px;padding:6px 11px;border-radius:8px;cursor:pointer}
#n3dExag button.on{background:var(--r58);color:#000;font-weight:700}
#n3dTl{left:50%;bottom:calc(var(--safe-b) + 18px);transform:translateX(-50%);width:min(760px,calc(100% - 200px));padding:12px 18px 10px;
  background:rgba(10,10,11,.7)}
#n3dTl input{width:100%;-webkit-appearance:none;appearance:none;height:2px;background:linear-gradient(90deg,#2a2a2e 0%,#5a4a2a 25%,#e8b33c 50%,#5a4a2a 76%,#2a2a2e 100%);outline:none;margin:6px 0 4px}
#n3dTl input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:var(--r58);border:2px solid #000;box-shadow:0 0 10px rgba(232,179,60,.6);cursor:pointer}
#n3dTl .lab{display:flex;justify-content:space-between;font-size:10px;color:var(--dim2);letter-spacing:.1em}
#n3dTl .sun{display:flex;justify-content:space-between;font-size:10px;color:var(--dim);letter-spacing:.08em;margin-top:4px}
:root{--area:#f0c25a;--areaGlow:#e8b33c}
.n3dTag{pointer-events:auto;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--fg);letter-spacing:.2em;font-size:13px;font-weight:600;
  text-shadow:0 1px 8px #000,0 0 18px rgba(0,0,0,.9);transition:opacity .25s;user-select:none}
.n3dTag .sym{width:13px;height:13px;border-radius:50%;border:1.5px solid var(--area);position:relative;box-shadow:0 0 0 3px rgba(0,0,0,.6);transition:.2s;margin-bottom:2px}
.n3dTag .sym::after{content:'';position:absolute;inset:3px;border-radius:50%;background:var(--area);opacity:.55;transition:.2s}
.n3dTag small{display:block;font-size:9.5px;letter-spacing:.24em;color:var(--area);margin-top:1px;font-weight:600}
.n3dTag.hov .sym{box-shadow:0 0 0 3px rgba(0,0,0,.6),0 0 12px var(--areaGlow)}
.n3dTag.hov .sym::after{opacity:.9}
.n3dTag.sel .sym{background:var(--area);box-shadow:0 0 0 3px rgba(0,0,0,.6),0 0 14px var(--areaGlow),0 0 30px var(--areaGlow)}
.n3dTag.sel .sym::after{opacity:0}
.n3dTag.sel .nm{color:#fff}
.n3dTag.other{opacity:.5}
.n3dLb{pointer-events:none;text-align:center;color:var(--fg);text-shadow:0 1px 6px #000,0 0 14px rgba(0,0,0,.8);white-space:nowrap;
  font-size:13px;letter-spacing:.08em;line-height:1.15}
.n3dLb small{display:block;font-size:8.5px;letter-spacing:.2em;color:var(--dim);margin-top:1px}
.n3dLb.peak{font-size:12px;color:#d7d7da}
.n3dLb.peak small{color:#8e8e93}
.n3dLb.city{font-size:22px;letter-spacing:.16em;font-weight:600}
.n3dLb.city small{font-size:10px;color:#c9c9cc}
.n3dLb.bay{font-size:13px;color:#b8c2cc;font-style:normal}
.n3dLb.village,.n3dLb.town{font-size:12px;color:#c4c4c8}
#n3dHud{left:14px;bottom:calc(var(--safe-b) + 18px);padding:8px 10px;font:10.5px/1.5 ui-monospace,Menlo,Consolas,monospace;color:var(--dim);
  white-space:pre;min-width:190px}
#n3dHud b{color:var(--fg);font-weight:500}
#n3dAttr{position:absolute;right:14px;bottom:calc(var(--safe-b) + 6px);z-index:20;font-size:9px;color:var(--dim2);letter-spacing:.04em;pointer-events:none;text-align:right}
#foot{position:absolute;left:0;right:0;bottom:0;height:0}
@media (max-height:480px){
  #n3dBrand b{font-size:17px}#n3dBrand{padding:6px 12px}
  #n3dClock{left:150px;top:calc(var(--safe-t) + 8px)}#n3dClock .pill{padding:6px 10px;font-size:12px}
  #n3dCats{top:calc(var(--safe-t) + 60px);width:130px;padding:0}#n3dCats .c{padding:5px 10px;font-size:10.5px;gap:7px}
  #n3dLmnote{display:none}
  #n3dNav{gap:5px;top:calc(var(--safe-t) + 8px)}#n3dNav button{width:38px;height:38px;font-size:15px;border-radius:10px}#n3dCompass svg{width:24px;height:24px}
  #n3dExag{bottom:calc(var(--safe-b) + 8px);padding:5px 6px 6px}#n3dExag button{padding:3px 7px;font-size:11px}#n3dExag .t{margin-bottom:2px}
  #n3dTl{width:min(520px,calc(100% - 330px));bottom:calc(var(--safe-b) + 8px);padding:6px 12px 6px;left:calc(50% - 20px)}#n3dTl .lab,#n3dTl .sun{display:none}
  #n3dHud{display:none}#n3dAttr{display:none}
  .n3dLb.city{font-size:16px}.n3dLb{font-size:11px}.n3dLb.peak{font-size:10px}
}
@media (max-width:520px) and (min-height:481px){
  #n3dBrand{left:10px;top:calc(var(--safe-t) + 8px);padding:6px 10px}#n3dBrand b{font-size:18px}#n3dBrand span{font-size:9.5px}#n3dBrand i{display:none}
  #n3dClock{left:auto;right:10px;top:calc(var(--safe-t) + 10px);flex-direction:column;align-items:flex-end;gap:5px}
  #n3dClock .pill{padding:6px 9px;font-size:11.5px}
  #n3dCats{left:0;right:0;top:auto;bottom:calc(var(--safe-b) + 92px);width:auto;display:flex;overflow-x:auto;scrollbar-width:none;
    border-radius:0;border-left:0;border-right:0;padding:0 8px;background:rgba(10,10,11,.75)}
  #n3dCats::-webkit-scrollbar{display:none}
  #n3dCats .c{border-bottom:0;padding:9px 10px;white-space:nowrap;font-size:11.5px;gap:6px}
  #n3dLmnote{display:none}
  #n3dNav{right:10px;top:auto;bottom:calc(var(--safe-b) + 148px);gap:6px}#n3dNav button{width:40px;height:40px;font-size:16px;border-radius:11px}
  #n3dNav button.s{font-size:9.5px}#n3dCompass svg{width:24px;height:24px}
  #n3dNav #n3dZin,#n3dNav #n3dZout{display:none}
  #n3dExag{right:auto;left:10px;bottom:calc(var(--safe-b) + 148px);padding:6px 8px 8px}#n3dExag button{padding:4px 8px;font-size:11.5px}
  #n3dTl{width:calc(100% - 20px);bottom:calc(var(--safe-b) + 12px);padding:8px 14px 8px}#n3dTl .sun{display:none}
  #n3dHud{display:none}#n3dAttr{left:10px;right:auto;top:calc(var(--safe-t) + 66px);bottom:auto;text-align:left;font-size:8px;max-width:60%}
  .n3dLb.city{font-size:17px}.n3dLb{font-size:11px}.n3dLb.peak{font-size:10px}.n3dLb.peak small{display:none}
  .n3dTag{font-size:11.5px}
}
.n3dStar{pointer-events:auto;cursor:default;display:flex;flex-direction:column;align-items:center;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.9));user-select:none}
.n3dStar i{display:block;line-height:0}
.n3dStar b{margin-top:2px;font:700 10px/1.1 ui-monospace,Menlo,monospace;letter-spacing:.08em;color:#fff;
  text-shadow:0 1px 4px #000,0 0 10px rgba(0,0,0,.95);white-space:nowrap}
.n3dStar small{display:block;font:600 8px/1.1 ui-monospace,Menlo,monospace;letter-spacing:.18em;
  color:var(--area);margin-top:1px;white-space:nowrap}
#n3dExag.off button{opacity:.32;cursor:not-allowed}
#n3dExag.off button.on{background:none;color:var(--dim);font-weight:400;border-color:var(--line)}
#n3dExag .note{font-size:9.5px;color:var(--dim);margin-top:5px;letter-spacing:.06em}
#n3dExag .note:empty{display:none}
.n3dLaunch .n3dTag[data-id="AREA_NAGO_CENTRAL"] .sym::before{content:'';position:absolute;inset:-2px;border-radius:50%;border:1.5px solid var(--area);
  opacity:0;animation:n3dEntry 2.8s ease-out infinite}
@keyframes n3dEntry{0%{transform:scale(1);opacity:.75}70%{transform:scale(2.9);opacity:0}100%{transform:scale(2.9);opacity:0}}
.n3dLaunch .n3dTag[data-id="AREA_NAGO_CITY"]{opacity:.78}
.n3dLaunch .n3dTag[data-id="AREA_NAGO_CITY"].hov,.n3dLaunch .n3dTag[data-id="AREA_NAGO_CITY"].sel{opacity:1}
@media (prefers-reduced-motion:reduce){.n3dLaunch .n3dTag .sym::before{animation:none}}
