/* =================================================================
   세종 굿즈 월드컵 - 스타일
   포인트 컬러는 아래 --sejong 한 곳만 바꾸면 전체 반영됩니다.
   ⚠️ 세종문화회관 공식 황색 HEX는 추가 확인 필요(현재 임시 골드).
   ================================================================= */
:root {
  --sejong: #C9A227;       /* 메인 황색(포인트) */
  --sejong-dark: #A6841A;  /* 버튼 hover/강조 */
  --sejong-soft: #F6EFD6;  /* 배경 틴트 */
  --black: #111111;
  --gray-100: #f4f4f4;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-500: #737373;
  --gray-600: #525252;
  --red: #dc2626;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--black);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
}

/* 화면 전환 */
.screen { display: none; min-height: 100dvh; padding: 24px 20px; }
.screen.is-active { display: block; animation: fadeUp .35s ease both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(.96); } 100% { transform: scale(1); } }
.pop { animation: pop .18s ease-out; }

/* 공통 요소 */
.badge {
  display: inline-block;
  background: var(--sejong-soft);
  color: var(--sejong-dark);
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
}
.btn {
  width: 100%;
  border: none; border-radius: 16px;
  padding: 18px; font-size: 17px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  transition: background .15s, transform .1s;
}
.btn:active { animation: pop .18s ease-out; }
.btn-primary { background: var(--sejong); color: #000; box-shadow: 0 4px 14px rgba(201,162,39,.25); }
.btn-primary:active { background: var(--sejong-dark); }
.btn-primary:disabled { opacity: .6; }
.btn-outline { background: #fff; color: var(--black); border: 2px solid var(--black); }

/* 1. 인트로 */
.brand-logo { width: 118px; height: auto; display: block; margin: 0 auto 28px; }
.intro { display: flex; flex-direction: column; justify-content: space-between; min-height: calc(100dvh - 48px); text-align: center; }
.intro-top { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 0; }
.title { font-size: 42px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 18px 0 0; }
.accent { color: var(--sejong); }
.lead { font-size: 16px; color: var(--gray-600); line-height: 1.6; margin-top: 22px; }
.intro-sub { margin-top: 36px; font-size: 14px; color: var(--gray-500); }
.intro-sub p { margin: 4px 0; }

/* 2. 월드컵 */
.wc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.round-label { background: #000; color: #fff; font-size: 14px; font-weight: 700; padding: 5px 14px; border-radius: 999px; }
.round-progress { font-size: 14px; font-weight: 500; color: var(--gray-500); }
.progress-track { height: 6px; background: var(--gray-100); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.progress-bar { height: 100%; background: var(--sejong); width: 12.5%; border-radius: 999px; transition: width .3s; }
.wc-question { text-align: center; font-size: 18px; font-weight: 700; margin: 0 0 18px; }
.match { display: flex; flex-direction: column; gap: 12px; }
.vs { align-self: center; border: 1px solid var(--gray-300); background: #fff; color: var(--gray-600); font-weight: 800; font-size: 14px; padding: 4px 16px; border-radius: 999px; }
.hint { text-align: center; font-size: 12px; color: #aaa; margin-top: 22px; }

/* 카드 */
.card {
  display: flex; flex-direction: column; width: 100%;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 18px;
  overflow: hidden; cursor: pointer; text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: border-color .15s;
}
.card:active { animation: pop .18s ease-out; border-color: var(--sejong); }
.card-img { position: relative; aspect-ratio: 1/1; width: 100%; background: var(--gray-100); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img .placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #aaa; }
.card-img .placeholder .emoji { font-size: 30px; }
.card-img .placeholder .txt { font-size: 12px; }
.card-cat { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; }
.card-body { min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 12px 14px; }
.card-name { font-size: 15px; font-weight: 700; line-height: 1.35; }
.card-desc { margin: 6px 0 0; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--gray-500); word-break: keep-all; }

/* 3. 결과 */
.result { display: flex; flex-direction: column; align-items: center; text-align: center; }
.winner-card { width: 100%; max-width: 360px; margin-top: 16px; border: 1px solid var(--gray-200); border-radius: 24px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.winner-img { position: relative; aspect-ratio: 1/1; width: 100%; background: var(--gray-100); }
.winner-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.winner-img .placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #aaa; }
.winner-img .placeholder .emoji { font-size: 40px; }
.winner-name { background: #000; padding: 16px; }
.winner-tag { color: var(--sejong); font-size: 12px; margin: 0; }
.winner-title { color: #fff; font-size: 20px; font-weight: 700; margin: 4px 0 0; }

.form { width: 100%; max-width: 360px; margin-top: 28px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.form input[type="text"], .form input[type="tel"] {
  width: 100%; border: 1px solid var(--gray-300); border-radius: 12px;
  padding: 15px; font-size: 16px; outline: none; font-family: inherit;
}
.form input:focus { border-color: var(--sejong); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--gray-600); cursor: pointer; padding: 2px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sejong); flex-shrink: 0; }
.consent small { display: block; font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.paper-note { margin: -2px 0 0; padding: 12px; border-radius: 12px; background: var(--gray-100); color: var(--gray-600); font-size: 13px; line-height: 1.5; word-break: keep-all; }
.form-error { color: var(--red); font-size: 14px; font-weight: 500; margin: 0; min-height: 18px; }
#btn-submit { max-width: 360px; margin-top: 22px; }

/* 4. 뽑기 */
.draw { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: calc(100dvh - 48px); }
.gift-box { width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; background: #111; border-radius: 28px; font-size: 64px; margin: 32px auto 0; }
.gift-box.shake { animation: pop .4s ease-in-out infinite; }
.draw-guide { font-size: 16px; color: var(--gray-600); margin: 28px 0; }
#btn-draw { max-width: 360px; }
.draw-result { animation: fadeUp .35s ease both; }
.result-icon { width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; border-radius: 28px; font-size: 64px; margin: 0 auto; background: var(--sejong-soft); }
.result-icon.lose { background: var(--gray-100); }
.result-sub { font-size: 14px; color: var(--gray-500); margin: 28px 0 8px; }
.result-prize { font-size: 30px; font-weight: 800; margin: 0; }
.result-desc { font-size: 14px; color: var(--gray-600); margin: 12px 0 0; }
.save-note { font-size: 13px; color: var(--red); font-weight: 500; margin-top: 14px; }
#btn-restart { max-width: 360px; margin-top: 36px; }
