body {
  margin: 0;
  overflow: hidden;
  background-color: #d1c7a3;
  font-family: "游明朝", serif;
}

#ui-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 100;
}

.vignette {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
}

.scanlines {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.05), rgba(0,0,0,0.05) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
}

.instructions {
  position: absolute;
  top: 15px; left: 50%;
  transform: translateX(-50%);
  color: rgba(0, 0, 0, 0.4);
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  pointer-events: none;
}

.level-doors {
  position: absolute;
  top: 20px; left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 15px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.door-link {
  color: #333;
  text-decoration: none;
  font-family: monospace;
  font-size: 14px;
  padding: 5px;
  transition: all 0.2s;
}

.door-link:hover {
  color: #cc0000;
  background: rgba(0, 0, 0, 0.1);
  padding-left: 10px;
}

.exit-sign {
  position: absolute;
  bottom: 40px; right: 40px;
  background: #cc0000;
  color: #fff;
  padding: 10px 20px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 22px;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(204, 0, 0, 0.8);
  pointer-events: auto;
  transition: transform 0.2s;
}
.exit-sign:hover {
  transform: scale(1.05);
}

/* ★修正3: Daisy Bell画像の濃さを調整 */
#daisy-btn {
  position: absolute;
  bottom: 20px; left: 20px;
  width: 60px;
  height: auto;
  cursor: pointer;
  pointer-events: auto;
  
  /* 透明度を 0.45 から 0.8 に変更して濃くする */
  opacity: 0.8;
  /* 壁のシミではなく写真のように見せるため、blend-modeとfilterを削除 */
  /* mix-blend-mode: multiply; */
  /* filter: sepia(0.8) contrast(1.2) brightness(0.6); */
  
  transition: all 0.3s ease;
}

#daisy-btn:hover {
  /* ホバー時は完全に不透明にする */
  opacity: 1.0;
  transform: scale(1.1);
  /* filter: sepia(0.2) contrast(1.1) brightness(0.9); */
}

/* XR controls (VR/AR) */
.xrBar{
  position:absolute;
  right:20px;
  bottom:20px;
  display:flex;
  gap:10px;
  pointer-events:auto;
  z-index: 120;
}
.xrBtn{
  border:1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.35);
  color:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,"Noto Sans JP",sans-serif;
  font-weight:700;
  letter-spacing:.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.xrBtn:active{ transform: scale(.98); }

@media (max-width: 700px){
  .xrBar{ right:14px; bottom:14px; gap:8px; }
  .xrBtn{ padding:9px 10px; border-radius:10px; }
}


/* =========================================================
   mobile usability patch
   - EXIT と操作パッド / XR UI の重なり回避
   ========================================================= */
@media (max-width: 900px){
  .level-doors{
    top: calc(72px + env(safe-area-inset-top)) !important;
    left: 12px !important;
    right: 12px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 12px;
    gap: 6px;
    border-radius: 14px;
    z-index: 130;
  }

  .exit-sign{
    top: calc(18px + env(safe-area-inset-top)) !important;
    right: calc(12px + env(safe-area-inset-right)) !important;
    bottom: auto !important;
    left: auto !important;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.2;
    z-index: 140;
  }

  #daisy-btn{
    left: calc(12px + env(safe-area-inset-left)) !important;
    bottom: calc(160px + env(safe-area-inset-bottom)) !important;
    width: 48px;
    z-index: 125;
  }

  .xrBar{
    left: calc(12px + env(safe-area-inset-left));
    right: auto;
    bottom: calc(84px + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    z-index: 135;
  }
}
