* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #04080f; touch-action: none; }
body { font-family: 'Shippori Mincho', 'Hiragino Mincho ProN', serif; }
canvas { position: fixed; top: 0; left: 0; display: block; }

#ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

#logo-wrap {
  position: absolute !important; top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  opacity: 0; animation: fu .8s .4s ease forwards;
  z-index: 20;
}
#logo-img {
  width: clamp(52px,7vw,80px); height: clamp(52px,7vw,80px);
  filter: drop-shadow(0 0 14px rgba(242,196,48,.45)) drop-shadow(0 0 4px rgba(14,82,168,.5));
  transition: filter .3s;
}
#logo-img:hover { filter: drop-shadow(0 0 22px rgba(242,196,48,.75)); }
#sub {
  font-size: clamp(7px,1.4vw,9px); letter-spacing: .36em;
  color: rgba(242,196,48,.5); text-transform: uppercase;
}
#counter {
  position: absolute; top: clamp(12px,2.5vw,20px); right: clamp(12px,2.5vw,24px);
  text-align: right; opacity: 0; animation: fu .8s .7s ease forwards;
}
#cnt-num { font-size: clamp(11px,1.8vw,16px); color: rgba(242,196,48,.25); letter-spacing: .08em; font-weight: 300; }
#cnt-lbl { font-size: 5px; letter-spacing: .25em; color: rgba(200,228,255,.12); text-transform: uppercase; margin-top: 2px; }

#modes {
  position: absolute; bottom: clamp(52px,9vw,68px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; pointer-events: all; white-space: nowrap;
  opacity: 0; animation: fu .8s .8s ease forwards;
}
.mb {
  background: none; border: 1px solid rgba(14,82,168,.35);
  color: rgba(200,228,255,.3); font-family: inherit;
  font-size: clamp(11px,2.8vw,14px); letter-spacing: .12em;
  padding: clamp(5px,1.5vw,8px) clamp(9px,2.5vw,18px);
  cursor: pointer; border-radius: 0; -webkit-appearance: none;
  transition: border-color .25s, color .25s, background .25s, box-shadow .25s;
}
.mb:hover, .mb:active {
  border-color: rgba(242,196,48,.7); color: rgba(242,196,48,.95);
  box-shadow: 0 0 12px rgba(242,196,48,.15);
}
.mb.on {
  border-color: rgba(242,196,48,.8); color: rgba(242,196,48,1);
  background: rgba(14,82,168,.25);
  box-shadow: 0 0 16px rgba(242,196,48,.2), inset 0 0 12px rgba(14,82,168,.3);
}

#swipe-hint {
  position: absolute; bottom: clamp(16px,3.5vw,26px); left: 50%; transform: translateX(-50%);
  font-size: 8px; letter-spacing: .35em; color: rgba(200,228,255,.18); text-transform: uppercase;
  animation: br 2.8s ease infinite;
}
#sliders {
  position: absolute; bottom: clamp(52px,9vw,68px); right: clamp(16px,4vw,40px);
  display: flex; flex-direction: column; gap: 8px; pointer-events: all;
  opacity: 0; animation: fu .8s .9s ease forwards;
}
.sr { display: flex; align-items: center; gap: 8px; }
.sl { font-size: 7px; letter-spacing: .22em; color: rgba(200,228,255,.25); text-transform: uppercase; min-width: 40px; text-align: right; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: clamp(60px,10vw,100px); height: 1px;
  background: rgba(14,82,168,.4); outline: none; cursor: pointer; border-radius: 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 8px; height: 8px;
  background: rgba(242,196,48,.9); border-radius: 50%;
  box-shadow: 0 0 6px rgba(242,196,48,.5);
}
input[type=range]::-moz-range-thumb {
  width: 8px; height: 8px; background: rgba(242,196,48,.9); border: none; border-radius: 50%;
}
.sv { font-size: 8px; color: rgba(242,196,48,.3); min-width: 28px; }

#geo { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: .09; }

#intro {
  position: fixed; inset: 0; background: #04080f; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.5s cubic-bezier(.76,0,.24,1);
  overflow: hidden;
}
#intro.hide { opacity: 0; pointer-events: none; }

/* イントロ用粒子キャンバス */
#intro-canvas {
  position: absolute; inset: 0;
  opacity: 0;
  animation: canvas-fade-in 0.8s ease-out forwards;
}

@keyframes canvas-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

#cur {
  position: fixed; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(242,196,48,.95); pointer-events: none; z-index: 999;
  transform: translate(-50%,-50%); box-shadow: 0 0 10px 3px rgba(242,196,48,.4);
}
#curo {
  position: fixed; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(14,82,168,.5); pointer-events: none; z-index: 998;
  transform: translate(-50%,-50%);
}

/* Back button */
#back-btn {
  position: fixed; bottom: clamp(16px,3.5vw,26px); right: clamp(16px,4vw,40px);
  font-size: 8px; letter-spacing: .35em; color: rgba(242,196,48,.4);
  text-transform: uppercase; text-decoration: none;
  pointer-events: all; z-index: 100;
  transition: color .3s;
}
#back-btn:hover { color: rgba(242,196,48,.9); }

@keyframes fu { to { opacity: 1; } }
@keyframes br { 0%,100% { opacity: .2; } 50% { opacity: .55; } }

@media (hover: none) { #cur, #curo { display: none; } }
@media (max-width: 560px) { #sliders { display: none; } }
