/* ==========================================
   コトハボード - 擬似スリープ・夜間消灯オーバーレイスタイル (sleep-overlay.css)
   ========================================== */

.sleep-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: hidden;
}

.sleep-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sleep-overlay.hidden {
  display: none;
}

/* スリープオーバーレイ内部コンテンツ */
.sleep-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 24px;
  text-align: center;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  transition: opacity 0.3s ease;
}

/* 完全漆黒モード (blackout): 時計やボタンも消して完全な黒 */
.sleep-overlay.mode-blackout .sleep-overlay-content {
  opacity: 0;
  pointer-events: none;
}

/* 時計エリア */
.sleep-clock-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sleep-clock-time {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3.8rem, 14vw, 5.8rem);
  font-weight: 700;
  line-height: 1;
  color: #cbd5e1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.sleep-clock-date {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.05em;
}

/* タッチガイド (微かなブリージングアニメーション) */
.sleep-touch-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 500;
  animation: sleepGuideBreath 3.5s ease-in-out infinite;
}

.sleep-guide-icon {
  font-size: 1.1rem;
}

@keyframes sleepGuideBreath {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

/* 夜間緊急ボタン (暗闇でも手探りで押せる親切設計) */
.sleep-emergency-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 32px;
  border-radius: 9999px;
  background: rgba(220, 38, 38, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.55);
  color: #fca5a5;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(220, 38, 38, 0.25);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.sleep-emergency-btn:active {
  background: rgba(220, 38, 38, 0.45);
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(0.96);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.5);
}

.sleep-em-icon {
  font-size: 1.4rem;
}
