html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: black;
  overflow: hidden;
}

#video {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: 0;
}

.video-wrapper { position: relative; width: 100vw; height: 100vh; }

#flame, #flame2 {
  position: fixed;
  filter: brightness(1) contrast(1) saturate(2);
  top: 14%;
  width: 20vw; height: 20vw;
  object-fit: cover;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 1;
  z-index: 5;
  display: none;
}

#flame { left: 34%; }
#flame2 { left: 45%; }


#snap, #record {
  position: fixed;
  bottom: 5%; 
  padding: 1% 2%; 
  font-size: 1.2vw; 
  border: none; border-radius: 1vw;
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  z-index: 10;
}
#snap { right: 60%; }
#record { right: 40%; }

.category-buttons {
  position: absolute;
  bottom: 15%;   /* 70px 相当を%に変換 */
  left: 5%;      /* PCでも左寄せにしたいならこっち */
  z-index: 10;
}
.category-btn {
  display: block;
  margin-bottom: 15px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
}

.sub-buttons {
  display: none;
  position: absolute;
  bottom: 25%;   
  right: 5%;   
  z-index: 10;
}
.sub-buttons button {
  display: block;
  margin-bottom: 15px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
}

#timer {
  color: aliceblue;
  position: fixed;
  top: 20px; right: 20px;
  font-size: 24px;
  z-index: 20;
}

#face-frame {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 25vw; height: 32vw;
  border: 4px solid #00ffcc;
  border-radius: 50% / 60%;
  box-shadow: 0 0 15px #00ffcc;
  pointer-events: none;
  z-index: 15;
}
@media (max-width: 768px) {
  #snap {
    left: 5%;
    width: 40%;
  }
  #record {
    right: 5%;
    width: 40%;
  }

  .category-buttons {
    bottom: 40%; 
    left: 3%;
    transform: none; 
    right: auto;
    z-index: 10;
  }

  .category-btn {
    padding: 2% 3%;
    font-size: 4vw;
  }

  .sub-buttons {
    bottom: 22%; 
    right:3%;
    transform: none; 
    left: auto;
    z-index: 10;
  }
  .sub-buttons button {
    font-size: 4vw;
    padding: 3px 5px;
    font-size: 10px;
  }

  #timer {
    font-size: 5vw;
    top: 3%;
    right: 3%;
  }
}
@media (max-width: 768px) {
  #face-frame {
    width: 70vw;  
    height: calc(70vw * 32 / 25); /* 元の比率を維持 */
  }
}

@media (max-width: 768px) {
  #flame, #flame2 {
    top: 25%;   
    width: 50vw;
    height: 50vw;
  }
  #flame { left: 10%; }
  #flame2 { left: 40%; }
}
