/* =========================================================
   BOOK CHECK-IN — style.css
   디자인 토큰은 클라이언트가 확정한 BOOK_CHECKIN_layout_preview.html
   의 CSS 변수를 그대로 계승한다 (Black / Gold / White, 호텔 체크인 카드 톤).
   ========================================================= */

:root {
  --black: #050505;
  --black2: #111111;
  --gold: #c8a24a;
  --gold2: #e6cf8a;
  --white: #f7f2e8;
  --muted: #b8ad9a;
  --line: rgba(200, 162, 74, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  letter-spacing: -0.02em;
}

/* =========================================================
   레이아웃 — 모바일 우선, 데스크톱은 중앙 카드형
   ========================================================= */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 12px 44px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 480px;
}

.screen.is-active {
  display: block;
  animation: fade-in 0.5s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 0%, rgba(200, 162, 74, 0.16), transparent 32%),
    linear-gradient(180deg, var(--black2) 0%, var(--black) 100%);
  padding: 32px 13px 36px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 30px 80px rgba(0, 0, 0, 0.5);
  position: relative;
}

.card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
}

/* =========================================================
   공용 텍스트 스타일
   ========================================================= */

.kicker {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.logo {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold2);
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 10px;
  text-align: center;
}

.copy {
  font-size: 15px;
  line-height: 1.75;
  color: #efe8dc;
  text-align: center;
  margin: 0 0 8px;
  white-space: pre-line;
}

.small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  margin: 0 0 22px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

/* =========================================================
   버튼
   ========================================================= */

.btn {
  display: block;
  width: 100%;
  border: 1px solid var(--gold);
  color: var(--gold2);
  background: rgba(200, 162, 74, 0.06);
  border-radius: 999px;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 14px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.18s ease;
  font-family: inherit;
}

.btn:hover {
  background: rgba(200, 162, 74, 0.14);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: rgba(200, 162, 74, 0.1);
}

.btn-outline {
  background: transparent;
}

/* =========================================================
   INTRO
   ========================================================= */

.cover {
  width: 70%;
  max-width: 240px;
  display: block;
  margin: 14px auto 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.7);
}

/* Intro copy("그저,...")를 표지 쪽으로 살짝 끌어올려 자연스럽게 연결 */
.intro-copy {
  margin-top: -4px;
}

/* =========================================================
   QUESTION
   ========================================================= */

.progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 12.5%;
  background: var(--gold2);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.progress-label {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 26px;
}

.question-title {
  color: var(--gold2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  margin: 0 0 4px;
}

.question-body {
  font-size: 22px;
  line-height: 1.4;
  margin: 0 0 22px;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  border: 1px solid rgba(200, 162, 74, 0.32);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 13px 15px;
  color: #f5eedf;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.18s ease;
}

.option:hover {
  border-color: var(--gold2);
  color: var(--gold2);
}

.option:active {
  transform: scale(0.98);
}

/* =========================================================
   LOADING
   ========================================================= */

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(200, 162, 74, 0.25);
  border-top-color: var(--gold);
  margin-bottom: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-line {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 2px 0;
}

/* =========================================================
   RESULT
   ========================================================= */

/* 결과 카드 배경: 골드 라디얼 악센트 + 어두운 오버레이 + cover.jpg를 한 요소에 겹쳐서
   카드 자체가 화면을 꽉 채우고 있어도 배경 사진이 은은하게 비치도록 처리
   (#screen-result에 배경을 걸면 카드가 화면을 완전히 덮어 보이지 않으므로 .card에 직접 적용)
   표지 전체가 아니라 확대해서 커튼/백합/가면 일부가 자연스럽게 잘려 보이도록 구성 */
#screen-result .card {
  background-image: radial-gradient(circle at 50% 0%, rgba(200, 162, 74, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.85) 0%, rgba(5, 5, 5, 0.9) 100%), url("cover.jpg");
  background-size: auto, auto, 160%;
  background-position: center, center, center top;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

.result-title {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold2);
  font-size: 24px;
  line-height: 1.25;
  text-align: center;
  margin: 0 0 20px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px;
  background: rgba(5, 5, 5, 0.6);
  margin: 0 0 6px;
}

.label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 16px 0 0;
}

.label:first-child {
  margin-top: 0;
}

.value {
  color: var(--gold2);
  font-size: 24px;
  font-family: Georgia, "Times New Roman", serif;
  margin: 6px 0 0;
}

.result-card .copy {
  text-align: left;
  margin-top: 6px;
}

/* 첨부 PNG 로고: 가운데 정렬, 모바일 기준 140~180px, 비율 유지 */
.brand-logo {
  display: block;
  width: 160px;
  max-width: 45%;
  margin: 4px auto 4px;
  object-fit: contain;
}

/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: rgba(17, 17, 17, 0.96);
  border: 1px solid var(--line);
  color: var(--white);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 18px;
  border-radius: 14px;
  max-width: 90%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================
   반응형 — 390px 모바일 기준 보정
   ========================================================= */

@media (max-width: 380px) {
  .card {
    padding: 26px 13px 30px;
  }

  .question-body {
    font-size: 20px;
  }

  .logo {
    font-size: 28px;
  }
}

/* 세로 높이가 짧은 기기(iPhone 13, Galaxy S24 등)에서
   질문+선택지 화면이 스크롤 없이 한 화면에 들어오도록 여백을 한 번 더 압축 */
@media (max-height: 720px) {
  .page {
    padding: 18px 12px 28px;
    align-items: center;
  }

  .card {
    padding: 22px 13px 24px;
  }

  .progress-label {
    margin: 8px 0 18px;
  }

  .question-title {
    margin-bottom: 2px;
  }

  .question-body {
    margin-bottom: 16px;
  }

  .option-list {
    gap: 9px;
  }

  .option {
    padding: 11px 15px;
  }
}

