/* ============================================================
   css/nutrition.css - 맞춤 영양 가이드 (/nutrition/)
   큰 글씨·큰 버튼: 질문 32~36px, 보기 높이 80px 이상, 시작 버튼 72px 이상
   ============================================================ */
.ng-app { max-width: 720px; margin: 0 auto 30px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px 22px 26px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.ng-app h1:focus { outline: none; }

/* 위쪽: 이전 / 가+ */
.ng-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; margin-bottom: 8px; }
.ng-back, .ng-font { min-height: 52px; padding: 0 16px; border: 2px solid #cbd5e1; border-radius: 12px; background: #fff; font: inherit; font-size: 20px; font-weight: 700; color: #0f172a; cursor: pointer; }
.ng-back:hover, .ng-font:hover { background: #f1f5f9; }
.ng-font { margin-left: auto; color: #065f46; border-color: #6ee7b7; }
.ng-font small { font-size: 14px; font-weight: 400; margin-left: 4px; color: #475569; }
.ng-brand { font-size: 19px; font-weight: 700; color: #065f46; }

/* 진행 표시: 숫자 + 막대 */
.ng-progress { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.ng-progress__num { font-size: 20px; font-weight: 700; color: #065f46; white-space: nowrap; }
.ng-progress__bar { flex: 1; height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.ng-progress__bar span { display: block; height: 100%; background: #059669; border-radius: 6px; transition: width .3s; }

/* 질문 */
.ng-q { font-size: 36px; line-height: 1.35; font-weight: 800; color: #0f172a; margin: 8px 0 22px; word-break: keep-all; }
.ng-q--life { font-size: 32px; }
.ng-q--sm { font-size: 30px; }
.ng-hint { font-size: 19px; color: #475569; margin: 14px 0 0; word-break: keep-all; }
.ng-hint--top { margin: -10px 0 18px; }

/* 보기: 진한 배경 + 체크 (색만으로 구분하지 않음) */
.ng-opts { display: grid; gap: 12px; }
.ng-opts--grid { grid-template-columns: 1fr 1fr; }
.ng-opt { display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 12px 20px; border: 3px solid #cbd5e1; border-radius: 14px; background: #fff; font: inherit; font-size: 25px; font-weight: 700; color: #0f172a; text-align: left; cursor: pointer; word-break: keep-all; }
.ng-opt small { display: block; font-size: 17px; font-weight: 400; color: #475569; }
.ng-opt:hover { border-color: #059669; background: #f0fdf4; }
.ng-opt__check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 3px solid #94a3b8; border-radius: 50%; font-size: 20px; }
.ng-opt.is-on { background: #065f46; border-color: #065f46; color: #fff; }
.ng-opt.is-on small { color: #d1fae5; }
.ng-opt.is-on .ng-opt__check { background: #fff; border-color: #fff; color: #065f46; }
.ng-opt[data-unsure] { font-size: 21px; font-weight: 600; color: #475569; border-style: dashed; }
.ng-opt[data-unsure].is-on { color: #fff; }

/* 큰 버튼 */
.ng-main { display: block; width: 100%; min-height: 72px; margin-top: 22px; padding: 12px 20px; border: 0; border-radius: 14px; background: #059669; color: #fff; font: inherit; font-size: 26px; font-weight: 800; cursor: pointer; }
.ng-main:hover { background: #047857; }
.ng-main:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; }
.ng-sub { display: block; width: 100%; min-height: 60px; margin-top: 12px; border: 2px solid #cbd5e1; border-radius: 14px; background: #fff; font: inherit; font-size: 21px; font-weight: 700; color: #334155; cursor: pointer; }
.ng-sub:hover { background: #f1f5f9; }

/* S01 진입 */
.ng-hero { background: linear-gradient(135deg, #059669 0%, #065f46 100%); color: #fff; border-radius: 14px; padding: 30px 24px; }
.ng-hero__kicker { font-size: 18px; opacity: .9; margin: 0 0 8px; }
.ng-hero__title { font-size: 34px; line-height: 1.35; font-weight: 800; margin: 0 0 12px; word-break: keep-all; }
.ng-hero__sub { display: inline-block; background: rgba(255,255,255,.2); border-radius: 20px; padding: 4px 14px; font-size: 19px; font-weight: 700; margin: 0; }
.ng-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; }
.ng-steps li { flex: 1 1 150px; font-size: 20px; font-weight: 700; background: #f0fdf4; border-radius: 12px; padding: 12px 14px; }
.ng-steps b { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; background: #059669; color: #fff; border-radius: 50%; margin-right: 6px; font-size: 17px; }

/* S02 안내 */
.ng-notice { font-size: 22px; line-height: 1.55; background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 12px; padding: 16px 18px; margin: 0 0 12px; word-break: keep-all; }
.ng-notice__sub { display: block; font-size: 18px; color: #475569; margin-top: 4px; }
.ng-notice--med { background: #eff6ff; border-color: #bfdbfe; font-size: 20px; }
.ng-notice--end { font-size: 19px; margin-top: 18px; }
.ng-agree { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 18px; margin-top: 6px; border: 3px solid #059669; border-radius: 14px; font-size: 24px; font-weight: 700; cursor: pointer; }
.ng-agree input { width: 34px; height: 34px; accent-color: #059669; flex: none; }

/* S06 결과 */
.ng-result-title { font-size: 32px; font-weight: 800; margin: 4px 0 18px; }
.ng-caution { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 14px 18px; margin-bottom: 16px; border: 3px solid #f97316; border-radius: 14px; background: #fff7ed; font: inherit; font-size: 21px; text-align: left; color: #7c2d12; cursor: pointer; }
.ng-caution > span:first-child { font-size: 30px; }
.ng-caution__more { margin-left: auto; font-weight: 700; white-space: nowrap; }
.ng-recs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ng-rec { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; width: 100%; padding: 18px 20px; border: 2px solid #a7f3d0; border-radius: 14px; background: #fff; font: inherit; text-align: left; color: #0f172a; cursor: pointer; }
.ng-rec:hover { background: #f0fdf4; }
.ng-rec.has-warn { border-color: #f97316; }
.ng-rec__name { font-size: 28px; font-weight: 800; white-space: nowrap; }
.ng-rec__warn { font-size: 22px; }
.ng-grade { align-self: center; padding: 4px 14px; border-radius: 20px; font-size: 18px; font-weight: 800; white-space: nowrap; }
.ng-grade--must { background: #065f46; color: #fff; }
.ng-grade--good { background: #d1fae5; color: #065f46; }
.ng-rec__why { grid-column: 1 / -1; font-size: 21px; color: #334155; }
.ng-rec__more { grid-column: 1 / -1; font-size: 18px; font-weight: 700; color: #059669; }
.ng-empty { font-size: 22px; line-height: 1.6; background: #f0fdf4; border-radius: 14px; padding: 22px; }
.ng-why { margin-top: 18px; border: 2px solid #e2e8f0; border-radius: 14px; padding: 0 18px; font-size: 19px; }
.ng-why summary { min-height: 60px; display: flex; align-items: center; font-size: 21px; font-weight: 700; cursor: pointer; }
.ng-why h3 { font-size: 20px; margin: 14px 0 6px; color: #065f46; }
.ng-why ul { padding-left: 22px; margin: 0; }
.ng-why li { margin-bottom: 6px; }
.ng-why p { margin: 0 0 8px; }
.ng-why[open] { padding-bottom: 12px; }

/* S07 주의 안내: 색 + 아이콘 + 문구 */
.ng-int { border: 3px solid #f59e0b; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fffbeb; }
.ng-int--avoid { border-color: #dc2626; background: #fef2f2; }
.ng-int--gap { border-color: #f97316; background: #fff7ed; }
.ng-int__level { display: inline-block; font-size: 20px; font-weight: 800; padding: 4px 12px; border-radius: 10px; background: #fff; }
.ng-int__nut { font-size: 28px; font-weight: 800; margin: 10px 0 4px; }
.ng-int__who { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.ng-int__text { font-size: 21px; line-height: 1.55; margin: 0 0 10px; }
.ng-int__rev { font-size: 17px; color: #475569; margin: 0; }

/* S08 영양소 상세 */
.ng-box { border: 2px solid #e2e8f0; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.ng-box h2 { font-size: 22px; font-weight: 800; color: #065f46; margin: 0 0 10px; }
.ng-box--food { background: #f0fdf4; border-color: #a7f3d0; }
.ng-func { margin: 0; padding-left: 24px; font-size: 21px; line-height: 1.6; }
.ng-src { font-size: 16px; color: #64748b; margin: 8px 0 0; }
.ng-std { font-size: 24px; font-weight: 700; margin: 0; }
.ng-foods { font-size: 23px; font-weight: 700; margin: 0; }

/* S09 인쇄·공유 */
.ng-actions { display: grid; gap: 12px; }
.ng-action { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 20px; border: 3px solid #a7f3d0; border-radius: 14px; background: #fff; font: inherit; font-size: 23px; font-weight: 800; color: #065f46; text-align: left; text-decoration: none; cursor: pointer; }
.ng-action:hover { background: #f0fdf4; text-decoration: none; }
.ng-pharm { margin-top: 12px; background: #f0fdf4; border-radius: 14px; padding: 16px 18px; font-size: 20px; line-height: 1.6; }
.ng-pharm p { margin: 0 0 8px; }
.ng-pharm ul { margin: 0; padding-left: 24px; }

/* S05 ④ 약 이름으로 찾기 (식약처) */
.ng-drug { margin-top: 26px; padding: 18px; border: 3px dashed #a7f3d0; border-radius: 16px; background: #f8fafc; }
.ng-drug__title { font-size: 25px; font-weight: 800; color: #065f46; margin: 0; }
.ng-drug__title small { font-size: 18px; color: #64748b; font-weight: 700; }
.ng-drug .ng-hint { margin-top: 8px; }
.ng-hint--sm { font-size: 16px; color: #64748b; }
.ng-drug__form { display: flex; gap: 10px; margin-top: 14px; }
.ng-drug__input { flex: 1; min-width: 0; min-height: 64px; padding: 8px 16px; border: 3px solid #94a3b8; border-radius: 12px; font: inherit; font-size: 24px; background: #fff; color: #0f172a; }
.ng-drug__input:focus { border-color: #059669; outline: 3px solid #a7f3d0; }
.ng-drug__btn { flex: none; min-width: 96px; min-height: 64px; border: 0; border-radius: 12px; background: #065f46; color: #fff; font: inherit; font-size: 23px; font-weight: 800; cursor: pointer; }
.ng-drug__btn:disabled { opacity: .55; cursor: wait; }
.ng-drug__msg { font-size: 20px; font-weight: 700; color: #334155; margin: 10px 0 0; min-height: 1em; word-break: keep-all; }
.ng-drug__msg:empty { display: none; }
.ng-drug__msg:focus { outline: none; }
.ng-drug__hits { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.ng-drug__hit { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; min-height: 72px; padding: 12px 16px; border: 3px solid #cbd5e1; border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; color: #0f172a; }
.ng-drug__hit:hover { border-color: #059669; }
.ng-drug__hit.is-on { border-color: #059669; background: #ecfdf5; cursor: default; }
.ng-drug__name { font-size: 21px; font-weight: 800; word-break: break-all; }
.ng-drug__hit small { grid-column: 1; font-size: 16px; color: #64748b; word-break: keep-all; }
.ng-drug__add { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 19px; font-weight: 800; color: #059669; white-space: nowrap; }
.ng-drug__mine { margin-top: 16px; padding-top: 14px; border-top: 2px solid #e2e8f0; }
.ng-drug__mine h3 { font-size: 21px; font-weight: 800; margin: 0 0 8px; }
.ng-drug__mine ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ng-drug__mine li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #ecfdf5; font-size: 20px; font-weight: 700; }
.ng-drug__mine li span { flex: 1; min-width: 0; word-break: break-all; }
.ng-drug__del { flex: none; min-height: 48px; padding: 6px 14px; border: 2px solid #94a3b8; border-radius: 10px; background: #fff; font: inherit; font-size: 18px; font-weight: 700; color: #334155; cursor: pointer; }

/* S06 결과: 식약처 DUR */
.ng-dur { margin: 18px 0; padding: 16px 18px; border: 2px solid #e2e8f0; border-radius: 16px; }
.ng-dur__title { font-size: 24px; font-weight: 800; margin: 0 0 10px; }
.ng-dur__h { font-size: 22px; font-weight: 800; margin: 16px 0 10px; color: #92400e; }
.ng-dur__h--avoid { color: #b91c1c; }
.ng-dur__h small { display: block; font-size: 16px; font-weight: 700; color: #64748b; }
.ng-dur__msg { font-size: 20px; font-weight: 700; margin: 0; word-break: keep-all; }
.ng-dur__msg small { display: block; font-size: 16px; color: #64748b; font-weight: 600; margin-top: 4px; }
.ng-dur__act { font-size: 20px; color: #b91c1c; margin: 0 0 6px; word-break: keep-all; }
.ng-dur .ng-int__nut { font-size: 23px; word-break: break-all; }
.ng-sub--sm { min-height: 52px; font-size: 19px; }

/* 진입 배너 (홈·건강정보·강좌 글 아래) */
.ng-banner { display: flex; align-items: center; gap: 16px; margin: 24px 0; padding: 20px 22px; border-radius: 16px; background: linear-gradient(135deg, #059669 0%, #065f46 100%); color: #fff; text-decoration: none; }
.ng-banner:hover { color: #fff; text-decoration: none; filter: brightness(1.05); }
.ng-banner__icon { font-size: 44px; flex: none; }
.ng-banner__text { flex: 1; }
.ng-banner__title { display: block; font-size: 23px; font-weight: 800; line-height: 1.35; word-break: keep-all; }
.ng-banner__sub { display: block; font-size: 17px; opacity: .92; margin-top: 4px; }
.ng-banner__btn { flex: none; background: #fff; color: #065f46; font-size: 20px; font-weight: 800; border-radius: 12px; padding: 12px 18px; }

@media (max-width: 768px) {
  .ng-app { padding: 14px 14px 22px; border-radius: 12px; }
  .ng-q { font-size: 30px; }
  .ng-q--life { font-size: 28px; }
  .ng-q--sm, .ng-result-title { font-size: 27px; }
  .ng-hero__title { font-size: 29px; }
  .ng-opt { font-size: 23px; padding: 12px 16px; }
  .ng-opts--grid { grid-template-columns: 1fr; }
  .ng-steps li { flex-basis: 100%; padding: 10px 14px; }
  .ng-caution { flex-wrap: wrap; font-size: 20px; }
  .ng-caution > span:nth-child(2) { flex: 1; min-width: 0; }
  .ng-caution__more { width: 100%; text-align: right; }
  .ng-rec__name { font-size: 25px; }
  .ng-grade { font-size: 16px; padding: 4px 10px; }
  .ng-banner { flex-wrap: wrap; }
  .ng-banner__btn { width: 100%; text-align: center; }
  .ng-drug { padding: 14px; }
  .ng-drug__input { font-size: 22px; }
  .ng-drug__name { font-size: 20px; }
  .ng-dur { padding: 14px; }
}

/* 인쇄: 결과지만 A4 한 장, 큰 글씨 */
#ng-print { display: none; }
@media print {
  /* 인쇄 직전에 #ng-print를 body 바로 아래로 옮기므로, 나머지는 통째로 숨김 */
  body > *:not(#ng-print) { display: none !important; }
  body { background: #fff !important; padding: 0 !important; }
  #ng-print { display: block !important; color: #000; font-size: 13.5pt; line-height: 1.45; }
  #ng-print h1 { font-size: 21pt; margin: 0 0 2pt; }
  #ng-print h2 { font-size: 15pt; margin: 0 0 3pt; }
  #ng-print h2 span { font-size: 11.5pt; border: 1px solid #000; border-radius: 10pt; padding: 0 7pt; margin-left: 6pt; }
  #ng-print p { margin: 0 0 2pt; }
  .ngp-basis { font-size: 12pt; margin-bottom: 8pt !important; }
  .ngp-item { border: 1.5pt solid #000; border-radius: 8pt; padding: 6pt 10pt; margin-bottom: 6pt; page-break-inside: avoid; }
  .ngp-warn { border: 2.5pt solid #000; border-radius: 8pt; padding: 6pt 10pt; margin-bottom: 6pt; page-break-inside: avoid; }
  .ngp-ask ul { margin: 0; padding-left: 18pt; }
  .ngp-foot { font-size: 10pt; margin-top: 8pt !important; }
  @page { size: A4; margin: 12mm; }
}
