/* ============================================
   디지털해결사 - Design System
   시니어 친화적 모바일 우선 디자인
   ============================================ */

/* --- Google Font --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-primary: #BFDE6C;
  --color-primary-dark: #9DC43A;
  --color-primary-light: #E0F0B8;
  --color-primary-bg: #F7FBF0;
  --color-accent: #FCB408;
  --color-accent-dark: #E09F00;
  --color-accent-light: #FFF3D0;
  --color-coupang: #E4002B;
  --color-coupang-dark: #C00024;
  --color-youtube: #FF0000;
  --color-text: #1A1A1A;
  --color-text-secondary: #555555;
  --color-text-light: #888888;
  --color-bg: #F7FBF0;
  --color-bg-white: #FFFFFF;
  --color-bg-card: #FFFFFF;
  --color-border: #E8E8E8;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-shadow-hover: rgba(0, 0, 0, 0.15);
  --color-overlay: rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.8125rem;   /* 13px */
  --font-size-sm: 0.9375rem;   /* 15px */
  --font-size-base: 1.125rem;  /* 18px - 시니어 최소 기준 */
  --font-size-lg: 1.25rem;     /* 20px */
  --font-size-xl: 1.5rem;      /* 24px */
  --font-size-2xl: 1.875rem;   /* 30px */
  --font-size-3xl: 2.25rem;    /* 36px */

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px var(--color-shadow);
  --shadow-md: 0 4px 16px var(--color-shadow);
  --shadow-lg: 0 8px 32px var(--color-shadow);
  --shadow-hover: 0 8px 24px var(--color-shadow-hover);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --max-width: 480px;
  --max-width-desktop: 960px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
}

/* --- Layout Container — 모바일 가로폭 극대화 --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 12px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  background: linear-gradient(135deg, #4A7C10 0%, #6FA31E 30%, #BFDE6C 100%);
  color: white;
  padding: var(--space-2xl) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(252, 180, 8, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

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

.header-content {
  position: relative;
  z-index: 1;
}

.header-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  margin: 0 auto var(--space-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.header-logo .logo-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.header h1 {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  margin-bottom: var(--space-xs);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: -0.5px;
}

.header-tagline {
  font-size: var(--font-size-base);
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.5;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  margin-top: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-badge:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PWA INSTALL BANNER
   ============================================ */
.pwa-banner {
  background: linear-gradient(135deg, rgba(252, 180, 8, 0.12) 0%, rgba(191, 222, 108, 0.12) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(252, 180, 8, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: calc(-1 * var(--space-xl)) var(--space-lg) var(--space-xl);
  position: relative;
  z-index: 2;
  display: none;
  animation: slideDown 0.5s ease;
  box-shadow: var(--shadow-md);
}

.pwa-banner.show {
  display: block;
}

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

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.pwa-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.pwa-banner-text h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.pwa-banner-text p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.pwa-install-btn {
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: white;
  font-weight: 700;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(252, 180, 8, 0.35);
}

.pwa-install-btn:active {
  transform: scale(0.98);
}

.pwa-dismiss-btn {
  width: 100%;
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: transparent;
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  font-weight: 400;
}

/* iOS Block Overlay (아이폰 미지원 전체 차단) */
.ios-block-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(150deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.ios-block-overlay.show {
  display: flex;
}

.ios-block-content {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.5s ease;
}

.ios-block-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}

.ios-block-content h2 {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--space-md);
  letter-spacing: -0.5px;
}

.ios-block-content > p {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.ios-block-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  margin: var(--space-xl) auto;
}

.ios-block-guide {
  font-size: var(--font-size-lg) !important;
  font-weight: 700;
  color: var(--color-primary-light) !important;
  margin-bottom: var(--space-lg) !important;
}

.ios-block-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.ios-block-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.ios-block-option-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.ios-block-option span:last-child {
  font-size: var(--font-size-base);
  color: #ffffff;
}

.ios-block-sorry {
  font-size: var(--font-size-sm) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  margin-top: var(--space-sm);
}

/* ============================================
   IN-APP BROWSER BANNER
   ============================================ */
.inapp-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  padding: var(--space-xl);
  align-items: center;
  justify-content: center;
}

.inapp-banner.show {
  display: flex;
}

.inapp-banner-content {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
  text-align: center;
}

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

.inapp-banner-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.inapp-banner-text h3 {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.inapp-banner-text p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.inapp-open-btn {
  width: 100%;
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, #4A7C10 0%, var(--color-primary-dark) 100%);
  color: white;
  font-weight: 700;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(157, 196, 58, 0.4);
  border: none;
  cursor: pointer;
  min-height: 56px;
}

.inapp-open-btn:active {
  transform: scale(0.97);
}

.inapp-manual-guide {
  display: none;
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: #FFF8E1;
  border-radius: var(--radius-md);
  border: 1px solid rgba(252, 180, 8, 0.3);
  text-align: left;
}

.inapp-manual-guide.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.inapp-manual-guide > p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.inapp-steps {
  list-style: none;
  font-size: var(--font-size-base);
}

.inapp-steps li {
  padding: var(--space-sm) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.inapp-steps .step-num {
  background: var(--color-accent);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.inapp-dismiss-btn {
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: transparent;
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  font-weight: 400;
  border: none;
  cursor: pointer;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  letter-spacing: -0.3px;
}

.section-title .emoji {
  font-size: 1.4em;
}

.section-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: calc(-1 * var(--space-sm));
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

/* ============================================
   COUPANG QUICK ACCESS
   ============================================ */
.coupang-section {
  padding-top: var(--space-xl);
}

.coupang-main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, var(--color-coupang) 0%, #FF1744 100%);
  color: white;
  font-size: var(--font-size-xl);
  font-weight: 800;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  box-shadow: 0 6px 25px rgba(228, 0, 43, 0.35);
  position: relative;
  overflow: hidden;
  min-height: 72px;
  text-decoration: none;
}

.coupang-main-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.coupang-main-btn:active {
  transform: scale(0.98);
}

.coupang-main-btn .btn-icon {
  font-size: 1.8rem;
}

.coupang-sub-text {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-top: var(--space-md);
}

/* ============================================
   PRODUCT HERO (추천 제품 탭 첫인상)
   ============================================ */
.product-hero {
  background: linear-gradient(150deg, #1a1a2e 0%, #16213e 50%, #1a3a1a 100%);
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(191, 222, 108, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.product-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(252, 180, 8, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.product-hero-eyebrow {
  position: relative;
  z-index: 1;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: rgba(191, 222, 108, 0.85);
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.product-hero-title {
  position: relative;
  z-index: 1;
  font-size: var(--font-size-3xl);
  font-weight: 900;
  color: white;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: var(--space-md);
}

.product-hero-sub {
  position: relative;
  z-index: 1;
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

/* Compact stance card variant */
.stance-card--compact {
  padding: var(--space-lg);
}

.stance-card--compact .stance-card-body p {
  font-size: var(--font-size-base);
  line-height: 1.65;
  color: var(--color-text-secondary);
}

/* Coupang pre-text */
.coupang-pre-text {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

/* ============================================
   STANCE CARD (해결사 포지션 선언)
   ============================================ */
.stance-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: linear-gradient(135deg, #FFFDF5 0%, #FFF8E1 100%);
  border: 1.5px solid rgba(252, 180, 8, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.stance-card-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.stance-card-body h3 {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.3px;
}

.stance-card-body p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.stance-card-body strong {
  color: var(--color-text);
  font-weight: 700;
}

/* ============================================
   VIDEO PLACEHOLDER (해결사 한마디 영상)
   ============================================ */
.video-section-label {
  margin-bottom: var(--space-md);
}

.video-label-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-youtube);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: 700;
  padding: 4px var(--space-md);
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
}

.video-placeholder {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1a1a2e;
}

.video-placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.video-thumb-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  opacity: 0.95;
}

.video-play-btn {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.15);
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  padding-left: 4px;
  backdrop-filter: blur(8px);
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.25); }
  50% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}

.video-placeholder-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.video-coming-soon {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.video-coming-desc {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* 실제 영상으로 교체 후 iframe 스타일 */
#stanceVideo {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  aspect-ratio: 16 / 9;
  height: auto;
}

/* ============================================
   PRODUCT CARDS (영양제 추천)
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.product-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-hover);
}

.product-card:active::before {
  opacity: 1;
}

.product-emoji {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.product-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.product-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--color-coupang), #FF1744);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.product-link:active {
  transform: scale(0.95);
}

/* ============================================
   IT TIPS SECTION
   ============================================ */
.tip-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  cursor: pointer;
}

.tip-card:active {
  transform: scale(0.98);
}

.tip-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.tip-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tip-icon.green {
  background: var(--color-primary-light);
}

.tip-icon.yellow {
  background: var(--color-accent-light);
}

.tip-icon.blue {
  background: #E3F2FD;
}

.tip-icon.red {
  background: #FCE4EC;
}

.tip-icon.purple {
  background: #F3E5F5;
}

.tip-card-header h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.tip-content {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.tip-card.open .tip-content {
  max-height: 500px;
  padding-top: var(--space-sm);
}

.tip-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  color: var(--color-primary-dark);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-top: var(--space-sm);
  transition: all var(--transition-base);
}

.tip-toggle .arrow {
  transition: transform var(--transition-base);
  display: inline-block;
}

.tip-card.open .tip-toggle .arrow {
  transform: rotate(180deg);
}

/* ============================================
   YOUTUBE SECTION
   ============================================ */
.youtube-section {
  text-align: center;
  background: linear-gradient(135deg, rgba(191, 222, 108, 0.15) 0%, rgba(252, 180, 8, 0.1) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  margin: 0 var(--space-lg);
}

.youtube-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  background: var(--color-youtube);
  color: white;
  font-size: var(--font-size-lg);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
  text-decoration: none;
  min-height: 56px;
}

.youtube-btn:active {
  transform: scale(0.97);
}

.youtube-btn .yt-icon {
  font-size: 1.5rem;
}

.youtube-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-md);
  line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #2D2D2D;
  color: #BBBBBB;
  padding: var(--space-2xl) 0;
  margin-top: 0;
  text-align: center;
}

.footer-affiliate {
  font-size: var(--font-size-xs);
  color: #999999;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-links a {
  color: #BBBBBB;
  font-size: var(--font-size-sm);
  transition: color var(--transition-base);
}

.footer-links a:active {
  color: var(--color-primary);
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: #777777;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-dark);
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  z-index: 100;
  border: none;
  cursor: pointer;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:active {
  transform: scale(0.9);
}

/* ============================================
   DESKTOP RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
  :root {
    --max-width: 640px;
  }

  .header {
    padding: var(--space-3xl) 0 calc(var(--space-3xl) + var(--space-xl));
  }

  .header h1 {
    font-size: var(--font-size-3xl);
  }

  .header-logo {
    width: 100px;
    height: 100px;
  }

  .product-grid {
    gap: var(--space-lg);
  }

  .product-card {
    padding: var(--space-xl);
  }

  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
  }

  .product-card:hover::before {
    opacity: 1;
  }

  .coupang-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(228, 0, 43, 0.4);
  }

  .tip-card:hover {
    box-shadow: var(--shadow-md);
  }

  .youtube-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.35);
  }

  .pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 180, 8, 0.45);
  }

  .back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }

  .footer-links a:hover {
    color: var(--color-primary);
  }
}

@media (min-width: 1024px) {
  :root {
    --max-width: 720px;
  }
}

/* ============================================
   SMALL SCREEN ADJUSTMENTS
   ============================================ */
@media (max-width: 360px) {
  :root {
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.375rem;
    --font-size-2xl: 1.625rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--space-md);
  }
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-primary-light);
  border-top-color: var(--color-primary-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: var(--space-md);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ============================================
   PULSE ANIMATION FOR CTA
   ============================================ */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(228, 0, 43, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(228, 0, 43, 0);
  }
}

.coupang-main-btn {
  animation: pulse 2.5s ease-in-out infinite;
}

/* ============================================
   NOTICE BAR (오늘의 한마디)
   ============================================ */
.notice-bar {
  background: linear-gradient(90deg, var(--color-accent-light), #FFF8E1);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-base);
  color: var(--color-text);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  line-height: 1.5;
}

.notice-bar .notice-emoji {
  font-size: 1.3em;
  flex-shrink: 0;
}

/* ============================================
   PWA STANDALONE MODE (설치 후)
   홈 화면 아이콘으로 접속한 경우
   설치 관련 배너를 모두 숨김
   ============================================ */
@media (display-mode: standalone) {
  .pwa-banner,
  .ios-guide,
  .inapp-banner {
    display: none !important;
  }

  /* 설치된 사용자에게는 헤더 하단 여백 조정 */
  .header {
    padding-bottom: var(--space-2xl);
  }
}

/* iOS standalone 모드에서도 동일하게 적용 */
body.is-standalone .pwa-banner,
body.is-standalone .ios-guide,
body.is-standalone .inapp-banner {
  display: none !important;
}

body.is-standalone .header {
  padding-bottom: var(--space-2xl);
}

/* ============================================
   TWO-TRACK TAB SYSTEM (디지털 안심 & 건강 쇼핑)
   ============================================ */
.tab-container {
  display: flex;
  gap: var(--space-md);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 2px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  font-weight: 700;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  min-height: 54px;
}

.tab-btn:active {
  transform: scale(0.97);
}

.tab-btn.active {
  background: linear-gradient(135deg, #4A7C10 0%, var(--color-primary-dark) 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(74, 124, 16, 0.3);
}

.tab-btn:not(.active) {
  background: var(--color-bg-white);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.tab-emoji {
  font-size: 1.25rem;
}

/* Track Content Visibility & Fade Transition */
.track-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.track-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SCAM ALERT CARD (긴급 사기 경보)
   ============================================ */
.scam-alert-card {
  background: #FFF5F5;
  border: 1.5px solid #FFCDD2;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid #E53935;
}

.scam-alert-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.scam-alert-icon {
  font-size: 1.5rem;
  animation: pulseRed 1.8s infinite;
}

@keyframes pulseRed {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.scam-alert-header h3 {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: #C62828;
}

.scam-alert-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: var(--space-xs);
}

.scam-alert-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ============================================
   AI BRAND CARD (NotebookLM 추천 배너)
   ============================================ */
.ai-brand-card {
  background: linear-gradient(135deg, #F0F4FF 0%, #E8EFFF 100%);
  border: 1.5px solid #B2CFFF;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid #1A73E8;
}

.ai-brand-badge-wrapper {
  margin-bottom: var(--space-sm);
  display: flex;
}

.ai-brand-badge {
  background: #1A73E8;
  color: white;
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
}

.ai-brand-body h3 {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: #0D47A1;
  margin-bottom: var(--space-xs);
}

.ai-brand-body p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ============================================
   Q&A BOARD (질문 게시판 & PWA 락 스크린)
   ============================================ */
.qna-lock-screen {
  background: var(--color-bg-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.qna-lock-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  animation: floatLock 3s ease-in-out infinite;
}

@keyframes floatLock {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.qna-lock-screen h3 {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.qna-lock-screen p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.qna-install-trigger-btn {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: white;
  font-weight: 700;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  box-shadow: 0 4px 15px rgba(252, 180, 8, 0.35);
  animation: pulseCTA 2.5s infinite;
}

@keyframes pulseCTA {
  0%, 100% { box-shadow: 0 4px 15px rgba(252, 180, 8, 0.35); }
  50% { box-shadow: 0 4px 25px rgba(252, 180, 8, 0.6); transform: scale(1.01); }
}

/* 인라인 설치 가이드 (alert 대체) */
.install-guide-steps {
  margin-top: var(--space-lg);
  background: linear-gradient(135deg, #FFF8E1 0%, #FFFDF5 100%);
  border: 1.5px solid rgba(252, 180, 8, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: left;
  animation: slideDown 0.4s ease;
}

.install-guide-title {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  text-align: center;
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.5;
}

.install-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--font-size-sm);
}

.install-guide-done {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px dashed rgba(252, 180, 8, 0.3);
  font-size: var(--font-size-sm);
  color: var(--color-primary-dark);
  font-weight: 700;
  text-align: center;
}

/* 실제 질문 작성 폼 — 모바일 가로폭 100% 활용 및 비좁은 블럭 여백 제거 */
.qna-board-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: var(--space-md) 0;
  box-shadow: none;
}

.qna-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  width: 100%;
}

/* 입력 필드 레이블 (시니어 친화 안내 문구) */
.form-label {
  display: block;
  font-size: calc(var(--font-size-base) * 1.3);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  width: 100%;
  word-break: keep-all; /* 시스템 폰트 확대 시 자연스럽게 개행 */
}

/* 레이블 아래 보충 설명 텍스트 */
.form-helper-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

/* 질문 등록 직후 카드 하이라이트 애니메이션 */
@keyframes cardHighlight {
  0% { 
    background-color: rgba(157, 196, 58, 0);
    box-shadow: 0 0 0 0 rgba(74, 124, 16, 0.6); 
  }
  30% { 
    background-color: rgba(157, 196, 58, 0.2);
    box-shadow: 0 8px 24px rgba(74, 124, 16, 0.4); 
    transform: scale(1.03);
    border-color: #4CAF50;
  }
  100% { 
    background-color: rgba(157, 196, 58, 0);
    box-shadow: 0 0 0 0 rgba(74, 124, 16, 0); 
    transform: scale(1);
    border-color: var(--color-primary-dark);
  }
}

.qna-card.just-submitted {
  animation: cardHighlight 2s cubic-bezier(0.25, 1, 0.5, 1) 3; /* 2초 애니메이션 3회 반복 (총 6초) */
  border: 2px solid var(--color-primary-dark);
  border-radius: var(--radius-md);
  position: relative;
  z-index: 10;
  padding: var(--space-md);
  margin: var(--space-sm) 0;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.form-row > div {
  width: 100%; /* 부모 flex의 자식 div들이 화면에 꽉 차도록 명시 */
}

.form-row input {
  width: 100%; /* 입력창이 좌우 가로폭에 빈틈없이 꽉 참 */
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);  /* 20px — 시니어 가독성 최적 */
  font-family: var(--font-family);
  color: var(--color-text);
  background: #FFFFFF;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  min-height: 56px;
}

.qna-form textarea {
  width: 100%; /* 입력창이 좌우 가로폭에 빈틈없이 꽉 참 */
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);  /* 20px — 시니어 가독성 최적 */
  font-family: var(--font-family);
  color: var(--color-text);
  background: #FFFFFF;
  outline: none;
  resize: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  min-height: 130px;
  line-height: 1.6;
}

.form-row input::placeholder,
.qna-form textarea::placeholder {
  color: #AAAAAA;
  font-size: var(--font-size-base);
}

.form-row input:focus,
.qna-form textarea:focus {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(157, 196, 58, 0.2);
}

.qna-submit-btn {
  width: 100%; /* 등록 버튼도 좌우 꽉 참 */
  padding: var(--space-md);
  background: linear-gradient(135deg, #4A7C10 0%, var(--color-primary-dark) 100%);
  color: white;
  font-weight: 800;
  font-size: var(--font-size-xl);  /* 24px — 큰 글자 버튼 */
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 60px;
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.3px;
}

.qna-submit-btn:active {
  transform: scale(0.98);
}

/* Q&A 게시글 리스트 스타일 — 가로폭 100% 게시판형 리팩토링 */
.qna-list-container {
  border-top: 2px solid var(--color-border);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
}

/* 전체 질문 / 내 질문 가로형 세그먼트 필터 바 */
.qna-filter-bar {
  display: flex;
  background: #EAEAEA;
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.filter-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-secondary);
  border-radius: calc(var(--radius-md) - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  transition: all var(--transition-fast);
  min-height: 50px;
  cursor: pointer;
}

.filter-tab-btn.active {
  background: #FFFFFF;
  color: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-weight: 800;
  transform: scale(1.02);
}

.qna-list-header-row {
  display: flex;
  flex-direction: row; /* 좌우로 시원하게 나란히 배치 */
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  width: 100%;
  border-bottom: 2px solid var(--color-text);
  padding-bottom: var(--space-sm);
}

.qna-list-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0;
}

.qna-recover-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #666666;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qna-recover-btn:hover, .qna-recover-btn:active {
  background: rgba(0, 0, 0, 0.08);
  color: #333333;
}

/* 폼 상단 가벼운 주의사항 안내 */
.form-notice {
  word-break: keep-all;
  line-height: 1.4;
  background: #FFF8E1;
  border-left: 4px solid #FFC107;
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.notice-icon {
  font-size: 1.2rem;
}

.qna-list {
  display: flex;
  flex-direction: column;
  gap: 0; /* 빽빽한 리스트 게시판 구조 */
}

.qna-loading, .qna-empty {
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--font-size-base);
  padding: var(--space-xl) 0;
}

/* 개별 카드 -> 심플한 줄글형(게시판 스타일) 구조로 변경 */
.qna-card {
  border: none;
  border-bottom: 1.5px solid var(--color-border); /* 구분선으로만 처리 */
  border-radius: 0;
  padding: var(--space-md) 0; /* 좌우 여백을 완전히 없애서 글씨가 넓게 보이게 함 */
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.qna-card:active {
  background: rgba(0, 0, 0, 0.02);
}

.qna-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  gap: var(--space-sm);
}

.qna-card-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  min-width: 0;
}

.qna-card-name {
  font-weight: 800;
  font-size: var(--font-size-base); /* 이름도 크게 */
  color: var(--color-text);
}

.qna-card-date {
  font-size: var(--font-size-sm);
  color: #666666;
}

/* 배지 스타일 */
.qna-badge {
  font-size: var(--font-size-sm);
  font-weight: 700;
  padding: 4px var(--space-sm);
  border-radius: var(--radius-sm);
}

.badge-waiting {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.badge-answered {
  background: var(--color-primary-light);
  color: #4A7C10;
}

.qna-card-question {
  font-size: calc(var(--font-size-base) * 1.3);
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 500;
  word-break: keep-all;
  padding: var(--space-xs) 0;
  
  /* 정확히 3줄에서 자르고 말줄임표 처리 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 카드가 열렸을 때는 질문 전체 다 보여주기 */
.qna-card.open .qna-card-question {
  -webkit-line-clamp: unset;
}

/* 답변 영역 아코디언 */
.qna-card-answer-box {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
  overflow: hidden;
}

.qna-card.open .qna-card-answer-box {
  grid-template-rows: 1fr;
  margin-top: var(--space-sm);
}



.qna-answer {
  background: var(--color-primary-bg);
  border-left: 5px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  min-height: 0;
  
  /* 닫혀 있을 때 패딩/마진 제거 및 투명화 (내용 삐져나옴 방지) */
  padding: 0 var(--space-md);
  margin: 0;
  opacity: 0;
  transition: padding 0.3s ease, margin 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
}

/* 열렸을 때 정상적인 패딩/마진 복구 */
.qna-card.open .qna-answer {
  border-color: var(--color-primary-dark);
  padding: var(--space-md);
  margin: var(--space-xs) 0;
  opacity: 1;
}

.qna-answer-title {
  font-weight: 800;
  font-size: var(--font-size-base);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.qna-answer-content {
  font-size: calc(var(--font-size-base) * 1.3);  /* 시니어 답변 가독성 1.3배 강화 */
  color: var(--color-text);
  line-height: 1.8;  /* 줄 간격 넉넉히 — 줄바꿈 문단 구분 잘 보이게 */
  word-break: keep-all;
  white-space: pre-line;  /* 줄바꿈(\n) 자동 반영 */
}

.qna-no-answer {
  font-size: var(--font-size-base);
  color: var(--color-text-light);
  font-style: italic;
  padding: var(--space-md) 0;
  text-align: center;
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* ============================================
   Q&A LIST HEADER & FILTER (내 질문 필터 & 강조)
   ============================================ */

/* 내 질문 강조 배지 */
.badge-my-question {
  background: #FFF3E0;
  color: #E65100;
  border: 1.5px solid #FFCC80;
}

/* ============================================
   Q&A HEADER ACTIONS & RECOVER BUTTON
   ============================================ */
.qna-header-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap; /* 버튼 글자가 길어져도 다음 줄로 아름답게 래핑 */
  width: 100%;
}

.my-questions-toggle-btn,
.qna-recover-trigger-btn {
  flex: 1; /* 단추가 가로 전체 너비를 골고루 나누어 가지도록 설정 (어르신 터치 최적화) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-md); /* 둥근 캡슐 대신 슬릭한 네모 스타일로 공간 확보 */
  font-size: var(--font-size-sm);
  font-weight: 700;
  transition: all var(--transition-fast);
  cursor: pointer;
  min-height: 48px; /* 터치하기 넉넉한 세로 높이 */
  text-align: center;
  white-space: nowrap;
}

.qna-recover-trigger-btn {
  border: 1.5px solid #ADCAFF;
  background: #F0F4FF;
  color: #1A73E8;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-family);
}

.qna-recover-trigger-btn:active {
  transform: scale(0.96);
}

/* Q&A 개인정보 안심 안내문 - 폰트 키운 어르신들을 위해 크게 패딩 보강 */
.qna-disclaimer {
  font-size: var(--font-size-sm); /* 글꼴 크기를 크게 보강 */
  color: #C62828;
  line-height: 1.6;
  background: #FFF5F5;
  border: 1px solid #FFCDD2;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  text-align: left;
}

/* ============================================
   Q&A RECOVER MODAL (내 질문 불러오기 팝업)
   ============================================ */
.recover-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.recover-modal.show {
  display: flex;
}

.recover-modal-content {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.4s ease;
  position: relative;
}

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

.recover-modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  position: relative;
}

.recover-modal-icon {
  font-size: 1.75rem;
}

.recover-modal-header h3 {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0;
}

.recover-modal-close {
  position: absolute;
  right: -5px;
  top: -5px;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--color-text-light);
  cursor: pointer;
  line-height: 1;
  padding: var(--space-xs);
  transition: color var(--transition-fast);
}

.recover-modal-close:hover {
  color: var(--color-text);
}

.recover-modal-desc {
  word-break: keep-all;
  line-height: 1.5;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  text-align: left;
}

.recover-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.recover-form input {
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);  /* 20px — 시니어 가독성 */
  font-family: var(--font-family);
  color: var(--color-text);
  background: #FAFFFE;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  min-height: 60px;
}

.recover-form input:focus {
  border-color: #1A73E8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
  background: #FFFFFF;
}

.recover-submit-btn {
  padding: var(--space-md);
  background: linear-gradient(135deg, #1A73E8 0%, #1557B0 100%);
  color: white;
  font-weight: 700;
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 54px;
  box-shadow: 0 4px 15px rgba(26, 115, 232, 0.2);
  border: none;
  cursor: pointer;
}

.recover-submit-btn:active {
  transform: scale(0.98);
}

/* ============================================
   GUIDE CARD (질문 방법 안내 카드)
   ============================================ */
.guide-card {
  background: var(--color-primary-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-xl) 0;
  box-shadow: var(--shadow-sm);
}

.guide-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.guide-icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.guide-card-header h3 {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: #2E7D32;
  margin: 0;
}

.guide-card-body {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.guide-card-body p {
  margin-bottom: var(--space-md);
}

/* ============================================
   Q&A CARD DELETE BUTTON (내 질문 삭제 버튼)
   ============================================ */
.qna-delete-container {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
  width: 100%;
}

.qna-delete-action-btn {
  background: transparent;
  border: 1.5px solid #FFCDD2;
  color: #D32F2F;
  font-weight: 700;
  font-size: var(--font-size-sm);
  padding: 6px var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
}

.qna-delete-action-btn:active {
  background: #FFEBEE;
  transform: scale(0.97);
}

/* ============================================
   Q&A ANSWER HYPERLINK (답변 내 자동 링크 활성화)
   ============================================ */
.qna-answer-hyperlink {
  color: #1A73E8;
  font-weight: 700;
  text-decoration: underline;
  word-break: break-all; /* 모바일에서 URL이 길어져도 화면 밖으로 안 넘어가게 자동 줄바꿈 */
  display: inline;
  padding: 2px 4px;
  background: rgba(26, 115, 232, 0.05); /* 터치 영역 힌트를 위해 연한 블루 배경 가볍게 적용 */
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.qna-answer-hyperlink:active {
  color: #0D47A1;
  background: rgba(26, 115, 232, 0.15);
}

/* ============================================
   Q&A LIMIT & PREMIUM UNLOCK
   ============================================ */
.qna-limit-badge {
  background: var(--color-accent-light, #FFFDF5);
  border: 1.5px solid var(--color-accent, #FCB408);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--color-text, #1A1A1A);
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.qna-limit-badge strong {
  color: #D32F2F;
  font-size: 1.3rem;
  padding: 0 6px;
}

.qna-limit-lock-screen {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.qna-limit-lock-screen.hidden {
  display: none;
}

.limit-lock-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.qna-limit-lock-screen h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--color-text, #1A1A1A);
  line-height: 1.4;
  letter-spacing: -0.5px;
}

.qna-limit-lock-screen p {
  font-size: 1.05rem;
  color: var(--color-text-secondary, #555);
  margin-bottom: 20px;
  line-height: 1.5;
}

.premium-code-box {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}

.premium-code-box input {
  padding: 12px 16px;
  font-size: 1.1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  width: 160px;
  text-align: center;
}

.premium-code-box input:focus {
  border-color: var(--color-primary-dark, #2E7D32);
  outline: none;
}

.premium-code-box button {
  padding: 12px 24px;
  background: var(--color-primary-dark, #4A7C10);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 10px rgba(74, 124, 16, 0.3);
}

.premium-code-box button:active {
  transform: scale(0.95);
}

.premium-promo {
  border-top: 1px dashed #ccc;
  padding-top: 20px;
}

.premium-promo p {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #777;
}

.premium-join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FF0000; /* YouTube Red */
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(255,0,0,0.3);
  transition: transform 0.2s;
}

.premium-join-btn:active {
  transform: scale(0.97);
}

.premium-join-btn span {
  margin-right: 8px;
  font-size: 1.2rem;
}



/* 자발적 후원 박스 스타일 */
.donation-accordion {
  background-color: #FCFbf9; /* 따뜻한 오프화이트 */
  border: 1px dashed #E5D5C5; /* 은은한 브라운 점선 */
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(141, 123, 104, 0.05); /* 부드러운 그림자 */
  transition: all 0.3s ease;
}

.donation-summary {
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  background-color: transparent;
  list-style: none; /* 기본 화살표 숨김 */
}

.donation-summary::-webkit-details-marker {
  display: none;
}

.donation-summary-text {
  font-size: 21px;
  font-weight: 800;
  color: #8D7B68; /* 부드럽고 따뜻한 텍스트 */
  display: block;
  text-align: center;
  width: 100%;
  line-height: 1.4;
}

.donation-summary-hint {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
  color: #B0A290;
}

details[open].donation-accordion {
  border: 1px solid #E5D5C5;
  box-shadow: 0 8px 24px rgba(141, 123, 104, 0.08);
}

.donation-account-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 20px;
  gap: 6px;
  border-top: 1px dashed #E5D5C5;
  animation: slideDownFade 0.3s ease forwards;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-bank {
  font-size: 13px;
  font-weight: 700;
  color: #8D7B68;
  line-height: 1.2;
}

.account-number {
  font-weight: 800;
  font-size: 22px;
  color: var(--color-primary-dark);
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.donation-copy-btn {
  width: 100%;
  margin-top: 0;
  background: #8D7B68; /* 커피색 버튼 */
  border: none;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 10px rgba(141, 123, 104, 0.2);
  transition: all 0.2s ease;
}

.donation-copy-btn:active {
  background: #6C5B49;
  transform: translateY(2px);
}
/* 음성 입력 버튼 스타일 */
.voice-input-btn {
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary-dark);
  color: var(--color-primary-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.voice-input-btn.recording {
  background: #FF3B30;
  border-color: #FF3B30;
  color: white;
  animation: pulse-red 1.5s infinite;
}

.voice-status {
  font-size: var(--font-size-sm);
  color: #FF3B30;
  font-weight: 700;
  margin-top: 4px;
  text-align: right;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.voice-input-btn {
  min-height: 48px !important;
  font-size: var(--font-size-base) !important;
  padding: 12px 24px !important;
}
.qna-install-trigger-btn {
  min-height: 56px !important;
  font-size: 18px !important;
}
.toast-message {
  position: fixed;
  bottom: 32px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 90%;
  max-width: 360px;
  transform: translateY(100px);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  white-space: pre-line;
  box-sizing: border-box;
  word-break: keep-all;
  text-align: center;
  line-height: 1.5;
}
.toast-message.show {
  transform: translateY(0);
  opacity: 1;
}
