@charset "utf-8";
/* -------------------------------
   건강똑똑 모바일 공통 페이지 m_common.css
-------------------------------- */

/* Color Palette -------------------------------------------------------- */
:root {
  --primary-120: #A51A1F;
  --primary: #CE2127; /* Default */
  --primary-75: #DA585D;
  --primary-50: #E79093;
  --primary-35: #EEB1B4;
  --primary-10: #F8DEDF;
  --primary-5:  #FDF4F4;

  /* Grey */
  --black: #222222;
  --text: #222222;
  --grey-39: #393939;
  --grey-59: #595959;
  --grey-91: #919191;
  --grey-bd: #BDBDBD;
  --grey-d5: #D5D5D5;
  --grey-e9: #E9E9E9;
  --grey-f4: #F4F4F4;
  --white: #FFFFFF;
  --black-10: #111111;

  --ultramarine: #222F59;
  --ultramarine-80: #4E597A;
  --ultramarine-10: #E9EBEF;

  --focus: #CE2127;
  --positive: #2163C5;
  --negative: #21C531;

  --bg-red: #FCF4F4;
  --bg-f4: #F4F4F4;
  --bg-fa: #FAFAFA;

  --footer: #222222;

  --ff-base: "Pretendard", system-ui, -apple-system, "Segoe UI", Roboto,
             "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
             "Helvetica Neue", Arial, sans-serif;
  --ff-sans-suit: "SUIT", system-ui, -apple-system, "Segoe UI", Roboto,
                  "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
                  "Helvetica Neue", Arial, sans-serif;

  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;

  --line: rgba(17, 17, 17, 0.1);
  --line-d5: #D5D5D5;

  /* Layout (모바일 기준) */
  --container: 600px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Font-face ------------------------------------------------------------ */
/* Pretendard Variable (300?700) */
@font-face {
  font-family: 'Pretendard';
  src: url('/fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
/* SUIT Variable (300?700) */
@font-face {
  font-family: 'SUIT';
  src: url('/fonts/SUIT-Variable.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Reset --------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: clip;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  font-weight: var(--fw-400);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  max-width: var(--container);
  min-width: 320px;
  font-family: var(--ff-base);
  font-size: 14px;
  background-color: var(--white);
  padding: 0;  
  margin: 0 auto;
  width: 100%;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  border: 0;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 리스트/블록 기본값 정리 (모바일 공통) */
ul,
ol,
dl,
dd,
li,
button,
figure {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

section,
div {
  position: relative;
}

/* 포커스 -------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Typography ---------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--text);
  font-weight: var(--fw-700);
  line-height: 1.25;
}

h1 {
  font-size: clamp(24px, 6.4vw, 30px);
}

h2 {
  font-size: clamp(20px, 5.4vw, 24px);
}

h3 {
  font-size: clamp(17px, 4.6vw, 20px);
}

p {
  margin: 0;
  padding: 0;
}

/* 멀티라인 말줄임 */
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Layout & Utilities -------------------------------------------------- */
.container {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding-inline: 16px;
  position: relative;
}

/* 모바일 기본 섹션 여백 */
.section {
  padding: 24px 0;
  margin: 0; /* 개별 페이지에서 필요시 조정 */
}

/* 구분선 */
.hr,
hr {
  border: 0;
  border-top: 1px dashed var(--primary);
  margin: 24px 0;
}

/* 버튼 공통 ------------------------------------------------------------ */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 0;
  padding: 0;
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--white);
  border: 0px solid transparent;
  box-shadow: none;
  font-weight: var(--fw-600);
  font-size: 14px;  
}

.btn--ghost,
.m-btn--ghost {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary-35);
}

.btn--line,
.m-btn--line {
  background: var(--white);
  color: var(--grey-39);
  border-color: var(--grey-39);
}

.btn--d5line {
  background: var(--white);
  color: var(--grey-39);
  border: 1px solid var(--grey-d5);
}

.btn--primary-75 {
  background: var(--primary-75);
  color: var(--white);
  border: 0;
}

/* Badge / Chip -------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-weight: var(--fw-600);
  font-size: 11px;
}

.badge--positive {
  background: color-mix(in srgb, var(--positive) 12%, #fff);
  color: var(--positive);
}

.badge--negative {
  background: color-mix(in srgb, var(--negative) 12%, #fff);
  color: var(--negative);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-700);
  font-size: 14px;
  line-height: 1.4;
}

/* Link --------------------------------------------------------------- */
.link {
  color: var(--ultramarine-80);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link:hover {
  color: var(--ultramarine);
}

/* Form --------------------------------------------------------------- */
.input,
.select,
.textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--grey-d5);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--primary);
  outline: 3px solid color-mix(in srgb, var(--primary) 24%, transparent);
}

/* Background helpers ------------------------------------------------- */
.bg-red { background: var(--bg-red); }
.bg-f4  { background: var(--bg-f4); }
.bg-fa  { background: var(--bg-fa); }

.footer,
.m-footer {
  background: var(--footer);
  color: var(--white);
}

/* Helper utilities --------------------------------------------------- */
.hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  padding: 0;
}

.mt-0  { margin-top: 0 !important; }
.mb-0  { margin-bottom: 0 !important; }
.mt-8  { margin-top: 8px; }
.mb-8  { margin-bottom: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.mt-56 { margin-top: 56px; }

.m-clamp-2 {
	display: -webkit-box;
  -webkit-line-clamp: 2;     
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: keep-all;
}

.pad-16 { padding: 16px; }
.pad-24 { padding: 24px; }

.round { border-radius: var(--radius-lg); }
