/* 펭구오픽 홈 전용 스타일
 * body.home 스코프로 한정해서 기존 핑크 배경/오버레이를 무력화.
 * static/css/style.css 는 손대지 않음.
 *
 * 분기점: 1024px
 *  - <1024px: 모바일 시안 (북극 미니멀 1차)
 *  - ≥1024px: 데스크탑 시안 (북극 일러스트 풀배경 + 2열 hero + 상단 가로 네비)
 */

/* === 기존 벚꽃/오버레이 무력화 (홈에서만) === */
body.home {
  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);
}
@supports (background-image: image-set(url('/static/images/penguopic/bg-mobile.webp') type('image/webp'))) {
  body.home {
    background-image: image-set(
      url('/static/images/penguopic/bg-mobile.webp') type('image/webp'),
      url('/static/images/penguopic/bg-mobile.png') type('image/png')
    );
  }
}
body.home::after  { content: none !important; display: none !important; }
body.home::before { content: none !important; display: none !important; }

/* === 데스크탑/모바일 가시성 토글 (기본: 모바일) === */
body.home .home-header--desktop { display: none; }
body.home .home-hero--desktop   { display: none; }
body.home .desktop-only,
body.home .value-desktop-only   { display: none; }
body.home .record-mobile-only   { display: block; }
body.home .record-inline-label  { display: none; }
body.home .mobile-status-cards,
body.home .mobile-fishing       { display: block; }

/* === 모바일 헤더 === */
body.home .home-header--mobile {
  background: transparent;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-4) 8px;
  position: relative;
  z-index: 1;
}
body.home .mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-navy);
}
body.home .mobile-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
body.home .mobile-brand-logo-wrap {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
body.home .mobile-brand-text {
  font-size: 1.4rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.5px;
  color: var(--color-navy);
}
body.home .home-brand {
  font-size: 1.6rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.5px;
  color: var(--color-navy);
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
body.home .home-header--mobile .header-auth {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
body.home .home-header--mobile .header-auth a {
  color: var(--color-navy-soft);
  border: 1px solid var(--color-secondary-border);
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
body.home .home-header--mobile .header-auth a:hover {
  background: var(--color-ice-blue);
  border-color: var(--color-accent-blue);
}
body.home .home-header--mobile .header-auth span {
  color: var(--color-navy);
  opacity: 0.85;
  font-size: var(--font-size-sm);
}

/* === 컨테이너 === */
body.home .home-container { max-width: 720px; }
body.home .section.active {
  animation: homeSectionEnter 0.24s ease-out both;
}

/* === 앱형 진입/마스코트 모션 (가벼운 transform/opacity only) === */
@keyframes homeFadeRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes homeSectionEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes homeHeroTextEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(8px); }
}
@keyframes homeStatsEnter {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(-16px); }
}
@keyframes homeMascotMobileBob {
  0%, 100% { transform: translateY(-20px); }
  50%      { transform: translateY(-25px); }
}
@keyframes homeMascotDesktopBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes homeMascotDesktopEnter {
  from { opacity: 0; transform: translate(-24px, 28px); }
  to   { opacity: 1; transform: translate(-24px, 14px); }
}
@keyframes homeSoftGlow {
  0%, 100% { box-shadow: var(--shadow-cta); }
  50%      { box-shadow: 0 10px 24px rgba(47, 128, 231, 0.22); }
}
@keyframes homeCtaSheen {
  from { transform: translateX(-140%) skewX(-18deg); }
  to   { transform: translateX(260%) skewX(-18deg); }
}
@keyframes homeLoadingFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-6px) rotate(1deg); }
}
@keyframes homeLoadingDot {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-4px); }
}
@keyframes homeResultReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes homeWaveSpeak {
  0%, 100% { transform: scaleY(0.72); opacity: 0.42; }
  50%      { transform: scaleY(1.18); opacity: 1; }
}

/* === 모바일 Hero (인사 + 상태 카드 + 마스코트) === */
body.home .home-hero--mobile {
  text-align: left;
  margin: 0 0 8px;
}
body.home .mobile-hero-text {
  margin-bottom: 4px;
  transform: translateY(8px);
  animation: homeHeroTextEnter 0.48s ease-out both;
}
body.home .mobile-greeting {
  font-size: 1.58rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  letter-spacing: -0.5px;
  margin: 0 0 var(--space-1);
  line-height: 1.2;
}
body.home .mobile-greeting-sub {
  font-size: 1.13rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  letter-spacing: -0.4px;
  margin: 0;
  line-height: 1.3;
}
body.home .accent-pengu {
  color: var(--color-accent-blue);
}
body.home .mobile-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
body.home .mobile-stats-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-soft);
  flex: 1;
  max-width: 240px;
  transform: translateY(-16px);
  animation: homeStatsEnter 0.5s ease-out 0.08s both;
}
body.home .mobile-stats-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
}
body.home .mobile-stats-label {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: var(--font-weight-medium);
}
body.home .mobile-stats-value {
  color: var(--color-accent-blue);
  font-size: 1.4rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.3px;
  line-height: 1;
}
body.home .mobile-stats-divider {
  width: 1px;
  align-self: stretch;
  background: var(--color-border-soft);
}
body.home .mobile-hero-mascot {
  width: 38vw;
  max-width: 150px;
  flex-shrink: 0;
  margin-top: -10px;
  transform: translateY(-20px);
  animation: homeMascotMobileBob 4.8s ease-in-out infinite;
  transform-origin: 50% 80%;
}
body.home .mobile-hero-mascot-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(36, 59, 83, 0.12));
}

/* 기존 home-headline / home-subcopy / home-badges 데스크탑 hero에서 사용됨 */
body.home .home-headline {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  line-height: var(--line-height-tight);
  letter-spacing: -0.4px;
  text-shadow: none;
  margin: 0 0 var(--space-3);
}
body.home .home-subcopy {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  margin: 0 0 var(--space-4);
}
body.home .home-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
}
body.home .home-badge {
  background: var(--color-surface);
  color: var(--color-navy);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  letter-spacing: -0.2px;
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-soft);
}

/* === 진단 카드 === */
body.home .diagnosis-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  box-shadow: var(--shadow-card);
  max-width: 380px;
  margin: -52px auto 14px;
  animation: homeFadeRise 0.52s ease-out 0.16s both;
}
body.home .diagnosis-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  text-align: left;
  margin-bottom: var(--space-4);
}
body.home .diagnosis-title {
  font-size: 1.3rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  margin: 0;
  letter-spacing: -0.3px;
}
body.home .diagnosis-tags {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 0;
}
body.home .diagnosis-tag {
  display: inline-block;
  background: var(--color-ice-blue);
  color: var(--color-navy);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: -0.2px;
}
body.home .diagnosis-tag-type { background: var(--color-mint); }
body.home .diagnosis-tag:empty { display: none; }
body.home .diagnosis-question {
  display: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem;
  color: var(--color-navy);
  text-align: left;
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}
body.home .diagnosis-question:empty { display: none; }
body.home .diagnosis-waveform {
  text-align: center;
  color: var(--color-muted);
  margin: var(--space-2) auto var(--space-4);
  max-width: 220px;
}
body.home .diagnosis-waveform svg {
  width: 100%;
  height: 28px;
}
body.home .diagnosis-waveform rect {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
body.home .diagnosis-card.is-recording .diagnosis-waveform {
  color: #E04757;
}
body.home .diagnosis-card.is-recording .diagnosis-waveform rect {
  animation: homeWaveSpeak 0.72s ease-in-out infinite;
}
body.home .diagnosis-card.is-recording .diagnosis-waveform rect:nth-child(3n) {
  animation-delay: 0.1s;
}
body.home .diagnosis-card.is-recording .diagnosis-waveform rect:nth-child(3n + 1) {
  animation-delay: 0.2s;
}
body.home .diagnosis-card.is-ready .diagnosis-waveform {
  color: var(--color-accent-blue);
}
body.home .diagnosis-card.is-error .diagnosis-waveform {
  color: #E04757;
  opacity: 0.78;
}

/* CTA 행 */
body.home .diagnosis-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin: 10px 0 14px;
}

/* 듣기 (보조 CTA) */
body.home .listen-area {
  text-align: center;
  flex: 0 0 104px;
  height: 64px;
  border: 2px solid var(--color-secondary-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
body.home .listen-btn {
  width: auto;
  height: auto;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--color-navy);
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  padding: 0;
}
body.home .listen-btn:hover {
  transform: scale(1.04);
  background: transparent;
  box-shadow: none;
}
body.home .listen-btn:active { transform: scale(0.95); }
body.home .listen-btn.playing {
  background: transparent;
  color: var(--color-accent-blue);
  border-color: transparent;
  animation: pengu-listen-pulse 1s infinite;
}
@keyframes pengu-listen-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(97, 200, 243, 0.5); }
  50%      { box-shadow: 0 0 0 12px rgba(97, 200, 243, 0); }
}
body.home .listen-label {
  color: var(--color-navy);
  font-size: 0.76rem;
  font-weight: var(--font-weight-bold);
  margin-top: 0;
  line-height: 1.15;
  white-space: nowrap;
}

/* 답변 시작 (메인 CTA) */
body.home .record-area {
  text-align: center;
  flex: 1 1 auto;
  min-width: 0;
}
body.home .home-record-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 64px;
  border-radius: 22px;
  border: none;
  background: var(--color-cta-bg);
  color: var(--color-cta-fg);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s;
  padding: 0 16px;
  gap: 10px;
  animation: homeSoftGlow 4.2s ease-in-out 1.1s infinite;
}
body.home .home-record-btn::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -36%;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0.55;
  pointer-events: none;
  transform: translateX(-140%) skewX(-18deg);
  animation: homeCtaSheen 3.8s ease-in-out 1.4s infinite;
}
body.home .home-record-btn > * {
  position: relative;
  z-index: 1;
}
body.home .home-record-btn:hover {
  transform: scale(1.05);
  background: var(--color-cta-bg-hover);
}
body.home .home-record-btn:active { transform: scale(0.95); }
body.home .home-record-btn.recording {
  background: #E04757;
  color: #fff;
  animation: pengu-rec-pulse 1.1s infinite;
}
body.home .home-record-btn.recording::after {
  display: none;
}
@keyframes pengu-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 71, 87, 0.45); }
  50%      { box-shadow: 0 0 0 14px rgba(224, 71, 87, 0); }
}
body.home .record-icon {
  display: inline-block;
  line-height: 1;
  font-size: 1.55rem;
}
body.home .record-cta-label {
  color: var(--color-navy);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  margin-top: var(--space-3);
  letter-spacing: -0.2px;
}
body.home .record-inline-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
body.home .record-cta-text {
  color: var(--color-cta-fg);
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  letter-spacing: -0.25px;
}
body.home .record-cta-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.66rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  letter-spacing: -0.15px;
}
body.home .record-mobile-only { display: none; }
body.home .record-status {
  display: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin-top: var(--space-1);
}
body.home .record-timer {
  display: none;
  color: #E04757;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  margin-top: var(--space-1);
}
body.home .record-area.is-recording .record-status,
body.home .record-area.is-ready .record-status,
body.home .record-area.is-error .record-status {
  display: block;
}
body.home .record-area.is-recording .record-status {
  color: #E04757;
  font-weight: var(--font-weight-bold);
}
body.home .record-area.is-ready .record-status {
  color: var(--color-accent-blue);
  font-weight: var(--font-weight-bold);
}
body.home .record-area.is-error .record-status {
  color: #E04757;
  font-weight: var(--font-weight-bold);
}
body.home .record-area.is-recording .record-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  margin-top: var(--space-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(224, 71, 87, 0.1);
}

/* 첨삭 제출 */
body.home .submit-area { text-align: center; margin-top: var(--space-4); }
body.home .submit-btn {
  background: var(--color-navy);
  color: var(--color-cta-fg);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s, background 0.15s;
}
body.home .submit-btn:hover {
  transform: translateY(-1px);
  background: var(--color-navy-soft);
}
body.home .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
body.home .record-playback-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2);
}
body.home .record-playback-row audio {
  display: none;
}
body.home .home-record-playback-btn {
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid rgba(47, 128, 231, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(47, 128, 231, 0.08);
  color: #2f80e7;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(36, 59, 83, 0.06);
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
body.home .home-record-playback-btn:hover,
body.home .home-record-playback-btn.playing {
  background: rgba(47, 128, 231, 0.14);
  border-color: rgba(47, 128, 231, 0.35);
}
body.home .home-record-playback-btn:active {
  transform: scale(0.98);
}
body.home .submit-hint {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin-top: var(--space-2);
}

/* 카드 하단 보조 액션 */
body.home .diagnosis-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-soft);
  flex-wrap: wrap;
}
body.home .diagnosis-foot-btn {
  background: transparent;
  border: none;
  color: var(--color-navy-soft);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  padding: 6px 8px;
  text-decoration: none;
  transition: color 0.15s;
}
body.home .diagnosis-foot-btn:hover { color: var(--color-navy); }
body.home .diagnosis-foot-divider {
  width: 1px;
  height: 14px;
  background: var(--color-border-soft);
}

/* 비로그인 안내 */
body.home .login-prompt {
  text-align: center;
  margin: 0 auto var(--space-5);
  padding: var(--space-4);
  background: var(--color-mint);
  border-radius: var(--radius-md);
  max-width: 380px;
}
body.home .login-prompt p {
  color: var(--color-navy);
  font-size: var(--font-size-sm);
  margin: 0;
}
body.home .login-prompt a {
  color: var(--color-navy);
  font-weight: var(--font-weight-bold);
  text-decoration: underline;
}

/* 가치 카드 */
body.home .value-highlights {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: 0;
  margin: var(--space-2) auto var(--space-6);
  max-width: 380px;
}
body.home .value-highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 112px;
}
body.home .value-highlight.value-desktop-only { display: none; }
body.home .value-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
body.home .value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.home .value-icon picture {
  display: block;
  line-height: 0;
}
body.home .value-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}
body.home .value-title {
  color: var(--color-navy);
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  letter-spacing: -0.35px;
  word-break: keep-all;
  overflow-wrap: normal;
}
body.home .value-desc {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* === 모바일 전용: 학습 상태 3분할 패널 === */
body.home .mobile-status-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 14px 0;
  margin: var(--space-2) auto var(--space-5);
  max-width: 380px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
body.home .mobile-status-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 58px;
}
body.home .mobile-status-card + .mobile-status-card {
  border-left: 1px solid var(--color-border-soft);
}
body.home .mobile-status-title {
  font-size: 0.76rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  margin: 0;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
body.home .mobile-status-body {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--color-navy-soft);
  margin: 0;
  line-height: 1.35;
  word-break: keep-all;
}
body.home .mobile-status-icon {
  font-size: 0.9rem;
}
body.home .mobile-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
body.home .mobile-status-tag {
  background: var(--color-ice-blue);
  color: var(--color-navy);
  font-size: 0.65rem;
  font-weight: var(--font-weight-bold);
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* === 모바일 전용: 하단 낚시 펭귄 === */
body.home .mobile-fishing {
  text-align: left;
  margin: 10px 0 18px;
  padding: 0 0 0 18px;
}
body.home .mobile-fishing img {
  width: 46vw;
  max-width: 176px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(36, 59, 83, 0.12));
}
body.home .mobile-fishing picture {
  display: inline-block;
  line-height: 0;
}

body.home .value-highlight {
  animation: homeFadeRise 0.48s ease-out both;
}
body.home .value-highlight:nth-child(1) { animation-delay: 0.22s; }
body.home .value-highlight:nth-child(2) { animation-delay: 0.3s; }
body.home .value-highlight:nth-child(3) { animation-delay: 0.38s; }
body.home .value-highlight:nth-child(4) { animation-delay: 0.46s; }

body.home .mobile-status-card {
  animation: homeFadeRise 0.45s ease-out both;
}
body.home .mobile-status-card:nth-child(1) { animation-delay: 0.44s; }
body.home .mobile-status-card:nth-child(2) { animation-delay: 0.5s; }
body.home .mobile-status-card:nth-child(3) { animation-delay: 0.56s; }

body.home .mobile-fishing {
  animation: homeFadeRise 0.5s ease-out 0.54s both;
}

/* === 결과 영역 (홈에서만) === */
body.home #result-section.active .result-reveal {
  animation: homeResultReveal 0.48s ease-out both;
  animation-delay: calc(var(--result-reveal-order, 0) * 70ms);
}
body.home .result-header {
  margin-bottom: 14px;
}
body.home .result-coach-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  margin: 0 auto 14px;
  padding: 14px 16px;
  border: 1px solid rgba(190, 233, 247, 0.75);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}
body.home .result-coach-mascot {
  width: 70px;
  height: 70px;
  object-fit: contain;
  display: block;
}
body.home .result-coach-mascot-wrap {
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 12px rgba(36, 59, 83, 0.12));
  line-height: 0;
}
body.home .result-coach-copy {
  min-width: 0;
  text-align: left;
}
body.home .result-coach-label {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--color-accent-blue);
  font-size: 0.76rem;
  font-weight: var(--font-weight-bold);
}
body.home .result-coach-copy p {
  margin: 0;
  color: var(--color-navy);
  font-size: 0.92rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  word-break: keep-all;
}
body.home .result-grade {
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-soft));
  color: var(--color-cta-fg);
}
body.home .grade-caption {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7rem;
  opacity: 0.8;
  font-weight: var(--font-weight-normal);
}
body.home .cta-card {
  background: var(--color-surface);
  border: 2px solid var(--color-ice-blue);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}
body.home .cta-card h3 {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.18rem;
  line-height: 1.28;
  letter-spacing: 0;
}
body.home .cta-card p {
  max-width: 320px;
  margin: 0;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.48;
}
body.home .cta-btn {
  background: var(--color-navy);
  color: var(--color-cta-fg);
  border-radius: var(--radius-pill);
  padding: 12px 30px;
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  max-width: 100%;
  box-sizing: border-box;
}
body.home .retry-btn {
  border: 2px solid var(--color-navy);
  background: var(--color-surface);
  color: var(--color-navy);
}
body.home .retry-btn:hover {
  background: var(--color-navy);
  color: var(--color-cta-fg);
}
body.home .tts-card {
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-soft));
}

/* === 홈 빠른 진단 분석 로딩 === */
body.home .loading-card {
  width: min(100%, 420px);
  margin: 18px auto;
  padding: 30px 24px;
  border: 1px solid rgba(190, 233, 247, 0.72);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}
body.home .loading-pengu-wrap {
  position: relative;
  width: 144px;
  margin: 0 auto 8px;
}
body.home .loading-pengu-img {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 8px 18px rgba(36, 59, 83, 0.12));
  animation: homeLoadingFloat 3.6s ease-in-out infinite;
  transform-origin: 50% 82%;
}
body.home .loading-pengu-wrap picture {
  display: block;
  line-height: 0;
}
body.home .loading-thought-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 210px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  color: var(--color-navy);
  font-size: 0.76rem;
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}
body.home .spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-color: var(--color-ice-blue);
  border-top-color: var(--color-accent-blue);
  box-shadow: 0 0 0 7px rgba(97, 200, 243, 0.08);
}
body.home .loading-card h2 {
  color: var(--color-navy);
  font-size: 1.18rem;
  letter-spacing: -0.25px;
}
body.home .loading-status {
  min-height: 22px;
  color: var(--color-navy-soft);
  font-size: 0.92rem;
  font-weight: var(--font-weight-medium);
}
body.home .loading-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}
body.home .loading-steps span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-blue);
  opacity: 0.3;
  animation: homeLoadingDot 1.2s ease-in-out infinite;
}
body.home .loading-steps span:nth-child(2) { animation-delay: 0.14s; }
body.home .loading-steps span:nth-child(3) { animation-delay: 0.28s; }

/* === 하단 네비 북극 톤 (홈에서만) === */
body.home .bottom-nav {
  min-height: 82px;
  padding-top: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(190, 233, 247, 0.65);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 24px rgba(36, 59, 83, 0.09);
}
body.home .bottom-nav-item {
  color: #8A96A3;
  gap: 5px;
  padding: 8px 0 6px;
}
body.home .bottom-nav-item.active { color: var(--color-navy); }
body.home .bottom-nav-item:hover  { color: var(--color-navy); }
body.home .bottom-nav-svg {
  width: 26px;
  height: 26px;
  filter: grayscale(1) saturate(0) opacity(0.68);
}
body.home .bottom-nav-item.active .bottom-nav-svg {
  filter: brightness(0) saturate(100%) invert(18%) sepia(31%) saturate(1040%) hue-rotate(168deg) brightness(90%) contrast(91%);
}
body.home .bottom-nav-label {
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.25px;
}

/* === 마스코트 === */
body.home .mascot { display: inline-block; line-height: 1; }
body.home .mascot-sm { font-size: 1.4rem; }
body.home .mascot-md { font-size: 2rem; }
body.home .mascot-lg { font-size: 2.8rem; }


/* ==================================================
 * ===== 데스크탑 시안 (≥1024px) =====================
 * ================================================== */
@media (min-width: 1024px) {

  /* 가시성 토글 */
  body.home .home-header--mobile  { display: none; }
  body.home .home-header--desktop { display: flex; }
  body.home .home-hero--mobile    { display: none; }
  body.home .home-hero--desktop   { display: flex; }
  body.home .bottom-nav           { display: none; }
  body.home .desktop-only         { display: block; }
  body.home .value-desktop-only   { display: flex; }
  body.home .record-mobile-only   { display: none; }
  body.home .record-inline-label  { display: inline-flex; }
  body.home .mobile-status-cards  { display: none !important; }
  body.home .mobile-fishing       { display: none !important; }

  /* === 풀스크린 북극 배경 (데스크탑 전용 이미지) === */
  body.home {
    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;
  }
  @supports (background-image: image-set(url('/static/images/penguopic/bg-desktop.webp') type('image/webp'))) {
    body.home {
      background-image: image-set(
        url('/static/images/penguopic/bg-desktop.webp') type('image/webp'),
        url('/static/images/penguopic/bg-desktop.png') type('image/png')
      );
    }
  }

  /* === 데스크탑 헤더 (상단 가로 네비) === */
  body.home .home-header--desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-8);
    background: transparent;
    max-width: 1440px;
    margin: 0 auto;
    gap: var(--space-6);
  }
  body.home .desktop-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--color-navy);
  }
  body.home .desktop-brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
  }
  body.home .desktop-brand-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
  }
  body.home .desktop-brand-name {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-navy);
    letter-spacing: -0.5px;
  }
  body.home .desktop-brand-sub {
    font-size: var(--font-size-xs);
    color: var(--color-muted);
    margin-top: 2px;
  }
  body.home .desktop-top-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
  }
  body.home .desktop-top-nav a {
    color: var(--color-navy);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    transition: color 0.15s;
  }
  body.home .desktop-top-nav a:hover { color: var(--color-accent-blue); }
  body.home .desktop-header-auth {
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }
  body.home .desktop-header-auth span {
    color: var(--color-navy);
    font-size: var(--font-size-sm);
    margin-right: var(--space-2);
  }
  body.home .auth-btn {
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    transition: background 0.15s, transform 0.15s;
  }
  body.home .auth-btn--ghost {
    background: var(--color-surface);
    color: var(--color-navy);
    border: 1px solid var(--color-border-soft);
  }
  body.home .auth-btn--ghost:hover {
    background: var(--color-ice-blue);
  }
  body.home .auth-btn--solid {
    background: var(--color-accent-blue);
    color: var(--color-cta-fg);
    border: 1px solid var(--color-accent-blue);
  }
  body.home .auth-btn--solid:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
  }

  /* === 컨테이너 === */
  body.home .home-container {
    max-width: 1280px;
    padding: var(--space-2) var(--space-8) var(--space-8);
  }

  /* === 데스크탑 Hero (2열) === */
  body.home .home-hero--desktop {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-6);
    align-items: center;
    margin: var(--space-3) 0 var(--space-4);
    min-height: 280px;
  }
  body.home .hero-text {
    max-width: 560px;
    margin-left: max(0px, calc((min(100vw, 1280px) - 64px - 880px) / 2));
    animation: homeFadeRise 0.52s ease-out both;
  }
  body.home .home-hero--desktop .home-headline {
    font-size: 2.2rem;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin-bottom: var(--space-3);
  }
  body.home .headline-accent {
    color: var(--color-accent-blue);
  }
  body.home .home-hero--desktop .home-subcopy {
    font-size: var(--font-size-base);
    color: var(--color-navy-soft);
    margin-bottom: var(--space-4);
  }
  body.home .home-hero--desktop .home-badges {
    justify-content: flex-start;
    gap: var(--space-3);
  }
  body.home .home-hero--desktop .home-badge {
    font-size: var(--font-size-sm);
    padding: 8px 18px;
  }

  /* 데스크탑 마스코트 — 빙하 제거 후 BG의 하단 흰 빙하 위에 앉은 느낌 */
  body.home .hero-mascot {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
    align-self: center;
    width: 166px;
    height: 166px;
    min-height: 166px;
    transform: translate(-24px, 14px);
    animation: homeMascotDesktopEnter 0.52s ease-out 0.08s both;
  }
  body.home .hero-mascot-img {
    width: calc(100% * 1.18);
    max-width: none;
    max-height: calc(100% * 1.18);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(36, 59, 83, 0.12));
    animation: homeMascotDesktopBob 5.2s ease-in-out 0.7s infinite;
    transform-origin: 50% 82%;
  }
  body.home .hero-mascot-picture {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }
  body.home .speech-bubble {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: var(--color-surface);
    color: var(--color-navy);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-card);
    white-space: nowrap;
  }
  body.home .speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: calc(50% - 8px);
    width: 16px;
    height: 16px;
    background: var(--color-surface);
    transform: rotate(45deg);
    box-shadow: 4px 4px 8px rgba(36, 59, 83, 0.05);
  }

  /* === 데스크탑 진단 카드 === */
  body.home .diagnosis-card {
    max-width: 880px;
    padding: var(--space-5) var(--space-8) var(--space-5);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-top: 0;
  }
  body.home .diagnosis-card-head {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    text-align: center;
  }
  body.home .diagnosis-card-head .diagnosis-title {
    margin-bottom: 0;
    font-size: 1.4rem;
  }
  body.home .diagnosis-card-head .diagnosis-tags {
    margin: 0;
  }
  body.home .diagnosis-question {
    display: block;
    font-size: var(--font-size-lg);
    margin: var(--space-4) 0 var(--space-3);
  }
  body.home .diagnosis-waveform { max-width: 280px; }

  /* CTA 행: 듣기 좌측, 답변 시작 pill 우측 */
  body.home .diagnosis-cta-row {
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--space-2);
    margin-bottom: var(--space-3);
  }
  body.home .home-hero--desktop ~ .diagnosis-card .diagnosis-cta-row,
  body.home .diagnosis-card .diagnosis-cta-row {
    flex-wrap: nowrap;
  }

  body.home .listen-area {
    flex: 0 0 260px;
    min-height: 72px;
    border: 2px solid var(--color-secondary-border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
  }

  body.home .record-area {
    flex: 0 0 auto;
    min-width: 0;
  }

  body.home .listen-btn {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.55rem;
    box-shadow: none;
    padding: 0;
  }

  body.home .listen-label {
    color: var(--color-navy);
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin: 0;
    white-space: nowrap;
  }

  /* 답변 시작 = 가로 pill 형태 */
  body.home .home-record-btn {
    width: auto;
    min-height: 72px;
    border-radius: var(--radius-pill);
    padding: 18px 36px;
    gap: var(--space-3);
    font-size: 1.1rem;
    min-width: 420px;
    justify-content: center;
  }
  body.home .home-record-btn .record-icon {
    font-size: 1.4rem;
  }
  body.home .record-inline-label {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  body.home .record-cta-text {
    font-size: 1.15rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    color: var(--color-cta-fg);
  }
  body.home .record-cta-sub {
    font-size: 0.78rem;
    font-weight: var(--font-weight-normal);
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.78);
  }

  /* 데스크탑에선 모바일용 CTA 라벨/상태 텍스트 숨김 */
  body.home .record-mobile-only,
  body.home .record-area .record-status,
  body.home .record-area .record-timer { display: none; }
  body.home .record-area .record-status[data-state="recording"],
  body.home .record-area .record-timer.visible { display: block; }

  /* 가치 카드 4열 */
  body.home .value-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 880px);
    max-width: 880px;
    gap: var(--space-4);
    margin: var(--space-6) auto 0;
  }
  body.home .value-highlight.value-desktop-only {
    display: none;
  }
  body.home .value-highlight {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 10px;
    padding: 20px 22px;
    border-radius: var(--radius-lg);
  }
  body.home .value-highlight .value-head {
    gap: 10px;
    align-items: center;
  }
  body.home .value-highlight .value-icon {
    flex-shrink: 0;
    background: transparent;
    width: 36px; height: 36px;
    padding: 0;
  }
  body.home .value-highlight .value-icon img {
    width: 36px;
    height: 36px;
  }
  body.home .value-highlight .value-title {
    font-size: 1.06rem;
    letter-spacing: -0.3px;
    line-height: 1.2;
  }
  body.home .value-highlight .value-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home *,
  body.home *::before,
  body.home *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
