/* ==========================================================================
   SNurdy 이용안내 웹페이지 공용 스타일
   앱 디자인 토큰(Colors.xcassets)에서 추출한 값을 그대로 사용합니다.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand — blue */
  --blue-100: #eef2fe;
  --blue-200: #e5ebfd;
  --blue-400: #809ef4;
  --blue-500: #537cf0;
  --blue-700: #4263c0;
  --blue-900: #324a90;
  --blue-1000: #25386c;

  /* Accent — pink */
  --pink-100: #feeef4;
  --pink-300: #fdccdd;
  --pink-400: #f75992;
  --pink-600: #c64775;

  /* Neutral */
  --gray-100: #f8f9fa;
  --gray-200: #f4f6f8;
  --gray-300: #e9ebf0;
  --gray-400: #b8c0cf;
  --gray-600: #939aa6;
  --gray-800: #6e737c;
  --gray-900: #53565d;
  --gray-1100: #292b2e;
  --gray-1200: #111213;

  /* Semantic */
  --bg: var(--gray-100);
  --surface: #ffffff;
  --border: var(--gray-300);
  --text: var(--gray-1100);
  --text-sub: var(--gray-900);
  --text-mute: var(--gray-800);
  --warn-bg: #ffe7cc;
  --warn-line: #ff8800;
  --ok-bg: #deffe2;
  --ok-line: #45d957;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(37, 56, 108, .06), 0 8px 24px rgba(37, 56, 108, .06);

  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

/* --------------------------------------------------------------- base --- */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--blue-700); }
a:hover { color: var(--blue-900); }

/* ------------------------------------------------------------- layout --- */

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 96px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 249, 250, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__brand {
  font-weight: 800;
  font-size: 17px;
  color: var(--blue-900);
  text-decoration: none;
  letter-spacing: -.01em;
}

.topbar__nav {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.topbar__nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-sub);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.topbar__nav a:hover { background: var(--blue-100); color: var(--blue-900); }
.topbar__nav a[aria-current="page"] { background: var(--blue-500); color: #fff; }

/* 좁은 화면에서는 브랜드 아래로 내리고, 넘치면 가로 스크롤 */
@media (max-width: 620px) {
  .topbar__inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
  }

  .topbar__nav {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar__nav::-webkit-scrollbar { display: none; }

  .topbar__nav a { padding: 6px 11px; font-size: 13.5px; }
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding: 44px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--blue-1000);
}

.hero p {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
}

.hero__meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 600;
  font-size: 13px;
}

.chip--pink { background: var(--pink-100); color: var(--pink-600); }
.chip--gray { background: var(--gray-300); color: var(--gray-900); }

/* -------------------------------------------------------- typography --- */

h2 {
  margin: 52px 0 14px;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -.015em;
  color: var(--blue-1000);
  scroll-margin-top: 80px;
}

h3 {
  margin: 32px 0 10px;
  font-size: 17px;
  color: var(--blue-900);
  scroll-margin-top: 80px;
}

h4 {
  margin: 22px 0 8px;
  font-size: 15px;
  color: var(--gray-1100);
}

p { margin: 0 0 14px; }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 5px 0; }
li::marker { color: var(--blue-400); }

small, .small { font-size: 13px; color: var(--text-mute); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* --------------------------------------------------------------- card --- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 20px;
  box-shadow: var(--shadow);
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}

.card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(37, 56, 108, .08), 0 14px 32px rgba(37, 56, 108, .10);
}

.card--link h3 { margin-top: 0; }

/* -------------------------------------------------------------- notes --- */

.note {
  border-left: 4px solid var(--blue-400);
  background: var(--blue-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 15px;
}

.note--warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.note--danger { border-left-color: var(--pink-400); background: var(--pink-100); }
.note--ok { border-left-color: var(--ok-line); background: var(--ok-bg); }

.note strong { display: block; margin-bottom: 4px; }
.note > :last-child { margin-bottom: 0; }

/* 채워 넣어야 하는 자리 표시자 */
.fill {
  background: var(--warn-bg);
  border-bottom: 2px dashed var(--warn-line);
  color: #8a4a00;
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* --------------------------------------------------------------- toc --- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 8px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-800);
}

.toc ol { margin: 0; padding-left: 20px; font-size: 15px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- table --- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 460px;
}

th, td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--blue-100);
  color: var(--blue-1000);
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--gray-100); }

/* ------------------------------------------------- annotated screenshot --- */

.shot {
  margin: 20px 0 28px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 600px) {
  .shot { grid-template-columns: 1fr; }
}

.shot__frame {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border: 2px dashed var(--gray-400);
  border-radius: 22px;
  background: var(--gray-200) repeating-linear-gradient(
    45deg, transparent 0 10px, rgba(184, 192, 207, .18) 10px 20px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  font-size: 12px;      /* 이미지 미교체 시 대체 텍스트 크기 */
  color: var(--gray-800);
  text-align: center;
}

/* 이미지가 준비되면 프레임의 점선/패턴을 지우고 싶을 때 붙이는 클래스 */
.shot__frame--ready {
  border: 1px solid var(--border);
  background: var(--surface);
}

/* 번호 핀 — --x, --y 가 가리키는 지점의 왼쪽 위에 반투명하게 얹힙니다.
   가리키는 요소를 덮지 않도록 오프셋과 투명도를 함께 씁니다. */
.pin {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-78%, -78%);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(247, 89, 146, .82);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 25px;
  text-align: center;
  letter-spacing: -.02em;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .75),
    0 1px 4px rgba(0, 0, 0, .28);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  pointer-events: none;
}

/* 핀이 가리키는 지점을 표시하는 작은 점 — 오프셋된 핀과 대상을 이어 줍니다 */
.pin::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(247, 89, 146, .9);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8);
}

.pin--blue { background: rgba(83, 124, 240, .82); }
.pin--blue::after { background: rgba(83, 124, 240, .9); }

/* 마우스를 올리면 또렷해져서 확인하기 쉽습니다 */
.shot__frame:hover .pin { background: rgba(247, 89, 146, .95); }

.shot__notes { margin: 0; padding: 0; list-style: none; counter-reset: pin; }

.shot__notes li {
  counter-increment: pin;
  position: relative;
  padding-left: 34px;
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
}

.shot__notes li::before {
  content: counter(pin);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink-400);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}

.shot__notes li b { color: var(--blue-900); }

.shot__caption {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
}

/* ----------------------------------------------------------------- faq --- */

.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--blue-1000);
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

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

.faq summary::before {
  content: "Q";
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-500);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  margin-top: 2px;
}

.faq summary:hover { background: var(--blue-100); }
.faq[open] summary { border-bottom: 1px solid var(--border); }

.faq__body { padding: 16px 20px 18px 52px; font-size: 15px; color: var(--text-sub); }
.faq__body > :last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- steps --- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 14px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--blue-500);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  line-height: 26px;
  text-align: center;
}

/* -------------------------------------------------------------- misc --- */

kbd, .ui {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--gray-200);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-1100);
  white-space: nowrap;
}

/* ------------------------------------------------------------ license --- */

.license-notice {
  margin: 0;
  padding: 14px 16px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-1100);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.license-full {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  max-height: 60vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.license-full pre {
  margin: 0;
  padding: 20px 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--gray-900);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}

.footer a { color: var(--text-mute); }

.to-top {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  text-decoration: none;
}

@media print {
  .topbar, .to-top { display: none; }
  body { background: #fff; }
  .card, .toc, .table-scroll { box-shadow: none; }
}
