:root {
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #d7dbe3;
  --bg: #f4f5f7;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(31, 36, 48, 0.12);
  --shadow-sm: 0 3px 10px rgba(31, 36, 48, 0.10);
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

.wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
}

/* 화면 전환 */
.screen { display: none; width: 100%; max-width: 460px; }
.screen.active { display: block; animation: fade 0.45s ease both; }

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

/* 카드 — 색 대신 음영+테두리로 구분 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 26px;
}
.card.center { text-align: center; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 14px;
}

h1 { font-size: 26px; line-height: 1.35; margin-bottom: 16px; }
.lead { color: var(--muted); margin-bottom: 26px; }
.note { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* 버튼 */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* 진행바 */
.progress {
  height: 8px;
  background: #e4e7ec;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 99px;
  transition: width 0.35s ease;
}
.q-count { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.q-text { font-size: 21px; line-height: 1.4; margin-bottom: 22px; }

.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.option:hover { box-shadow: var(--shadow); }
.option:active { transform: translateY(1px); }

/* 스피너 */
.spinner {
  width: 46px; height: 46px;
  margin: 6px auto 22px;
  border: 4px solid #e4e7ec;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 리빌 — 여긴 축하 연출이라 색 사용 */
.screen.reveal { max-width: 560px; }
.reveal-inner {
  position: relative;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 48px 28px;
  z-index: 2;
}
.reveal-eyebrow { color: var(--muted); font-size: 13px; letter-spacing: 0.12em; margin-bottom: 14px; }
.reveal-title { font-size: 40px; line-height: 1.2; margin-bottom: 14px; }
.reveal-title .boy { color: #3b82f6; }
.reveal-sub { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.reveal-foot { color: var(--muted); margin-bottom: 28px; }
.reveal .btn { max-width: 240px; margin: 0 auto; }

/* 풍선 */
.balloons { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.balloon {
  position: absolute;
  bottom: -140px;
  width: 46px; height: 58px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  opacity: 0.9;
  animation: rise linear forwards;
}
.balloon::after {
  content: "";
  position: absolute;
  bottom: -42px; left: 50%;
  width: 1px; height: 42px;
  background: rgba(0,0,0,0.18);
  transform: translateX(-50%);
}
@keyframes rise {
  to { transform: translateY(-115vh) rotate(8deg); opacity: 0; }
}

/* 데스크톱 차단 */
.desktop-block {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  z-index: 1000;
}
.desktop-block .card { max-width: 420px; }
.db-emoji { font-size: 52px; margin-bottom: 14px; }
.db-url {
  margin-top: 18px;
  font-size: 14px;
  word-break: break-all;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
/* 차단 활성 시 본문 숨김 */
body.locked .wrap { display: none; }

/* 카메라 리액션 */
.cam-box { margin: 8px 0 24px; }
.cam-status { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.cam-video {
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: #000;
  transform: scaleX(-1); /* 거울 모드 */
  margin: 0 auto 14px;
  display: block;
}
.cam-box .btn { max-width: 240px; margin: 0 auto; text-decoration: none; }

@media (max-width: 380px) {
  h1 { font-size: 23px; }
  .reveal-title { font-size: 32px; }
  .card { padding: 28px 20px; }
}
