html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  background: #000;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

#app-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#app {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: #000;
  transform-origin: center center;
}

#background {
  position: absolute;
  inset: 0;
  background-image: url("images/entrance.png");
  background-size: cover;
  background-position: center;
}

#heart-display {
  position: absolute;
  top: 26px;
  left: 28px;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 6px;
  color: #ff4d6d;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.95),
    0 0 8px rgba(255, 255, 255, 0.65),
    0 0 14px rgba(255, 90, 130, 0.55),
    0 0 22px rgba(255, 70, 110, 0.35);
  z-index: 5;
}

#turn-display {
  position: absolute;
  top: 78px;
  left: 34px;
  font-size: 20px;
  line-height: 1;
  color: #fff3de;
  text-shadow:
    0 0 2px rgba(255,255,255,0.75),
    0 0 8px rgba(255,220,180,0.28);
  z-index: 5;
}


#sigma {
  position: absolute;
  left: 30px;
  bottom: -100px;
  height: 810px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  z-index: 2;
}

#sigma.show {
  opacity: 1;
  transform: translateY(0);
}

#name-box {
  position: absolute;
  left: 190px;
  bottom: 250px;
  width: 220px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #f8f1dd;
  background: rgba(60, 10, 10, 0.65);
  border: 2px solid rgba(230, 205, 140, 0.85);
  border-radius: 10px;
  z-index: 3;
}

#message-box {
  position: absolute;
  left: 170px;
  bottom: 95px;
  width: 920px;
  min-height: 140px;
  padding: 14px 30px;
  box-sizing: border-box;
  background: rgba(45, 0, 0, 0.45);
  border: 3px solid rgba(220, 180, 110, 0.85);
  border-radius: 18px;
  z-index: 3;
}

#body-text {
  margin: 0;
  font-size: 20px;
  line-height: 1.7;
  color: #fff8e8;
  font-weight: 700;
  white-space: pre-wrap;
}

/*--------------------------*/
/*user_name                 */
/*--------------------------*/
#name-input-area {
  position: absolute;
  left: 170px;
  bottom: 30px;
  width: 920px;
  display: flex;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  z-index: 4;
}

#name-input-area.show {
  opacity: 1;
  pointer-events: auto;
}

#user-name-input {
  flex: 1;
  height: 56px;
  padding: 0 16px;
  font-size: 20px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: #fff8e8;
  background: rgba(35, 0, 0, 0.58);
  border: 2px solid rgba(220, 180, 110, 0.85);
  border-radius: 12px;
  outline: none;
}

#user-name-input::placeholder {
  color: rgba(255, 248, 232, 0.6);
}

#name-submit-btn {
  width: 120px;
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  color: #fff3de;
  background: rgba(80, 10, 10, 0.72);
  border: 2px solid rgba(230, 200, 130, 0.9);
  border-radius: 12px;
  cursor: pointer;
}

/*---------------------------*/

#select-buttons {
  position: absolute;
  top: 70px;
  right: 70px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  z-index: 4;
}

#select-buttons.show {
  opacity: 1;
  pointer-events: auto;
}

#select-buttons button {
  width: 260px;
  height: 72px;
  font-size: 28px;
  color: #fff3de;
  background: rgba(80, 10, 10, 0.68);
  border: 2px solid rgba(230, 200, 130, 0.9);
  border-radius: 14px;
  cursor: pointer;
}

/*------------------------*/
#castroom-background {
  position: absolute;
  inset: 0;
  background-image: url("images/castroom.png");
  background-size: cover;
  background-position: center;
}

#crescent {
  position: absolute;
  right: 400px;
  bottom: 0;
  height: 720px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  z-index: 2;
}

#crescent.show {
  opacity: 1;
  transform: translateY(0);
}

/*-----------------------*/
#display-name-input {
  width: 180px;
  height: 56px;
  padding: 0 16px;
  font-size: 20px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: #fff8e8;
  background: rgba(35, 0, 0, 0.58);
  border: 2px solid rgba(220, 180, 110, 0.85);
  border-radius: 12px;
  outline: none;
  box-sizing: border-box;
}

#display-name-input::placeholder {
  color: rgba(255, 248, 232, 0.6);
}

/*---------------------------*/

#input-area {
  position: absolute;
  left: 170px;
  bottom: 30px;
  width: 920px;
  display: flex;
  gap: 12px;
  z-index: 4;
}

#user-input {
  flex: 1;
  height: 56px;
  padding: 0 16px;
  font-size: 20px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: #fff8e8;
  background: rgba(35, 0, 0, 0.58);
  border: 2px solid rgba(220, 180, 110, 0.85);
  border-radius: 12px;
  outline: none;
}

#user-input::placeholder {
  color: rgba(255, 248, 232, 0.6);
}

#send-btn {
  width: 120px;
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  color: #fff3de;
  background: rgba(80, 10, 10, 0.72);
  border: 2px solid rgba(230, 200, 130, 0.9);
  border-radius: 12px;
  cursor: pointer;
}

#choice-area {
  position: absolute;
  left: 170px;
  bottom: 30px;
  width: 920px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  z-index: 4;
}

.hidden {
  display: none !important;
}

#continue-btn,
#exit-btn {
  height: 56px;
  min-width: 160px;
  font-size: 20px;
  font-weight: 700;
  color: #fff3de;
  background: rgba(80, 10, 10, 0.72);
  border: 2px solid rgba(230, 200, 130, 0.9);
  border-radius: 12px;
  cursor: pointer;
}

#test-tools {
  position: absolute;
  top: 320px;
  right: 70px;
  z-index: 4;
}

#recover-btn {
  width: 260px;
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  color: #fff3de;
  background: rgba(40, 80, 20, 0.72);
  border: 2px solid rgba(180, 230, 130, 0.9);
  border-radius: 12px;
  cursor: pointer;
}