/* 펭구오픽 모의고사 설문 전용 스타일
 * 기존 설문 마크업/JS는 그대로 두고, body.exam-survey 범위에서만
 * 벚꽃/핑크 톤을 홈탭의 북극 펭귄 톤으로 덮어쓴다.
 */

body.exam-survey {
  min-height: 100vh;
  background-color: var(--color-bg);
  background-image: url('/static/images/penguopic/bg-mobile.png');
  background-size: cover;
  background-position: center -140px;
  background-repeat: no-repeat;
  background-attachment: scroll;
  color: var(--color-text);
  font-family: var(--font-family-base);
  overflow-x: hidden;
}

body.exam-survey::after,
body.exam-survey::before {
  content: none !important;
  display: none !important;
}

body.exam-survey .exam-shell {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 24px 20px 0;
}

@supports (background-image: image-set(url('/static/images/penguopic/bg-mobile.webp') type('image/webp'))) {
  body.exam-survey {
    background-image: image-set(
      url('/static/images/penguopic/bg-mobile.webp') type('image/webp'),
      url('/static/images/penguopic/bg-mobile.png') type('image/png')
    );
  }
}

@keyframes examSurveyReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes examSurveyMascotBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1.5deg); }
}

@keyframes examSurveyCtaGlow {
  0%, 100% { box-shadow: 0 12px 24px rgba(6, 42, 88, 0.18); }
  50% { box-shadow: 0 16px 32px rgba(47, 128, 231, 0.22); }
}

body.exam-survey .pengu-page-hero {
  animation: examSurveyReveal 0.52s ease-out both;
}

body.exam-survey .pengu-page-hero-mascot,
body.exam-survey .exam-hero-mascot {
  transform-origin: center bottom;
  animation: examSurveyMascotBob 5.2s ease-in-out infinite;
}

body.exam-survey .exam-hero {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 30px 8px 0;
}

body.exam-survey .exam-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

body.exam-survey .exam-title-icon {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(36, 59, 83, 0.11);
}

body.exam-survey .exam-title-row h1 {
  margin: 0;
  color: var(--color-navy);
  font-size: 2.55rem;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -1.6px;
  text-shadow: none;
}

body.exam-survey .exam-title-row p {
  margin: 10px 0 0;
  color: #425873;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

body.exam-survey .exam-hero-mascot {
  width: 120px;
  height: 120px;
  object-fit: contain;
  align-self: flex-start;
  margin-top: 2px;
  margin-right: -6px;
  filter: drop-shadow(0 8px 18px rgba(36, 59, 83, 0.12));
}

body.exam-survey .container {
  max-width: 720px;
  padding: 8px 18px var(--app-bottom-content-space, calc(96px + env(safe-area-inset-bottom)));
}

@media (max-width: 560px) {
  body.exam-survey .exam-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.exam-survey .exam-title-row h1 {
    font-size: 2.2rem;
  }

  body.exam-survey .exam-title-icon {
    width: 52px;
    height: 52px;
  }

  body.exam-survey .exam-hero-mascot {
    width: 104px;
    height: 104px;
    margin-right: -12px;
  }
}

@media (min-width: 768px) {
  body.exam-survey .exam-shell {
    padding-top: 48px;
  }

  body.exam-survey .exam-hero {
    min-height: 210px;
    padding-left: 28px;
    padding-right: 28px;
  }

  body.exam-survey .exam-title-row h1 {
    font-size: 3rem;
  }

  body.exam-survey .exam-hero-mascot {
    width: 150px;
    height: 150px;
  }
}

body.exam-survey .survey-mode-card,
body.exam-survey .survey-part-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border-soft);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(36, 59, 83, 0.11);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: examSurveyReveal 0.5s ease-out both;
}

body.exam-survey .survey-mode-card { animation-delay: 80ms; }
body.exam-survey .survey-part-card:nth-of-type(1) { animation-delay: 130ms; }
body.exam-survey .survey-part-card:nth-of-type(2) { animation-delay: 190ms; }
body.exam-survey .survey-part-card:nth-of-type(3) { animation-delay: 250ms; }
body.exam-survey .survey-part-card:nth-of-type(4) { animation-delay: 310ms; }

body.exam-survey .survey-mode-card {
  padding: 18px;
  margin-bottom: 16px;
}

body.exam-survey .survey-mode-label {
  color: var(--color-navy);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: left;
  margin: 0 0 16px;
  padding-left: 4px;
}

body.exam-survey .survey-mode-btns {
  gap: 10px;
}

body.exam-survey .survey-mode-btn {
  position: relative;
  min-height: 92px;
  border: 1.5px solid #e3e8ef;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: #3f4f5f;
  box-shadow: var(--shadow-soft);
}

body.exam-survey .survey-mode-btn::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 18px;
  height: 18px;
  border: 2px solid #cfd8e3;
  border-radius: 50%;
  background: #fff;
  transition: all 0.16s;
}

body.exam-survey .survey-mode-btn:hover {
  border-color: #b8c4d1;
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
}

body.exam-survey .survey-mode-btn.active {
  border-color: #2f80e7;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(236, 247, 255, 0.96) 100%);
  color: var(--color-navy);
  box-shadow: 0 10px 22px rgba(47, 128, 231, 0.16);
}

body.exam-survey .survey-mode-btn.active::before {
  content: '✓';
  border-color: #2f80e7;
  background: #2f80e7;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

body.exam-survey .survey-mode-desc,
body.exam-survey .survey-mode-btn.active .survey-mode-desc {
  color: var(--color-muted);
}

body.exam-survey .survey-part-card {
  padding: 20px;
  margin-bottom: 16px;
}

body.exam-survey .survey-part-header {
  margin-bottom: 16px;
}

body.exam-survey .survey-part-badge {
  color: #fff;
  background: linear-gradient(135deg, #2f80e7, #1764c8);
  border: 1px solid rgba(23, 100, 200, 0.16);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  letter-spacing: 0;
  box-shadow: 0 6px 14px rgba(47, 128, 231, 0.18);
}

body.exam-survey .survey-count-badge {
  color: var(--color-navy-soft);
  background: rgba(244, 251, 255, 0.92);
  border: 1px solid var(--color-border-soft);
}

body.exam-survey .survey-count-badge.over {
  color: var(--color-navy);
  background: var(--color-mint);
  border-color: rgba(109, 211, 160, 0.45);
}

body.exam-survey .survey-question {
  color: var(--color-navy);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.25px;
}

body.exam-survey .survey-sub-question {
  border-top-color: rgba(190, 233, 247, 0.65);
}

body.exam-survey .survey-sub-label {
  color: var(--color-navy-soft);
  font-size: 0.92rem;
  letter-spacing: -0.15px;
}

body.exam-survey .survey-min-hint {
  color: var(--color-muted);
}

body.exam-survey .survey-radio-item,
body.exam-survey .survey-check-item {
  border-color: #e3e8ef;
  background: rgba(255, 255, 255, 0.82);
  color: #4f5f6f;
  word-break: keep-all;
}

body.exam-survey .survey-radio-item:hover,
body.exam-survey .survey-check-item:hover {
  border-color: #b8c4d1;
  background: rgba(255, 255, 255, 0.94);
}

body.exam-survey .survey-radio-item:has(input:checked),
body.exam-survey .survey-check-item:has(input:checked) {
  border-color: #2f80e7;
  background: rgba(236, 247, 255, 0.92);
  color: var(--color-navy);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(47, 128, 231, 0.12);
}

body.exam-survey .survey-radio-custom,
body.exam-survey .survey-check-custom {
  border-color: #cfd8e3;
  background: rgba(255, 255, 255, 0.78);
}

body.exam-survey .survey-radio-item:has(input:checked) .survey-radio-custom,
body.exam-survey .survey-check-item:has(input:checked) .survey-check-custom {
  border-color: #2f80e7;
  background: #2f80e7;
}

body.exam-survey .survey-error {
  color: #b4233b;
  background: rgba(255, 239, 242, 0.94);
  border-color: rgba(224, 71, 87, 0.22);
  border-radius: var(--radius-md);
}

body.exam-survey .survey-submit-btn {
  min-height: 56px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--color-navy), #102b49);
  color: var(--color-cta-fg);
  box-shadow: var(--shadow-cta);
  letter-spacing: -0.1px;
  animation: examSurveyReveal 0.48s ease-out 360ms both, examSurveyCtaGlow 3.4s ease-in-out 1s infinite;
}

body.exam-survey .survey-submit-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--color-navy-soft), var(--color-navy));
}

body.exam-survey .bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(190, 233, 247, 0.55);
  box-shadow: 0 -8px 24px rgba(36, 59, 83, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.exam-survey .bottom-nav-item {
  color: #8d9aa6;
}

body.exam-survey .bottom-nav-item.active,
body.exam-survey .bottom-nav-item:hover {
  color: var(--color-navy);
}

body.exam-survey .bottom-nav-svg {
  filter: grayscale(1) opacity(0.62);
}

body.exam-survey .bottom-nav-item.active .bottom-nav-svg {
  filter: brightness(0) saturate(100%) invert(20%) sepia(22%) saturate(1270%) hue-rotate(169deg) brightness(91%) contrast(89%);
}

@media (max-width: 360px) {
  body.exam-survey .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.exam-survey .survey-mode-btns {
    flex-direction: column;
  }

  body.exam-survey .survey-check-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  body.exam-survey {
    background-color: #E8F4FB;
    background-image: url('/static/images/penguopic/bg-desktop.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  body.exam-survey header {
    padding-top: 34px;
  }

  body.exam-survey .container {
    max-width: 820px;
    padding-top: 24px;
  }

  body.exam-survey .survey-mode-card,
  body.exam-survey .survey-part-card {
    border-radius: 26px;
  }

  body.exam-survey .survey-check-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }
}

@media (min-width: 1024px) {
  @supports (background-image: image-set(url('/static/images/penguopic/bg-desktop.webp') type('image/webp'))) {
    body.exam-survey {
      background-image: image-set(
        url('/static/images/penguopic/bg-desktop.webp') type('image/webp'),
        url('/static/images/penguopic/bg-desktop.png') type('image/png')
      );
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  body.exam-survey *,
  body.exam-survey *::before,
  body.exam-survey *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  body.exam-survey .pengu-page-hero,
  body.exam-survey .pengu-page-hero-mascot,
  body.exam-survey .exam-hero-mascot,
  body.exam-survey .survey-mode-card,
  body.exam-survey .survey-part-card,
  body.exam-survey .survey-submit-btn {
    transform: none !important;
  }
}
