/* =========================================================
   성분 검색기 — 바탕 토큰 · 공통 조각
   다크 블랙 베이스 + 핫핑크 포인트
   ========================================================= */

:root {
  /* 글씨 크기 배율 (성분 검색기 고유 값) */
  --fs: .94;

  /* 바탕 */
  --bg: #0b0910;
  --bg-2: #100d15;
  --surface: #16121c;
  --surface-2: #1b1622;
  --surface-3: #221b2a;

  /* 선 */
  --line: rgba(255, 105, 165, .22);
  --line-soft: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 77, 141, .42);

  /* 핑크 포인트 */
  --pink: #ff4d8d;
  --pink-2: #ff75a8;
  --pink-3: #ff9dba;
  --pink-deep: #c9185a;
  --pink-glow: rgba(255, 77, 141, .45);
  --pink-rgb: 255, 77, 141;
  --pink-2-rgb: 255, 117, 168;
  --pink-3-rgb: 255, 157, 186;
  --pink-line-rgb: 255, 105, 165;
  --glow-2: rgba(160, 90, 255, .10);

  /* 글자 */
  --text: #f5edf2;
  --text-2: #cbbcc8;
  --text-3: #a99aa6;
  --text-4: #82737f;
  --on-pink: #1a0711;

  --scroll-thumb: #3b2c3a;
  --radius: 22px;

  --font-title: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --font-hand: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  scrollbar-color: var(--scroll-thumb) var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: calc(16px * var(--fs, .94));
  line-height: 1.65;
  letter-spacing: -.01em;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, #0c0a12, #09070d),
    linear-gradient(to right, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
}

/* 모서리의 핑크 번짐 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(70vw 50vh at 4% -8%, rgba(var(--pink-rgb), .16), transparent 68%),
    radial-gradient(52vw 40vh at 98% 2%, var(--glow-2), transparent 70%),
    radial-gradient(80vw 55vh at 50% 112%, rgba(var(--pink-rgb), .10), transparent 72%);
}

/* 필름 그레인 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(var(--pink-rgb), .38); color: #fff; }

a { color: var(--pink-2); }

:focus-visible {
  outline: 1.5px solid rgba(var(--pink-line-rgb), .62);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--pink);
  color: var(--on-pink);
  font-weight: 600;
  text-decoration: none;
  font-size: calc(14px * var(--fs, .94));
  transition: top .2s;
}
.skip:focus { top: 14px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  position: relative;
  z-index: 3;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 22px 76px;
}
.kit-page { max-width: 1180px; }

/* =========================================================
   단독 사이트 머리 — 브랜드 표시 + 안내
   ========================================================= */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 2px 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-title);
  font-size: calc(12.5px * var(--fs, .94));
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
}
.brandmark i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-2), var(--pink-deep));
  box-shadow: 0 0 12px rgba(var(--pink-rgb), .85);
}
.brandmark:hover { color: var(--pink-3); }

.site-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.head-note {
  font-size: calc(11.5px * var(--fs, .94));
  letter-spacing: .06em;
  color: var(--text-4);
}

/* =========================================================
   페이지 헤더
   ========================================================= */

.subhead {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 4px 4px 20px;
  border-bottom: 1px dashed var(--line);
}
.subhead-title { min-width: 0; }

.kicker,
.subhead .kicker {
  display: block;
  margin: 0 0 6px;
  font-size: calc(12px * var(--fs, .94));
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--pink-2);
}

.subhead h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(27px, 4.4vw, 36px);
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--text);
}

.subhead .sub {
  margin: 8px 0 0;
  font-family: var(--font-hand);
  font-size: calc(19px * var(--fs, .94));
  color: var(--text-2);
}

.subhead .lead {
  max-width: 52ch;
  margin: 6px 0 0;
  font-size: calc(13px * var(--fs, .94));
  line-height: 1.7;
  color: var(--text-3);
  word-break: keep-all;
}

/* 검색 입력의 브라우저 기본 지우기 버튼은 우리 × 버튼과 겹치므로 숨긴다 */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.subhead-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

/* =========================================================
   하단
   ========================================================= */

.foot {
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
}
.foot-note {
  margin: 0;
  font-family: var(--font-hand);
  font-size: calc(19px * var(--fs, .94));
  color: var(--pink-2);
}
.foot-small {
  margin: 0;
  font-size: calc(12px * var(--fs, .94));
  letter-spacing: .06em;
  color: var(--text-3);
}
.foot-small a {
  color: var(--pink-3);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--pink-rgb), .3);
}
.foot-small a:hover { color: var(--pink-2); border-color: var(--pink); }

/* =========================================================
   토스트 — 오른쪽 아래
   ========================================================= */

.toast {
  position: fixed;
  left: auto;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  transform: translateY(14px);
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(26, 20, 32, .96);
  color: var(--text);
  font-size: calc(13px * var(--fs, .94));
  letter-spacing: -.01em;
  line-height: 1.45;
  box-shadow: 0 18px 40px -20px #000, 0 0 0 1px rgba(var(--pink-rgb), .08);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  max-width: min(calc(100vw - 28px), 330px);
  text-align: left;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.toast.is-on {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  cursor: pointer;
}

/* =========================================================
   모션 최소화
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 560px) {
  .page { padding: 20px 14px 64px; }
  .site-head { margin-bottom: 16px; }
  .head-note { display: none; }
  .subhead-side { align-items: flex-start; text-align: left; }
  .foot { margin-top: 34px; }
}
