* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body {
  background-color: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  overflow: hidden;
}

/* スマホ画面風のコンテナ */
.phone-container {
  width: 100%;
  max-width: 400px;
  height: 100%;
  max-height: 750px;
  background-color: #7494c0; /* メッセージアプリ風の背景色 */
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.status-bar {
  background-color: #2c3e50;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 10;
}

.game-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* 通知ポップアップのデザイン */
.notification {
  position: absolute;
  width: 210px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  animation: popIn 0.15s ease-out;
  transition: transform 0.1s;
}

.notification:active {
  transform: scale(0.95);
}

.notif-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 4px;
}

.notif-body {
  font-size: 1.05rem;
  font-weight: bold;
  color: #111;
}

/* タイムリミットバー（ターゲット通知用） */
.timer-bar {
  height: 4px;
  background-color: #06c755;
  margin-top: 6px;
  border-radius: 2px;
  width: 100%;
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* スタート・ゲームオーバー画面 */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  z-index: 20;
}

.hidden {
  display: none;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.rule {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.highlight {
  color: #06c755;
  font-size: 1.2rem;
}

.btn {
  background-color: #06c755;
  color: #fff;
  border: none;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  margin: 8px 0;
  width: 80%;
}

.share-btn {
  background-color: #000;
  border: 1px solid #fff;
}

.retry-btn {
  background-color: #555;
}

.result-text {
  font-size: 1.3rem;
  margin: 15px 0;
}

.rank-text {
  color: #ffd700;
  font-weight: bold;
  margin-bottom: 25px;
}