/* ===== 로고 폰트 ===== */
@font-face {
  font-family: 'Super Nugget';
  src: url("fonts/SuperNugget.ttf") format("truetype");
}

/* ===== 색 이름표 (여기만 바꾸면 전체 색이 바뀌어요) ===== */
:root {
  --pink: #ff4fa0;
  --pink-dark: #c2185b;
  --pink-light: #ffd6e8;
  --yellow: #ffe066;
  --blue: #6ec6ff;
  --ink: #4a1832;
  --font: 'Jua', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: #2b1a2a;
  overflow: hidden;
  touch-action: manipulation;  /* 휴대폰에서 두 번 탭할 때 확대되지 않게 */
}

/* 게임 화면을 창 크기에 맞춰 가운데에 (크기 조절은 script.js가 해요) */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#game {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -480px;
  margin-top: -270px;
  width: 960px;
  height: 540px;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
  user-select: none;
  box-shadow: 0 0 40px rgba(255, 79, 160, 0.4);
}

.hidden {
  display: none !important;
}

/* ===== 배경 ===== */
#bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 0.4s;
}

/* ===== 캐릭터 ===== */
#character {
  position: absolute;
  bottom: 194px;   /* 대화창 윗선에 사진 밑부분이 오도록 */
  left: 50%;
  transform: translateX(-50%);
  height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#char-img {
  height: 100%;
  width: auto;
  max-width: 480px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 0 4px white) drop-shadow(0 0 2px white);
}

#character.full-body {
  height: 600px;
  bottom: -70px;
  clip-path: inset(0 0 120px 0);  /* 대화창 아래로 다리가 삐져나오지 않게 */
}

#character.full-body #char-img {
  max-width: none;
}

#char-placeholder {
  width: 260px;
  height: 420px;
  margin-bottom: 20px;
  border: 4px dashed rgba(255, 255, 255, 0.9);
  border-radius: 130px 130px 20px 20px;
  background: rgba(255, 214, 232, 0.55);
  color: var(--pink-dark);
  font-size: 26px;
  text-align: center;
  padding-top: 120px;
  line-height: 1.4;
}

#char-placeholder small {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.8;
}

/* ===== 대화창 ===== */
#dialogue-box {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 14px;
  height: 180px;
  border-style: solid;
  border-width: 46px 60px 34px 60px;
  border-image: url("image/dialogue_box.png") 230 300 170 300 fill / 46px 60px 34px 60px round stretch;
  cursor: pointer;
  z-index: 5;
}

#name-tag {
  position: absolute;
  top: -66px;
  left: -36px;
  min-width: 140px;
  padding: 6px 22px 4px;
  background: linear-gradient(#ff8cc6, var(--pink));
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  color: white;
  font-size: 22px;
  text-align: center;
  text-shadow: 2px 2px 0 var(--pink-dark);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 3px 3px 0 #1d1d1d;
}

#name-tag:empty {
  display: none;
}

#text {
  font-size: 24px;
  line-height: 1.5;
  padding: 0 10px;
  white-space: pre-wrap;
  word-break: keep-all;
}

#next-mark {
  position: absolute;
  right: 4px;
  bottom: -6px;
  color: var(--pink);
  font-size: 18px;
  animation: bounce 0.8s infinite;
  opacity: 0;
}

#next-mark.show {
  opacity: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ===== 호감도 효과 ===== */
#love-fx {
  position: absolute;
  top: 70px;
  right: 60px;
  font-size: 34px;
  color: var(--pink);
  text-shadow: 2px 2px 0 white, -2px -2px 0 white, 2px -2px 0 white, -2px 2px 0 white;
  opacity: 0;
  z-index: 8;
  pointer-events: none;
}

#love-fx.play {
  animation: floatUp 1.4s ease-out;
}

#love-fx.minus {
  color: #5b5bd6;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.6); }
  20% { opacity: 1; transform: translateY(0) scale(1.2); }
  80% { opacity: 1; transform: translateY(-20px) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1); }
}

/* ===== 젤리 버튼 ===== */
.jelly {
  display: block;
  width: 300px;
  height: 90px;
  border: none;
  background: url("image/btn_pink.png") center / 100% 100% no-repeat;
  font-family: var(--font);
  font-size: 28px;
  color: white;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding-bottom: 4px;
  transition: transform 0.1s;
}

.jelly:hover {
  transform: scale(1.06) rotate(-1deg);
}

.jelly:active {
  transform: scale(0.96);
}

.jelly.yellow {
  background-image: url("image/btn_yellow.png");
  color: #7a4a00;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.7);
}

.jelly.blue {
  background-image: url("image/btn_blue.png");
}

.jelly.locked {
  background-image: url("image/btn_blue.png");
  filter: grayscale(1) brightness(1.1);
  font-size: 20px;
  cursor: not-allowed;
}

.jelly.locked:hover {
  transform: none;
}

.text-btn {
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 18px;
  color: var(--pink-dark);
  cursor: pointer;
  margin-top: 4px;
}

/* ===== 타이틀 화면 ===== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#title-screen {
  background: url("image/title_cover.jpg") center / cover;
}

/* 표지 오른쪽에 계수정이 있어서 로고·버튼은 왼쪽 빈 공간에 */
.title-group {
  position: absolute;
  left: 250px;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.logo-wrap {
  position: relative;
}

.logo {
  font-family: 'Super Nugget', var(--font);
  font-weight: normal;
  line-height: 0.9;
  text-align: center;
  transform: rotate(-4deg);
  margin-bottom: 4px;
}

.logo .love,
.logo .doctor {
  display: block;
  -webkit-text-stroke: 5px #1d1d1d;
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #1d1d1d;
}

.logo .love {
  font-size: 80px;
  color: var(--pink);
  letter-spacing: 4px;
}

.logo .doctor {
  font-size: 66px;
  color: var(--yellow);
  letter-spacing: 2px;
  transform: rotate(3deg);
}

.heart {
  position: absolute;
  font-family: var(--font);
  font-size: 42px;
  color: var(--pink);
  -webkit-text-stroke: 3px #1d1d1d;
  paint-order: stroke fill;
}

.h1 { top: -4px; right: -34px; transform: rotate(18deg); }
.h2 { bottom: 10px; left: -36px; font-size: 32px; color: var(--blue); transform: rotate(-16deg); }

#btn-start {
  font-family: 'Super Nugget', var(--font);
  font-size: 30px;
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 20px;
  color: var(--pink-dark);
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  padding: 2px 18px;
  margin: 6px 0 8px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu .jelly {
  width: 250px;
  height: 70px;
  font-size: 25px;
}

/* ===== 이름 입력 화면 ===== */
#name-screen {
  background: url("image/title_bg.jpg") center / cover;
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 50px;
  background: rgba(255, 255, 255, 0.92);
  border: 4px solid #1d1d1d;
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--pink);
}

.panel h2 {
  font-size: 32px;
  color: var(--pink);
}

.panel p {
  font-size: 20px;
  margin-top: 6px;
}

#name-input {
  width: 300px;
  font-family: var(--font);
  font-size: 24px;
  text-align: center;
  padding: 8px;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  background: var(--pink-light);
  color: var(--ink);
  outline: none;
}

#name-input:focus {
  box-shadow: 0 0 0 4px var(--yellow);
}

#name-screen .jelly {
  width: 280px;
  height: 78px;
}

/* ===== 선택지 ===== */
#choices {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 79, 160, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

#choice-title {
  background: white;
  color: var(--pink-dark);
  border: 4px solid #1d1d1d;
  box-shadow: 4px 4px 0 var(--pink);
  padding: 8px 30px;
  font-size: 26px;
  border-radius: 14px;
}

#choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#choice-list button {
  width: 560px;
  padding: 14px 24px;
  font-family: var(--font);
  font-size: 23px;
  text-align: left;
  color: white;
  background: linear-gradient(#ff8cc6, var(--pink));
  border: 3px solid #1d1d1d;
  border-radius: 16px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), 4px 4px 0 #1d1d1d;
  text-shadow: 2px 2px 0 var(--pink-dark);
  cursor: pointer;
}

#choice-list button::before {
  content: "♥ ";
}

#choice-list button:hover {
  background: white;
  color: var(--pink);
  text-shadow: none;
  transform: translateX(6px);
}

/* ===== 미니게임 공통 ===== */
#minigame {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(40, 10, 30, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
}

#mg-panel {
  width: 640px;
  padding: 14px 24px;
  background: white;
  border: 4px solid #1d1d1d;
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--pink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#mg-title {
  font-size: 30px;
  color: var(--pink);
  text-shadow: 2px 2px 0 var(--pink-light);
}

#mg-info {
  font-size: 17px;
  color: #6b4a5a;
  text-align: center;
}

#mg-area {
  position: relative;
}

#mg-result {
  font-size: 24px;
  min-height: 32px;
}

.ok {
  color: #22a35a;
}

.bad {
  color: var(--pink-dark);
}

/* --- 메스 타이밍 바 --- */
.tbar {
  position: relative;
  width: 520px;
  height: 46px;
  margin-top: 12px;
  background: repeating-linear-gradient(45deg, var(--pink-light) 0 12px, #ffe9f3 12px 24px);
  border: 3px solid #1d1d1d;
  border-radius: 10px;
}

.tzone {
  position: absolute;
  top: 0;
  height: 100%;
  background: #5ad17a;
  border-left: 3px solid #1d1d1d;
  border-right: 3px solid #1d1d1d;
}

.tmarker {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 64px;
  margin-left: -4px;
  background: var(--pink);
  border: 2px solid #1d1d1d;
  border-radius: 4px;
}

.tries {
  margin-top: 10px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 6px;
}

/* --- 봉합 --- */
.suture-area {
  position: relative;
  width: 540px;
  height: 230px;
  background: #ffe4d6;
  border: 3px solid #1d1d1d;
  border-radius: 18px;
  overflow: hidden;
}

.suture-area svg {
  position: absolute;
  inset: 0;
}

.stitch-dot {
  position: absolute;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  border: 3px solid #1d1d1d;
  background: white;
  font-family: var(--font);
  font-size: 22px;
  color: var(--pink-dark);
  cursor: pointer;
}

.stitch-dot:hover {
  background: var(--yellow);
}

.stitch-dot.done {
  background: #5ad17a;
  color: white;
}

.timer {
  width: 540px;
  height: 14px;
  margin-top: 10px;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  overflow: hidden;
  background: #eee;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: var(--pink);
}

/* --- 바나나우유 뽑기 --- */
.claw-area {
  position: relative;
  width: 540px;
  height: 240px;
  background: linear-gradient(#c9f0ff, #eaf9ff);
  border: 3px solid #1d1d1d;
  border-radius: 18px;
  overflow: hidden;
}

.claw-rail {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 8px;
  background: #9aa;
  border-top: 2px solid #1d1d1d;
  border-bottom: 2px solid #1d1d1d;
}

.claw {
  position: absolute;
  top: 12px;
  width: 60px;
  margin-left: -30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.claw-rope {
  width: 4px;
  height: 20px;
  background: #555;
  transition: height 0.5s ease-in;
}

.claw-hand {
  font-size: 34px;
  line-height: 1;
  margin-top: -4px;
}

.claw-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--pink-light);
  border-top: 3px solid #1d1d1d;
}

.milk {
  position: absolute;
  bottom: 28px;
  width: 56px;
  height: 86px;
  margin-left: -28px;
  border: 3px solid #1d1d1d;
  border-radius: 20px 20px 14px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  transition: bottom 0.5s ease-out;
}

.milk::before {
  content: "";
  position: absolute;
  top: -12px;
  width: 26px;
  height: 12px;
  background: #5ad17a;
  border: 3px solid #1d1d1d;
  border-radius: 6px 6px 0 0;
}

.milk.banana { background: #fff1a8; }
.milk.strawberry { background: #ffc1d9; }
.milk.choco { background: #c79a7a; }

/* ===== 엔딩 화면 ===== */
#ending-screen {
  background: url("image/bg_rooftop.jpg") center / cover;
}

.ending-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 44px;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.93);
  border: 4px solid #1d1d1d;
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--pink);
  text-align: center;
}

#ending-label {
  font-size: 20px;
  color: white;
  background: var(--pink);
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  padding: 0 18px;
}

#ending-title {
  font-size: 34px;
  color: var(--pink-dark);
}

#ending-score {
  font-size: 22px;
  color: var(--pink);
}

#ending-text {
  font-size: 22px;
  margin-bottom: 6px;
}

.ending-buttons {
  display: flex;
  gap: 10px;
}

.ending-buttons .jelly {
  width: 230px;
  height: 70px;
  font-size: 24px;
}

#ending-text:empty {
  display: none;
}

/* ===== 해피 엔딩 문자 장면 ===== */
#phone-scene {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: url("image/bg_rooftop.jpg") center / cover;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

#phone-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 10, 40, 0.45);
}

#phone {
  position: relative;
  width: 270px;
  height: 500px;
  background: #fff5fa;
  border: 10px solid #1d1d1d;
  border-radius: 38px;
  box-shadow: 0 0 0 4px var(--pink), 0 0 40px rgba(255, 79, 160, 0.7);
  overflow: hidden;
  animation: phoneUp 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes phoneUp {
  from { transform: translateY(560px) rotate(8deg); }
  to { transform: translateY(0) rotate(-2deg); }
}

.phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 80px;
  height: 18px;
  margin-left: -40px;
  background: #1d1d1d;
  border-radius: 999px;
  z-index: 3;
}

.phone-header {
  padding: 34px 16px 10px;
  background: var(--pink-light);
  border-bottom: 2px solid #f3b6d0;
  font-size: 18px;
  color: var(--pink-dark);
}

#phone-noti {
  position: absolute;
  top: -80px;
  left: 10px;
  right: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid #1d1d1d;
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  z-index: 4;
  transition: top 0.4s ease-out;
}

#phone-noti.show {
  top: 30px;
}

#phone-noti b {
  display: block;
  color: var(--pink-dark);
}

#phone-chat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
}

.bubble {
  max-width: 80%;
  padding: 8px 12px;
  background: white;
  border: 2px solid #1d1d1d;
  border-radius: 4px 16px 16px 16px;
  font-size: 18px;
  animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.bubble.photo {
  padding: 4px;
}

.bubble.photo img {
  display: block;
  width: 150px;
  border-radius: 10px;
}

.bubble.dots {
  letter-spacing: 3px;
  color: #999;
  animation: pop 0.35s both, blink 0.8s infinite;
}

@keyframes pop {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes blink {
  50% { opacity: 0.4; }
}

#phone-skip {
  position: absolute;
  right: 20px;
  bottom: 14px;
  font-size: 16px;
  color: white;
  text-shadow: 1px 1px 0 #1d1d1d;
}

.burst {
  position: absolute;
  font-size: 34px;
  color: var(--pink);
  -webkit-text-stroke: 2px white;
  paint-order: stroke fill;
  pointer-events: none;
  animation: burst 1.2s ease-out forwards;
  z-index: 5;
}

@keyframes burst {
  from { transform: translate(0, 0) scale(0.4); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(1.3); opacity: 0; }
}

/* ===== 팝업 ===== */
#popup {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(40, 10, 30, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-box {
  width: 620px;
  max-height: 480px;
  overflow-y: auto;
  padding: 22px 30px;
  background: white;
  border: 4px solid #1d1d1d;
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--yellow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.popup-box h2 {
  font-size: 30px;
  color: var(--pink);
}

#popup-body {
  width: 100%;
  font-size: 19px;
  line-height: 1.6;
}

#popup-body li {
  list-style: none;
  padding: 6px 12px;
  margin-bottom: 6px;
  background: var(--pink-light);
  border: 2px solid #1d1d1d;
  border-radius: 12px;
}

#popup-body li.locked {
  background: #eee;
  color: #999;
}

.popup-box .jelly {
  width: 200px;
  height: 64px;
  font-size: 22px;
}

/* ===== 배경음악 켜기/끄기 버튼 ===== */
#btn-sound {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #1d1d1d;
  background: white;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--pink);
}

#btn-sound.off {
  opacity: 0.6;
}

/* ===== 언어 전환 버튼 ===== */
#btn-lang-unused {
  position: absolute;
  top: 10px;
  right: 58px;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #1d1d1d;
  background: var(--yellow);
  font-family: var(--font);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--pink);
}

/* 중국어일 때 한자가 있는 글꼴로 */
#game.lang-zh {
  font-family: 'Jua', "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* ===== 미니게임 누르는 버튼 (휴대폰용) ===== */
.tap-btn {
  display: block;
  margin: 8px auto 0;
  width: 300px;
  height: 58px;
  border: 4px solid #1d1d1d;
  border-radius: 999px;
  background: linear-gradient(#ff8cc6, var(--pink));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 0 5px 0 #1d1d1d;
  font-family: var(--font);
  font-size: 26px;
  color: white;
  text-shadow: 2px 2px 0 var(--pink-dark);
  cursor: pointer;
  touch-action: none;
  animation: tapPulse 0.9s infinite;
}

.tap-btn:active {
  transform: translateY(4px) scale(0.97);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 0 1px 0 #1d1d1d;
  animation: none;
}

@keyframes tapPulse {
  50% { filter: brightness(1.12); }
}

/* ============================================================
   조원진 루트 추가분
   ============================================================ */

/* 표지 A안: 위에 작은 로고 한 줄, 아래에 버튼 가로로 */
#title-screen {
  background-image: url("image/title_cover2.jpg");
}

.title-group {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transform: none;
  justify-content: space-between;
  padding: 26px 0 16px;
}

.logo {
  display: flex;
  gap: 18px;
  align-items: baseline;
  transform: rotate(-2deg);
  margin: 0;
}

.logo .love,
.logo .doctor {
  display: inline-block;
  font-size: 54px;
  -webkit-text-stroke: 4px #1d1d1d;
  text-shadow: 0 4px 0 #1d1d1d;
}

.logo .doctor {
  font-size: 54px;
  transform: rotate(2deg);
}

.h1 { top: -10px; right: -40px; font-size: 34px; }
.h2 { bottom: -2px; left: -40px; font-size: 26px; }

.logo-sub {
  display: none;
}

.menu {
  flex-direction: row;
  gap: 10px;
}

.menu .jelly {
  width: 210px;
  height: 64px;
  font-size: 23px;
}

/* 이름 화면 캐릭터 버튼 2개 */
#btn-wonjin {
  color: white;
}

/* 어두운 배경 (밤 복도) */
#bg.dim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 60, 0.5);
}

/* 화면 번쩍 */
#flash {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: white;
  opacity: 0;
  pointer-events: none;
}

#flash.play {
  animation: flash 1s ease-out;
}

@keyframes flash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* 도라지 이스터에그 */
.doraji {
  position: absolute;
  z-index: 4;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0.85;
  animation: dorajiSway 2.4s ease-in-out infinite;
}

.doraji svg {
  display: block;
  width: 100%;
  height: 100%;
}

.doraji:hover {
  opacity: 1;
  transform: scale(1.2);
}

@keyframes dorajiSway {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

#doraji-count {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 25;
  padding: 2px 12px;
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  font-size: 18px;
  color: #6b3fa0;
}

#toast {
  position: absolute;
  top: 56px;
  left: 50%;
  z-index: 26;
  min-width: 300px;
  margin-left: -150px;
  padding: 8px 16px;
  background: #f4ecff;
  border: 3px solid #1d1d1d;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #9b6bd6;
  font-size: 18px;
  text-align: center;
  pointer-events: none;
}

#toast b {
  display: block;
  color: #6b3fa0;
}

#toast.pop {
  animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

/* 문자 이벤트 (게임 중간) */
#phone-scene.sms {
  background: none;
  cursor: default;
}

#phone-scene.sms #phone-skip {
  display: none;
}

#phone {
  display: flex;
  flex-direction: column;
}

#phone-chat {
  flex: 1;
  overflow: hidden;
}

#phone-replies {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 14px;
}

#phone-replies button {
  padding: 7px 10px;
  border: 2px solid #1d1d1d;
  border-radius: 14px;
  background: var(--pink-light);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.25;
  color: var(--pink-dark);
  cursor: pointer;
  animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

#phone-replies button:hover {
  background: var(--pink);
  color: white;
}

.bubble.me {
  align-self: flex-end;
  background: var(--pink);
  color: white;
  border-radius: 16px 4px 16px 16px;
}

/* 엔딩 영상 */
#video-scene {
  position: absolute;
  inset: 0;
  z-index: 35;
  background: #120814;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#end-video {
  height: 420px;
  max-width: 100%;
  border: 4px solid white;
  border-radius: 12px;
  background: black;
}

#video-caption {
  margin-top: 10px;
  padding: 4px 18px;
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  font-size: 22px;
  color: var(--pink-dark);
}

#video-credit {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-size: 13px;
  color: #cfc2d6;
}

#video-skip {
  position: absolute;
  right: 16px;
  bottom: 12px;
  padding: 4px 14px;
  border: 2px solid white;
  border-radius: 999px;
  background: none;
  font-family: var(--font);
  font-size: 16px;
  color: white;
  cursor: pointer;
}

/* 미니게임 옆 조원진 (방해 / 커피) */
.side-wonjin {
  position: absolute;
  right: 8px;
  bottom: 40px;
  width: 150px;
  z-index: 13;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.side-wonjin.left {
  right: auto;
  left: 8px;
}

.side-wonjin img {
  width: 146px;
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 3px 0 var(--pink));
}

.side-talk {
  margin-bottom: 6px;
  padding: 6px 10px;
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 14px;
  font-size: 15px;
  text-align: center;
}

.side-wonjin.pop {
  animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

/* 심박수 게임 */
.heart-top {
  display: flex;
  justify-content: space-between;
  width: 520px;
  font-size: 18px;
}

.heart-top .bpm {
  font-size: 22px;
}

.ecg {
  display: block;
  margin-top: 4px;
  border: 3px solid #1d1d1d;
  border-radius: 10px;
}

/* 샌드위치 게임 */
.sw-head {
  display: flex;
  justify-content: space-between;
  width: 520px;
  font-size: 19px;
  color: #6b4a5a;
}

.sw-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 150px;
  justify-content: center;
}

.sw-grid {
  display: grid;
  grid-template-columns: repeat(4, 120px);
  gap: 8px;
  margin-top: 6px;
}

.sw-item {
  height: 52px;
  border: 3px solid #1d1d1d;
  border-radius: 14px;
  background: #fff8e6;
  font-family: var(--font);
  font-size: 17px;
  cursor: pointer;
  touch-action: none;
}

.sw-item.good {
  background: #c9f5d6;
}

.sw-item.wrong {
  background: #ffd0d8;
  text-decoration: line-through;
}

.sw-chop {
  font-size: 54px;
}

.sw-chop.chop {
  animation: chop 0.15s;
}

@keyframes chop {
  50% { transform: scale(0.8) rotate(-10deg); }
}

.sw-bar,
.sw-gauge {
  position: relative;
  width: 400px;
  height: 26px;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  background: white;
  overflow: hidden;
}

.sw-fill,
.sw-level {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffd1e6, var(--pink));
}

.sw-gauge {
  margin-top: 16px;
}

.sw-level {
  background: linear-gradient(90deg, #fffdf5, #ffe9b0);
  border-right: 3px solid #1d1d1d;
}

.sw-zone {
  position: absolute;
  left: 60%;
  width: 20%;
  top: 0;
  bottom: 0;
  background: rgba(60, 220, 120, 0.4);
}

.sw-note {
  margin-top: 6px;
  font-size: 17px;
}

.sw-bread {
  position: relative;
  width: 360px;
  height: 90px;
  margin: 26px 0 6px;
  border: 4px solid #8a5a2b;
  border-radius: 20px 20px 10px 10px;
  background: linear-gradient(#f6d79c, #e8b76a);
}

.sw-center {
  position: absolute;
  left: 50%;
  top: -10px;
  bottom: -10px;
  border-left: 3px dashed #d1004f;
}

.sw-knife {
  position: absolute;
  top: -40px;
  margin-left: -18px;
  font-size: 36px;
  transform: rotate(-45deg);
}

.sw-knife.down {
  top: 10px;
  transition: top 0.15s;
}

/* 엔딩 도감: 두 루트를 나란히 */
.popup-box {
  width: 720px;
  max-height: 510px;
}

#popup-body {
  min-height: 0;
  overflow-y: auto;
}

.album-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.album-cols ul {
  padding: 0;
  margin: 4px 0 0;
}

.album-cols li {
  font-size: 16px;
  line-height: 1.35;
}

/* ============================================================
   LOVE DOCTOR : SECRET 추가분
   ============================================================ */

/* 표지: SECRET 도장 + 본편 연동 배지 */
.secret-tag {
  position: absolute;
  right: -150px;
  top: 8px;
  padding: 2px 12px;
  background: #3b2a5c;
  border: 3px solid #1d1d1d;
  border-radius: 8px;
  font-family: 'Super Nugget', var(--font);
  font-size: 26px;
  letter-spacing: 2px;
  color: white;
  transform: rotate(8deg);
  box-shadow: 3px 3px 0 var(--pink);
}

#main-badge {
  position: absolute;
  bottom: 96px;
  padding: 2px 14px;
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  font-size: 16px;
  color: var(--pink-dark);
}

/* 들킬 위험 게이지 */
#danger-hud {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  font-size: 16px;
  color: #3b2a5c;
}

.danger-bar {
  width: 110px;
  height: 12px;
  border: 2px solid #1d1d1d;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}

.danger-fill {
  height: 100%;
  width: 0;
  background: #7fd4a8;
  transition: width 0.5s, background 0.5s;
}

#danger-hud.mid .danger-fill { background: #ffb347; }
#danger-hud.high .danger-fill { background: #ff4f6a; }
#danger-hud.high { color: #d0213f; }

#danger-hud.shake { animation: hudShake 0.5s; }
#danger-hud.calm { animation: pop 0.4s; }

@keyframes hudShake {
  20% { transform: translateX(-5px) rotate(-3deg); }
  40% { transform: translateX(5px) rotate(3deg); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

#toast b {
  color: #3b2a5c;
}

/* 가짜 AI 문자 입력창 */
#phone-chat {
  overflow-y: auto;
  scrollbar-width: none;
}

#phone-chat::-webkit-scrollbar {
  display: none;
}

.bubble.system {
  align-self: center;
  background: none;
  border: none;
  font-size: 14px;
  color: #999;
}

.chat-left {
  font-size: 13px;
  text-align: center;
  color: var(--pink-dark);
}

.chat-row {
  display: flex;
  gap: 6px;
}

#chat-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 2px solid #1d1d1d;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  user-select: text;
}

#chat-input:focus {
  border-color: var(--pink);
}

#chat-send {
  padding: 0 12px;
  border: 2px solid #1d1d1d;
  border-radius: 14px;
  background: var(--pink);
  font-family: var(--font);
  font-size: 15px;
  color: white;
  cursor: pointer;
}

/* 미니게임 ① 비상계단 */
.stairs-area {
  position: relative;
  width: 560px;
  height: 190px;
  border: 3px solid #1d1d1d;
  border-radius: 16px;
  background: linear-gradient(#ffe9f2 0 70%, #f7c6da 70%);
  overflow: hidden;
}

.stairs-watcher {
  position: absolute;
  left: 230px;
  top: 6px;
  width: 110px;
  text-align: center;
  transition: filter 0.2s;
}

.stairs-watcher img {
  height: 104px;
  max-width: 110px;
  object-fit: contain;
  transition: transform 0.25s;
}

.stairs-watcher b {
  display: block;
  font-size: 13px;
}

.stairs-watcher.safe img { transform: scaleX(-1); filter: grayscale(0.7) brightness(0.9); }
.stairs-watcher.warn img { animation: hudShake 0.45s infinite; }
.stairs-watcher.look img { filter: drop-shadow(0 0 6px #ff2a55) drop-shadow(0 0 2px #ff2a55); }

.stairs-talk {
  position: absolute;
  left: 100px;
  top: 6px;
  white-space: nowrap;
  padding: 2px 8px;
  background: white;
  border: 2px solid #1d1d1d;
  border-radius: 10px;
  font-size: 14px;
}

.stairs-watcher.look .stairs-talk { background: #ff4f6a; color: white; }

.stairs-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  border-top: 3px dashed #c98aa8;
}

.stairs-door {
  position: absolute;
  right: 8px;
  bottom: 30px;
  font-size: 46px;
  line-height: 1;
  text-align: center;
}

.stairs-door small {
  display: block;
  font-size: 12px;
  color: #2e9a52;
}

.stairs-me {
  position: absolute;
  bottom: 30px;
  left: 0;
  font-size: 40px;
  line-height: 1;
  transform: scaleX(-1);
}

.stairs-me.walk { animation: walkBob 0.3s infinite; }

@keyframes walkBob {
  50% { transform: scaleX(-1) translateY(-4px); }
}

.stairs-lives {
  position: absolute;
  left: 8px;
  top: 6px;
  font-size: 18px;
}

/* 미니게임 ② 단톡방 */
.gc-phone {
  width: 420px;
  border: 3px solid #1d1d1d;
  border-radius: 14px;
  overflow: hidden;
  background: #bacee0;
}

.gc-head {
  padding: 4px 12px;
  background: #a9bdd0;
  font-size: 16px;
}

.gc-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  min-height: 110px;
}

.gc-other {
  align-self: flex-start;
  padding: 4px 10px;
  background: white;
  border-radius: 4px 12px 12px 12px;
  font-size: 15px;
}

.gc-other b {
  display: block;
  font-size: 12px;
  color: #556;
}

.gc-mine {
  align-self: flex-end;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.gc-count {
  font-size: 14px;
  color: #e6b800;
  font-weight: bold;
  -webkit-text-stroke: 0.5px #8a6d00;
}

.gc-bubble {
  align-self: flex-end;
  padding: 4px 10px;
  background: #ffe94a;
  border-radius: 12px 4px 12px 12px;
  font-size: 15px;
}

.gc-bubble.deleted {
  background: #f1f1f1;
  color: #999;
  font-style: italic;
}

.gc-next {
  margin-top: 6px;
  font-size: 18px;
  color: var(--pink-dark);
}

.gc-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 520px;
  margin-top: 4px;
}

.gc-btn,
.coffee-btn {
  padding: 8px 6px;
  border: 3px solid #1d1d1d;
  border-radius: 14px;
  background: var(--pink-light);
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
}

.gc-btn:hover,
.coffee-btn:hover {
  background: var(--yellow);
}

/* 미니게임 ③ 바나나우유 */
.banana-top {
  display: flex;
  justify-content: space-between;
  width: 540px;
  font-size: 17px;
}

.banana-area {
  position: relative;
  width: 540px;
  margin-top: 6px;
}

.locker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.locker {
  height: 120px;
  border: 3px solid #1d1d1d;
  border-radius: 8px;
  background: linear-gradient(90deg, #9fb4c9, #c3d3e2 50%, #9fb4c9);
  font-size: 30px;
  cursor: pointer;
  position: relative;
}

.locker::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 52px;
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: #555;
}

.locker span {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
}

.locker.open {
  background: #fff1a8;
}

.locker-grid.locked .locker {
  filter: brightness(0.7);
}

.passer {
  position: absolute;
  top: 20px;
  left: -60px;
  font-size: 60px;
  opacity: 0;
  pointer-events: none;
}

.passer.show {
  opacity: 1;
  animation: passIn 1.3s linear forwards;
}

.passer.leave {
  opacity: 1;
  left: 600px;
  transition: left 0.4s;
}

@keyframes passIn {
  from { left: -60px; }
  to { left: 200px; }
}

/* 미니게임 ④ 장갑 */
.glove-top {
  display: flex;
  gap: 20px;
  font-size: 20px;
}

.glove-hand {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 190px;
  padding: 10px 20px 0;
}

.finger {
  width: 70px;
  border: 3px solid #1d1d1d;
  border-radius: 34px 34px 10px 10px;
  background: #eaf4ff;
  font-family: var(--font);
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 8px;
  transition: background 0.1s, transform 0.1s;
}

.finger i {
  font-style: normal;
}

.finger.f0 { height: 100px; }
.finger.f1 { height: 160px; }
.finger.f2 { height: 180px; }
.finger.f3 { height: 160px; }
.finger.f4 { height: 120px; }

.finger.lit {
  background: var(--pink);
  color: white;
  transform: translateY(-8px);
}

/* 미니게임 ⑤ 커피 */
.coffee-cup {
  font-size: 22px;
  min-height: 32px;
}

.coffee-q {
  max-width: 560px;
  font-size: 19px;
  text-align: center;
  color: var(--pink-dark);
}

.coffee-options {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.coffee-options .coffee-btn {
  width: 170px;
}

/* 미니게임 ⑥ 담요 */
.blanket-area {
  display: flex;
  margin-top: -6px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.breath-box {
  position: relative;
  width: 200px;
  height: 160px;
  flex-direction: column;
  gap: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.breath-circle {
  flex-shrink: 0;
  border: 4px solid #1d1d1d;
  border-radius: 50%;
  background: #ffd6e8;
}

.breath-circle.exhale {
  background: #b8f0cf;
}

.breath-label {
  font-size: 17px;
  white-space: nowrap;
}

.blanket-track {
  position: relative;
  width: 440px;
  height: 56px;
  border: 3px solid #1d1d1d;
  border-radius: 14px;
  background: #fff5fa;
}

.blanket {
  position: absolute;
  left: 20px;
  top: 4px;
  font-size: 40px;
  transition: left 0.4s;
}

.sleeper {
  position: absolute;
  right: 14px;
  top: 4px;
  font-size: 40px;
}

.stir-box {
  font-size: 17px;
}

/* DAY 카드 */
#day-card {
  position: absolute;
  inset: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(59, 42, 92, 0.82);
  pointer-events: none;
}

#day-card b {
  font-family: 'Super Nugget', var(--font);
  font-weight: normal;
  font-size: 56px;
  color: var(--yellow);
  -webkit-text-stroke: 4px #1d1d1d;
  paint-order: stroke fill;
  text-shadow: 0 5px 0 #1d1d1d;
}

#day-card span {
  padding: 2px 16px;
  background: white;
  border: 3px solid #1d1d1d;
  border-radius: 999px;
  font-size: 22px;
  color: var(--pink-dark);
}

#day-card.play {
  animation: cardIn 2.2s ease both;
}

@keyframes cardIn {
  0% { opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* 몰래 찍은 사진 (폴라로이드) */
#photo-scene {
  position: absolute;
  inset: 0;
  z-index: 29;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: rgba(30, 10, 40, 0.6);
  cursor: pointer;
}

.polaroid {
  position: relative;
  padding: 12px 12px 6px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transform: rotate(-3deg);
}

#photo-scene.show .polaroid {
  animation: polaroidIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes polaroidIn {
  from { transform: translateY(80px) rotate(10deg) scale(0.6); opacity: 0; }
  to { transform: rotate(-3deg); opacity: 1; }
}

.polaroid img {
  display: block;
  max-width: 560px;
  max-height: 370px;
}

.polaroid-caption {
  padding: 8px 0 4px;
  text-align: center;
  font-size: 22px;
  color: #3b2a5c;
}

.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 28px;
  margin-left: -55px;
  background: rgba(255, 214, 232, 0.85);
  transform: rotate(4deg);
}

.photo-tip {
  font-size: 18px;
  color: white;
  text-shadow: 1px 1px 0 #1d1d1d;
}

/* 표지 버튼 4개 */
.menu .jelly {
  width: 190px;
}

/* 사진첩 */
.photo-grid {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 10px 0;
}

.album-polaroid {
  width: 160px;
  padding: 8px 8px 4px;
  background: white;
  border: 2px solid #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.album-polaroid img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.album-polaroid p {
  padding-top: 6px;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}

.album-polaroid.locked {
  background: #f4f4f4;
  color: #999;
}

.photo-lock {
  height: 170px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  background: #e6e6e6;
}

.ending-buttons .jelly {
  width: 190px;
  font-size: 21px;
}

/* 사진첩: 사진이 많아지면 줄바꿈 */
.photo-grid {
  flex-wrap: wrap;
  gap: 14px;
}

.album-polaroid {
  width: 150px;
}

.album-polaroid img,
.photo-lock {
  height: 140px;
}

/* ============================================================
   📱 세로 화면 모드 (540 x 960) — 휴대폰 세로로 들었을 때
   ============================================================ */
#game.portrait {
  width: 540px;
  height: 960px;
  margin-left: -270px;
  margin-top: -480px;
}

/* 대화창은 아래쪽, 캐릭터는 더 크게 */
#game.portrait #character {
  bottom: 300px;
  height: 440px;
}

#game.portrait #char-img {
  max-width: 520px;
}

#game.portrait #dialogue-box {
  left: 12px;
  right: 12px;
  bottom: 30px;
  height: 250px;
  border-width: 46px 40px 34px 40px;
  border-image-width: 46px 40px 34px 40px;
}

#game.portrait #name-tag {
  left: -18px;
}

#game.portrait #text {
  font-size: 25px;
  padding: 0;
}

/* 선택지 */
#game.portrait #choice-title {
  max-width: 500px;
  font-size: 23px;
  padding: 8px 18px;
  text-align: center;
}

#game.portrait #choice-list button {
  width: 500px;
  font-size: 21px;
}

/* 미니게임: 패널을 세로 화면 폭에 맞게 줄여요 */
#game.portrait #mg-panel {
  width: 520px;
  padding: 14px 10px;
}

#game.portrait #mg-area {
  zoom: 0.9;
}

#game.portrait #mg-title {
  font-size: 30px;
}

#game.portrait #mg-info {
  font-size: 17px;
  text-align: center;
}

#game.portrait .side-wonjin {
  bottom: auto;
  top: 70px;
  right: 6px;
  width: 120px;
}

#game.portrait .side-wonjin img {
  width: 110px;
}

/* 문자 화면: 휴대폰을 화면 가득 */
#game.portrait #phone {
  width: 470px;
  height: 820px;
  border-radius: 44px;
}

#game.portrait .phone-header {
  font-size: 22px;
}

#game.portrait .bubble {
  font-size: 21px;
}

#game.portrait .bubble.photo img {
  width: 230px;
}

#game.portrait #chat-input,
#game.portrait #chat-send {
  font-size: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#game.portrait .chat-left {
  font-size: 16px;
}

/* 표지: 로고 위, 버튼은 아래 2줄 */
#game.portrait .title-group {
  padding: 40px 0 30px;
}

#game.portrait .logo {
  flex-direction: column;
  align-items: center;
  gap: 0;
}

#game.portrait .logo .love,
#game.portrait .logo .doctor {
  font-size: 64px;
}

#game.portrait .secret-tag {
  right: -40px;
  top: auto;
  bottom: -26px;
}

#game.portrait .menu {
  flex-wrap: wrap;
  justify-content: center;
  width: 480px;
}

#game.portrait .menu .jelly {
  width: 225px;
  height: 70px;
}

#game.portrait #main-badge {
  bottom: 200px;
}

/* 이름 입력 / 엔딩 / 팝업 */
#game.portrait .panel {
  padding: 26px 30px;
}

#game.portrait .ending-box {
  max-width: 500px;
  padding: 26px 20px;
}

#game.portrait #ending-title {
  font-size: 30px;
}

#game.portrait #ending-score,
#game.portrait #ending-text {
  font-size: 19px;
}

#game.portrait .ending-buttons {
  flex-direction: column;
}

#game.portrait .ending-buttons .jelly {
  width: 300px;
}

#game.portrait .popup-box {
  width: 510px;
  max-height: 860px;
  padding: 22px 16px;
}

#game.portrait .album-cols {
  grid-template-columns: 1fr;
}

#game.portrait .polaroid img {
  max-width: 470px;
  max-height: 560px;
}

/* DAY 카드 */
#game.portrait #day-card b {
  font-size: 46px;
  text-align: center;
}

#game.portrait #phone {
  height: calc(100% - 140px);
  max-height: 1000px;
}
