/* ====================================================================
   AI Food Akinator - High-Contrast Premium Design System (index.css)
   ==================================================================== */

:root {
  /* High-Contrast Modern Light Palette (Claymorphism & Visual Layering) */
  --color-page-bg: #EAEFF4; /* Cool Slate Gray Background for clear boundary contrast */
  --color-card-bg: #FFFFFF; /* Pure White Main container for highlighting content */
  --color-card-border: rgba(148, 163, 184, 0.15);
  --color-box-bg: #F8FAFC; /* Subtle Light Gray for internal section boxes */
  --color-box-border: #E2E8F0;

  /* Typography Colors */
  --color-text-primary: #0F172A; /* Deep Charcoal */
  --color-text-secondary: #475569; /* Slate Gray */
  --color-text-muted: #94A3B8; /* Cool Silver */

  /* Neon/Vibrant Accent Colors */
  --color-primary: #4F46E5; /* Royal Indigo */
  --color-secondary: #F43F5E; /* Coral Rose */
  --color-accent: #10B981; /* Emerald Green */

  /* Affiliate Button Accents */
  --color-coupang-border: rgba(249, 115, 22, 0.25);
  --color-coupang-hover: #EA580C;
  --color-delivery-border: rgba(16, 185, 129, 0.25);
  --color-delivery-hover: #059669;
  --color-map-border: rgba(79, 70, 229, 0.25);
  --color-map-hover: #4338CA;

  --font-sans: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--color-page-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  transition: var(--transition-smooth);
}

/* ====================================================================
   Pastel Ambient Mesh Glow (화사한 오라 배경)
   ==================================================================== */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.16;
}

.blob-1 {
  top: -15%;
  left: 10%;
  width: 550px;
  height: 550px;
  background: #6366F1;
  animation: blob-float 18s ease-in-out infinite alternate;
}

.blob-2 {
  bottom: 5%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: #EC4899;
  animation: blob-float-rev 20s ease-in-out infinite alternate;
}

@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.1); }
}

@keyframes blob-float-rev {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, -40px) scale(1.05); }
}

/* ====================================================================
   Responsive Layout & Ad Slots
   ==================================================================== */
.app-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 32px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-layout.result-view-active {
  max-width: 1800px;
  gap: 56px; /* 결과화면 진입 시 사이드바와 본문 카드 사이의 간격을 넓혀 시원하게 배치 */
}

.adsense-aside {
  width: 200px; /* 160px에서 200px로 소폭 늘려 시인성 개선 */
  height: 800px; /* 세로 800px 규격 유지 */
  position: sticky;
  top: 40px; /* 스크롤 시 화면 상단에서 40px 여백 유지 */
  flex-shrink: 0;
  margin-top: 40px; /* 메인 카드의 Y=40px 시작점과 일치하도록 마진 설정 */
  align-self: flex-start; /* flex container 상단에 정렬을 고정하여 카드와 시작점 일치 */
}

.adsense-aside-left { order: 1; }
.main-content { order: 2; flex-grow: 1; max-width: 740px; min-width: 320px; display: flex; flex-direction: column; align-items: center; padding: 40px 0 60px 0; }
.main-content.result-view { max-width: 1120px; }
.adsense-aside-right { order: 3; }

@media (max-width: 1380px) {
  .adsense-aside { display: none !important; }
}

@media (max-width: 1640px) {
  .app-layout.result-view-active .adsense-aside { display: none !important; }
}

/* 애드센스 슬롯 가이드 */
.adsense-placeholder {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 0; /* 테두리 둥글기 제거 (직각의 실제 애드센스 광고 프레임과 매칭) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: var(--color-text-muted);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02);
}

.vertical-ad { width: 200px; height: 800px; }
.horizontal-ad { width: 100%; min-height: 90px; padding: 12px; }

.ad-label {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(15, 23, 42, 0.15);
}

.ad-mock-icon {
  margin-bottom: 12px;
  opacity: 0.15;
  color: #0F172A;
}

.ad-mock-text {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.6;
}

.ad-mock-text-sm {
  font-size: 9px;
  letter-spacing: 1px;
  opacity: 0.6;
}

.adsense-banner-top { width: 100%; margin-bottom: 32px; }
.adsense-infeed { width: 100%; margin: 32px 0; }
.app-footer { width: 100%; margin-top: 48px; text-align: center; }

.affiliate-disclosure {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 8px auto;
  opacity: 0.85;
}

.copyright {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
  opacity: 0.65;
}

/* ====================================================================
   Card Container (Pure White Layering Depth)
   ==================================================================== */
.card-container {
  width: 100%;
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  box-shadow: 
    0 25px 50px -12px rgba(15, 23, 42, 0.08),
    0 4px 12px rgba(15, 23, 42, 0.02);
  border-radius: 32px;
  padding: 48px 40px;
  transition: var(--transition-smooth);
  position: relative;
  z-index: 5;
}

@media (max-width: 480px) {
  .card-container {
    padding: 32px 20px;
    border-radius: 24px;
  }
}

.screen {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ====================================================================
   START SCREEN
   ==================================================================== */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.logo-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #F1F5F9;
  color: var(--color-primary);
  border: 1px solid var(--color-box-border);
}

.logo-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--color-text-primary);
}

.main-title {
  font-size: 38px;
  font-weight: 850;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.highlight-text {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #F43F5E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 14.5px;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto 40px auto;
  font-weight: 400;
}

.mascot-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.mascot-svg-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mascot-body-float {
  animation: float-ai 5s ease-in-out infinite;
  transform-origin: center;
}

.eye {
  transform-origin: center;
  animation: blink-ai 5.5s infinite;
}

@keyframes float-ai {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes blink-ai {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

/* Premium Buttons */
.btn {
  font-family: var(--font-sans);
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  border: none;
  padding: 18px 40px;
  font-size: 16px;
  border-radius: 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--color-box-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-box-border);
}

.btn-secondary:hover {
  background: #EDF2F7;
  border-color: #CBD5E1;
}

.btn-accent {
  background: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
}

.user-stats {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ====================================================================
   QUIZ SCREEN (Enhanced Contrast Question Box)
   ==================================================================== */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  color: var(--color-text-primary);
  transform: translateX(-2px);
}

.question-progress-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background: #E2E8F0; /* High Contrast Track background */
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4F46E5 0%, #7C3AED 100%);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mascot-quiz-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.eye-group.hidden {
  display: none;
}

/* 질문 박스 (비주얼 대비감 극대화를 위한 필박스형 배경 추가) */
.question-box {
  background: var(--color-box-bg);
  border: 1px solid var(--color-box-border);
  border-radius: 20px;
  padding: 30px 24px;
  margin-bottom: 40px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.015);
}

#question-text {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 3지선다 버튼 그룹 (질문 박스와의 질감적 차별화) */
.answer-options-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-answer {
  width: 100%;
  padding: 18px 24px;
  border-radius: 18px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  border: 1px solid var(--color-box-border);
  background: #FFFFFF; /* Pure White contrast on internal slate elements */
  color: var(--color-text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.ans-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.wrap-yes { background: rgba(79, 70, 229, 0.06); color: #4F46E5; }
.wrap-dontcare { background: rgba(100, 116, 139, 0.06); color: #64748B; }
.wrap-no { background: rgba(244, 63, 94, 0.06); color: #F43F5E; }

/* 3개 버튼 호버 */
.btn-ans-yes:hover {
  border-color: #4F46E5;
  background: rgba(79, 70, 229, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.05);
}
.btn-ans-yes:hover .wrap-yes { background: #4F46E5; color: #FFFFFF; }

.btn-ans-dont-care:hover {
  border-color: #64748B;
  background: rgba(100, 116, 139, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(100, 116, 139, 0.05);
}
.btn-ans-dont-care:hover .wrap-dontcare { background: #64748B; color: #FFFFFF; }

.btn-ans-no:hover {
  border-color: #F43F5E;
  background: rgba(244, 63, 94, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.05);
}
.btn-ans-no:hover .wrap-no { background: #F43F5E; color: #FFFFFF; }

/* ====================================================================
   RESULT SCREEN (Apple Dashboard Style)
   ==================================================================== */
/* 입맛 페르소나 카드 (배경 대비 극대화 및 부드러운 하이라이트 경계) */
.persona-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 24px;
  padding: 32px 28px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.03);
}

.persona-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.persona-icon-container {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.08);
}

.persona-avatar-emoji {
  font-size: 28px;
}

.persona-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.persona-meta-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-primary);
  text-transform: uppercase;
}

.persona-name-title {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.3px;
  color: var(--color-text-primary);
}

.persona-desc {
  font-size: 13.5px;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.results-heading {
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-box-border);
  padding-bottom: 8px;
}

/* ====================================================================
   Top 3 Horizontal Card Deck (1등 vs 2/3등 시각적 계층 완벽 구현)
   ==================================================================== */
.top-3-deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

@media (max-width: 960px) {
  .top-3-deck {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* 기본 카드 */
.food-rank-card {
  background: var(--color-box-bg); /* Rank 2, 3 card has a gray box background */
  border: 1px solid var(--color-box-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  position: relative;
  transition: var(--transition-smooth);
}

/* 음식 카드 이미지 스타일 & 스켈레톤 로더 */
.food-img-wrapper {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
  position: relative;
  background-color: #F1F5F9;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Skeleton Loading Effect */
.food-img-wrapper.img-skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.food-img-wrapper.img-skeleton .food-img {
  opacity: 0;
}

.food-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease-in-out;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.food-rank-card:hover .food-img {
  transform: scale(1.05);
}

.food-rank-card:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

/* 1위 카드 (순백색 배경 + 엠비언트 테두리 + 그림자 적용으로 극강의 시각적 계층화) */
.food-rank-card.rank-1 {
  background: #FFFFFF; /* Pure White background for Rank 1 only */
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.08);
}
.food-rank-card.rank-1:hover {
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.15);
}

/* 순위 라벨 */
.rank-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.rank-1 .rank-badge { background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%); color: #FFF; }
.rank-2 .rank-badge { background: #E2E8F0; color: var(--color-text-secondary); }
.rank-3 .rank-badge { background: #E2E8F0; color: var(--color-text-secondary); }

.rank-card-body {
  margin-top: 8px;
  margin-bottom: 20px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.food-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.5px;
}

/* ====================================================================
   SVG Circular Match Gauge (원형 차트 링)
   ==================================================================== */
.match-gauge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gauge-svg {
  transform: rotate(-90deg);
}

.gauge-bg {
  stroke: rgba(0, 0, 0, 0.04);
}

.gauge-fill {
  stroke: var(--color-primary);
  transition: stroke-dasharray 0.8s ease;
}

.gauge-text {
  fill: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 800;
  text-anchor: middle;
  transform: rotate(90deg);
  transform-origin: 18px 18px;
}

.food-desc {
  font-size: 12.5px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.food-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 10px;
  font-weight: 600;
  background: #FFFFFF; /* High contrast tags */
  color: var(--color-text-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--color-box-border);
}

/* ====================================================================
   Affiliate Outline Buttons
   ==================================================================== */
.affiliate-links-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-aff {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #FFFFFF;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-box-border);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.svg-btn-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

/* 라이트모드 전용 홉 효과 */
.btn-aff:nth-child(1):hover {
  border-color: var(--color-coupang-border);
  background: rgba(249, 115, 22, 0.04);
  color: var(--color-coupang-hover);
}

.btn-aff:nth-child(2):hover {
  border-color: var(--color-delivery-border);
  background: rgba(16, 185, 129, 0.04);
  color: var(--color-delivery-hover);
}

.btn-aff:nth-child(3):hover {
  border-color: var(--color-map-border);
  background: rgba(79, 70, 229, 0.04);
  color: var(--color-map-hover);
}

/* 결과창 최종 버튼 */
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

@media (max-width: 480px) {
  .result-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* 토스트 팝업 */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--color-text-primary);
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ====================================================================
   Mobile & Tablet Extra Optimization Patches
   ==================================================================== */
@media (min-width: 600px) and (max-width: 960px) {
  /* Tablet or horizontal cards stack: lay out buttons horizontally in 1 row */
  .affiliate-links-group {
    flex-direction: row !important;
    gap: 8px !important;
  }
  .btn-aff {
    flex: 1 !important;
  }
}

@media (max-width: 480px) {
  /* Title font size scaling for small screens */
  .main-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }

  /* Centered avatar and title layout on mobile devices */
  .persona-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
  }
  
  .persona-desc {
    text-align: center !important;
  }

  /* Inner spacing card optimizations */
  .card-container {
    padding: 28px 16px !important;
  }
  
  /* Buttons spacing inside result cards on small screen */
  .btn-aff {
    padding: 10px 8px !important;
    font-size: 11.5px !important;
  }
  
  .food-name {
    font-size: 17px !important;
  }
}

/* ====================================================================
   Custom Modal Layer Styles (배달/지도/공유) & Sponsored Ad Cards
   ==================================================================== */

/* 모달 레이아웃 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  width: 90%;
  max-width: 440px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-header h4 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
}

.modal-close {
  background: #F1F5F9;
  border: 1px solid var(--color-box-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: #E2E8F0;
  color: var(--color-text-primary);
  transform: rotate(90deg);
}

.modal-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* 모달 그리드 버튼 */
.modal-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid var(--color-box-border);
  background: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
  transition: var(--transition-smooth);
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.modal-btn:active {
  transform: translateY(0);
}

/* 브랜드 뱃지 스타일 */
.brand-badge {
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.brand-baemin { background-color: #2AC1BC; }
.brand-yogiyo { background-color: #FA0050; }
.brand-eats { background-color: #00A5E0; }
.brand-naver { background-color: #03C75A; }
.brand-kakao { background-color: #FEE500; color: #191919 !important; }

/* SNS 공유 버튼 전용 스타일 */
.brand-svg {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

.btn-share-kakao {
  background-color: #FEE500;
  color: #191919;
  border-color: #FEE500;
}
.btn-share-kakao:hover {
  background-color: #FDD800;
  border-color: #FDD800;
}
.btn-share-kakao .brand-svg {
  color: #191919;
}

.btn-share-twitter {
  background-color: #000000;
  color: #FFFFFF;
  border-color: #000000;
}
.btn-share-twitter:hover {
  background-color: #1A1A1A;
  border-color: #1A1A1A;
}
.btn-share-twitter .brand-svg {
  color: #FFFFFF;
}

.btn-share-naver {
  border-color: rgba(3, 199, 90, 0.3);
}
.btn-share-naver:hover {
  border-color: #03C75A;
  background-color: rgba(3, 199, 90, 0.03);
}

.btn-share-link {
  border-color: rgba(79, 70, 229, 0.2);
}
.btn-share-link:hover {
  border-color: #4F46E5;
  background-color: rgba(79, 70, 229, 0.03);
}

/* ====================================================================
   스폰서드 브랜드 네이티브 배너 카드 (Premium Sponsored Promotion Card)
   ==================================================================== */
.sponsored-ad-section {
  width: 100%;
  margin-top: 24px;
  border-top: 1px dashed var(--color-box-border);
  padding-top: 24px;
}

.sponsored-banner-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 24px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.sponsored-banner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

.sponsored-banner-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.08);
}

.sp-image-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-ad-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.7);
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.sp-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.sp-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-tag {
  font-size: 9px;
  font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, #EC4899 0%, #F43F5E 100%);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.sp-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

.sp-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.sp-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.btn-sp-link {
  padding: 12px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7C3AED 100%);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-sp-link:hover {
  opacity: 0.95;
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

@media (max-width: 600px) {
  .sponsored-banner-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    gap: 14px;
  }
  .sp-image-wrap {
    width: 100px;
    height: 100px;
  }
  .sp-header {
    justify-content: center;
  }
  .btn-sp-link {
    width: 100%;
    text-align: center;
  }
}

/* 모바일 화면(최대 480px)에서의 퀴즈 화면 최적화 (한 화면 스크롤 제거) */
@media (max-width: 480px) {
  .progress-bar-wrapper {
    margin-bottom: 16px;
  }
  .mascot-quiz-wrapper {
    margin-bottom: 12px;
  }
  .mascot-svg-container svg {
    width: 80px !important;
    height: 80px !important;
  }
  .question-box {
    padding: 18px 16px;
    margin-bottom: 20px;
    min-height: 76px;
  }
  #question-text {
    font-size: 16px;
    line-height: 1.45;
  }
  .answer-options-group {
    gap: 10px;
  }
  .btn-answer {
    padding: 13px 18px;
    font-size: 14px;
    gap: 12px;
    border-radius: 14px;
  }
  .ans-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }
  .ans-icon-wrap svg {
    width: 12px;
    height: 12px;
  }
}
