/* 토스 느낌: 흰 카드, 큰 숫자, 파란 포인트, 한 단(single column) 레이아웃 */
:root {
  color-scheme: light;
  --blue: #3182f6;
  --blue-dark: #1b64da;
  --blue-bg: #e8f3ff;
  --blue-bg-hover: #d6e8ff;
  --green: #0f9d58;
  --green-bg: #e5f6ec;
  --text: #191f28;
  --sub: #4e5968;
  --muted: #646f7c; /* 보조 설명 글씨: 흰 배경·회색 배경 모두 대비 4.5:1 이상 */
  --line: #e5e8eb;
  --bg: #f2f4f6;
  --surface: #ffffff;
  --topbar: rgba(255, 255, 255, 0.92);
  --ghost-hover: #e5e8eb;
  --check-off: #d1d6db;
  --chev: #b0b8c1;
  --bar-soft: #b0c8f0;
  --chip-on-bg: #191f28;
  --chip-on-text: #ffffff;
  --warn: #c25e00;
  --warn-bg: #fff3e5;
  --red: #f04452;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  /* 글자 크기 5단계 (아이콘·입력칸 제외). 보조 설명도 14px 아래로 내려가지 않는다. */
  --fs-amount: 2rem;     /* 32px 큰 금액 */
  --fs-title: 1.625rem;  /* 26px 페이지 제목 */
  --fs-card: 1.125rem;   /* 18px 카드 제목 */
  --fs-body: 0.9375rem;  /* 15px 본문 */
  --fs-small: 0.875rem;  /* 14px 보조 설명 */
}

/* 다크 모드: 기기 설정을 따르되, 상단 버튼으로 고른 값(data-theme)이 있으면 그걸 쓴다. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue: #4c8dff;
    --blue-dark: #7aa9ff;
    --blue-bg: #1c2b45;
    --blue-bg-hover: #243758;
    --green: #3ccf84;
    --green-bg: #173326;
    --text: #e8eaed;
    --sub: #b4bcc6;
    --muted: #959da8;
    --line: #2e3238;
    --bg: #111215;
    --surface: #1c1e22;
    --topbar: rgba(28, 30, 34, 0.92);
    --ghost-hover: #2a2d33;
    --check-off: #3a3e45;
    --chev: #5c636d;
    --bar-soft: #34476b;
    --chip-on-bg: #e8eaed;
    --chip-on-text: #111215;
    --warn: #ffb259;
    --warn-bg: #352712;
    --red: #ff6b75;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #4c8dff;
  --blue-dark: #7aa9ff;
  --blue-bg: #1c2b45;
  --blue-bg-hover: #243758;
  --green: #3ccf84;
  --green-bg: #173326;
  --text: #e8eaed;
  --sub: #b4bcc6;
  --muted: #959da8;
  --line: #2e3238;
  --bg: #111215;
  --surface: #1c1e22;
  --topbar: rgba(28, 30, 34, 0.92);
  --ghost-hover: #2a2d33;
  --check-off: #3a3e45;
  --chev: #5c636d;
  --bar-soft: #34476b;
  --chip-on-bg: #e8eaed;
  --chip-on-text: #111215;
  --warn: #ffb259;
  --warn-bg: #352712;
  --red: #ff6b75;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--blue); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }

/* ---- 상단 바 ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--topbar);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { color: var(--text); font-weight: 800; font-size: var(--fs-card); }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav a { color: var(--sub); font-weight: 600; font-size: var(--fs-body); padding: 6px 12px; border-radius: 10px; }
.topnav a:hover { background: var(--bg); }
.topnav a[aria-current="page"] { color: var(--blue); background: var(--blue-bg); }

main { padding-bottom: 48px; }

/* ---- 제목 영역 ---- */
.hero { padding: 40px 4px 28px; }
.eyebrow { color: var(--blue); font-weight: 700; font-size: var(--fs-body); margin: 0 0 8px; }
.hero h1, .page-title {
  font-size: var(--fs-title);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero p.sub, .page-sub { color: var(--sub); font-size: var(--fs-body); margin: 12px 0 0; }
.page-head { padding: 28px 4px 20px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: var(--fs-body); margin-bottom: 14px; }
.back:hover { color: var(--sub); }
.step { color: var(--blue); font-weight: 700; font-size: var(--fs-small); margin: 0 0 6px; }

/* ---- 카드 ---- */
.card { background: var(--surface); border-radius: var(--radius); padding: 24px 20px; margin-bottom: 12px; }
.card-title { font-size: var(--fs-card); font-weight: 700; margin: 0 0 4px; }
.card-sub { color: var(--muted); font-size: var(--fs-small); margin: 0 0 12px; }

/* ---- 리스트 행 (토스 리스트) ---- */
.list { list-style: none; margin: 0 -8px; padding: 0; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 8px;
  border-radius: 14px;
  color: inherit;
  background: none;
  border: 0;
  text-align: left;
}
.row:hover { background: var(--bg); }
.row:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; }
.row .ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--bg);
  font-size: 1.5rem;
  font-weight: 700;
}
.row .txt { flex: 1; min-width: 0; }
.row .ttl { display: block; font-weight: 700; font-size: var(--fs-body); }
.row .dsc { display: block; color: var(--muted); font-size: var(--fs-small); }
.row .chev { flex: none; color: var(--chev); font-size: 1.3rem; }

/* ---- 메인: 소개 · 사용법 ---- */
.hero-cta { margin-top: 20px; }
.how-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: how; }
.how-steps li { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; counter-increment: how; }
.how-steps li::before {
  content: counter(how);
  grid-row: span 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.how-steps .ttl { font-weight: 700; }
.how-steps .dsc { color: var(--muted); font-size: var(--fs-small); }
.features { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.features li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.features .ico { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; }
.features small { color: var(--muted); font-weight: 500; }
#templates { scroll-margin-top: 72px; }
/* 넓은 화면(PC)에서는 메인만 폭을 넓혀 두 칸으로 놓는다. 휴대폰은 지금처럼 세로 한 줄. */
@media (min-width: 900px) {
  body:has(.home-grid) .container { max-width: 1000px; }
  .hero { max-width: 720px; }
  .home-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  .home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
  .home-intro > .card, .home-grid > .card, .home-side > .card:last-child { margin-bottom: 0; }
  /* 왼쪽과 오른쪽 칸의 위·아래 끝을 맞춘다. 짧은 쪽 카드는 늘어나고, 늘어난 공간은 목록 줄 사이에 고르게 나눈다. */
  .home-side { display: grid; grid-auto-rows: 1fr; gap: 12px; }
  .home-side > .card { margin-bottom: 0; } /* grid-auto-rows: 1fr로 오른쪽 두 카드도 같은 높이 */
  .home-grid .card { display: flex; flex-direction: column; }
  .home-grid .card > .list { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
  .home-grid { margin-bottom: 12px; }
}

/* ---- 선택지 (라디오 행) ---- */
.choice-list { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg);
  cursor: pointer;
  border: 2px solid transparent;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .txt { flex: 1; }
.choice .ttl { display: block; font-weight: 700; }
.choice .dsc { display: block; color: var(--muted); font-size: var(--fs-small); }
.choice .check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--check-off);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
}
.choice:has(input:checked) { background: var(--blue-bg); border-color: var(--blue); }
.choice:has(input:checked) .check { background: var(--blue); }
.choice:has(input:focus-visible) { outline: 2px solid var(--blue-dark); outline-offset: 2px; }

/* ---- 버튼 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: var(--fs-body);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-soft { background: var(--blue-bg); color: var(--blue-dark); }
.btn-soft:hover { background: var(--blue-bg-hover); }
.btn-ghost { background: var(--bg); color: var(--sub); }
.btn-ghost:hover { background: var(--ghost-hover); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: var(--fs-small); border-radius: 10px; }

.bottom-cta {
  position: sticky;
  bottom: 0;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* ---- 칩 (규모/리전 전환) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips-label { width: 100%; color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.chip {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--sub);
  font-weight: 600;
  font-size: var(--fs-small);
}
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); }
.controls { display: grid; gap: 10px; margin-bottom: 16px; }

/* ---- 결과: 계산 조건 한 줄 (누르면 규모/리전/도메인 칩이 펼쳐짐) ---- */
.settings-line { padding-top: 16px; padding-bottom: 16px; }
.settings-line > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; font-weight: 700; }
.settings-line > summary::-webkit-details-marker { display: none; }
.settings-label { display: block; color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.settings-btn { flex: none; color: var(--blue); font-size: var(--fs-small); }
.settings-btn::after { content: "바꾸기 ⌄"; }
.settings-line[open] .settings-btn::after { content: "닫기 ⌃"; }
.settings-line .controls { margin: 16px 0 0; }

/* ---- 결과: 맨 위 구성 + 다른 방법 접기 ---- */
.pick-label { color: var(--blue); font-weight: 800; font-size: var(--fs-body); margin: 0 0 6px; }
.option-main .recommend-why { margin: 10px 0 0; }
.cheaper-hint { color: var(--sub); font-size: var(--fs-small); margin: 8px 0 0; }
.others > summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}
.others > summary::-webkit-details-marker { display: none; }
.others > summary::after { content: " ⌄"; }
.others[open] > summary::after { content: " ⌃"; }

.bars { display: grid; gap: 14px; }
.bar-head { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-body); margin-bottom: 6px; }
.bar-head .name { font-weight: 600; }
.bar-head .val { font-weight: 700; }
.bar-track { background: var(--bg); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { background: var(--bar-soft); height: 100%; border-radius: 999px; min-width: 6px; }
.bar.cheapest .bar-fill { background: var(--blue); }
.bar.cheapest .val { color: var(--blue); }

/* ---- 구성안 카드 ---- */
.option-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.option-name { font-size: var(--fs-card); font-weight: 800; margin: 0; }
.tag { border-radius: 8px; padding: 3px 8px; font-size: var(--fs-small); font-weight: 700; background: var(--bg); color: var(--sub); white-space: nowrap; }
.tag-blue { background: var(--blue-bg); color: var(--blue); }
.option-summary { color: var(--sub); margin: 6px 0 16px; }
.amount { font-size: var(--fs-amount); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.amount small { font-size: var(--fs-body); font-weight: 600; color: var(--muted); }
.amount-krw { color: var(--sub); }
.amount-compare { color: var(--muted); font-size: var(--fs-small); margin-top: 4px; }

.warn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 10px; font-size: var(--fs-small); }
.warn summary { cursor: pointer; padding: 6px 10px; list-style: none; font-weight: 700; }
.warn summary::-webkit-details-marker { display: none; }
.warn summary::before { content: "⚠ "; }
.warn[open] { flex-basis: 100%; }
.warn p { margin: 0; padding: 0 12px 10px; color: var(--text); font-size: var(--fs-small); }

.more { margin-top: 16px; border-top: 1px solid var(--line); }
.more > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0 2px;
  color: var(--sub);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "펼치기 ⌄"; color: var(--muted); font-weight: 600; font-size: var(--fs-small); }
.more[open] > summary::after { content: "접기 ⌃"; }

.section-label { color: var(--sub); font-size: var(--fs-small); font-weight: 700; margin: 20px 0 8px; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li + li { border-top: 1px solid var(--line); }
.lines details > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}
.lines details > summary::-webkit-details-marker { display: none; }
.lines .lbl::after { content: " ⓘ"; color: var(--blue); font-size: var(--fs-small); }
.lines .usd { font-weight: 700; white-space: nowrap; }
.why { background: var(--bg); border-radius: 12px; padding: 12px; margin-bottom: 10px; color: var(--sub); font-size: var(--fs-small); }
.formula { display: block; margin-top: 6px; color: var(--text); font-size: var(--fs-small); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pros-cons ul { margin: 0; padding-left: 0; list-style: none; font-size: var(--fs-small); }
.pros-cons li { padding: 2px 0 2px 22px; position: relative; }
.pros li::before { content: "＋"; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.cons li::before { content: "－"; position: absolute; left: 0; color: var(--red); font-weight: 800; }

.option-actions { margin-top: 16px; }

/* ---- 입력 칸 ---- */
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.field label { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--sub); margin-bottom: 4px; }
.field .input-wrap { position: relative; }
.field input, .field select {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--blue); background-color: var(--surface); }
.field .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: var(--fs-small); pointer-events: none; }
.field input.has-unit { padding-right: 52px; }
.field .help { font-size: var(--fs-small); color: var(--muted); margin: 4px 0 0; }
.field details.help > summary { cursor: pointer; list-style: none; }
.field details.help > summary::-webkit-details-marker { display: none; }
.field details.help > summary::after { content: " 더 보기"; color: var(--blue); font-weight: 600; white-space: nowrap; }
.field details.help[open] > summary::after { content: " 접기"; }
.field details.help p { margin: 2px 0 0; }
.field.invalid input { outline: 2px solid var(--red); }

.adjust > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.adjust > summary::-webkit-details-marker { display: none; }
.adjust > summary::after { content: "⌄"; color: var(--muted); font-size: 1.2rem; }
.adjust[open] > summary::after { content: "⌃"; }
.adjust .fields { margin-top: 16px; }
.adjust-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: var(--fs-small); }
.modified { color: var(--blue); font-weight: 700; }

/* ---- 직접 계산기 ---- */
.item-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.item-head .ico { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; }
.item-head .txt { flex: 1; min-width: 0; }
.item-head .ttl { display: block; font-weight: 800; }
.item-head .dsc { display: block; color: var(--muted); font-size: var(--fs-small); }
.item-cost { font-weight: 800; font-size: var(--fs-card); text-align: right; white-space: nowrap; }
.item-error { color: var(--red); font-size: var(--fs-small); font-weight: 600; }
.remove { border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 4px 6px; border-radius: 8px; }
.remove:hover { background: var(--bg); color: var(--text); }

.service-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.service-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  padding: 14px;
  text-align: left;
}
.service-btn:hover { background: var(--blue-bg); }
.service-btn .ico { font-size: 1.3rem; font-weight: 700; }
.service-btn .ttl { font-weight: 700; }
.service-btn .dsc { color: var(--muted); font-size: var(--fs-small); }
.service-grid.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.service-grid.compact .service-btn { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; }
.service-grid.compact .ico { font-size: 1.1rem; }

.empty { text-align: center; color: var(--muted); padding: 28px 0 8px; }
.empty strong { display: block; color: var(--text); font-size: var(--fs-card); margin-bottom: 4px; }

.total-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.total-bar .label { color: var(--sub); font-weight: 600; }
.total-bar .usd { font-size: var(--fs-title); font-weight: 800; }
.total-bar .krw { color: var(--muted); font-size: var(--fs-small); text-align: right; }

/* ---- 안내 ---- */
.notes ul { margin: 8px 0 0; padding-left: 18px; color: var(--sub); font-size: var(--fs-small); }
.notes li { margin: 4px 0; }

.site-footer { color: var(--muted); font-size: var(--fs-small); padding: 8px 20px 40px; }
.loading, .error { padding: 60px 4px; color: var(--muted); }
.error { color: var(--red); }

/* ---- 상단 바: 테마 버튼 ---- */
.theme-btn { border: 0; background: none; font-size: 1.1rem; line-height: 1; padding: 8px; border-radius: 10px; }
.theme-btn:hover { background: var(--bg); }

/* ---- 추천·난이도 배지 ---- */
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-easy { background: var(--green-bg); color: var(--green); }
.tag-mid { background: var(--bg); color: var(--sub); }
.tag-hard { background: var(--warn-bg); color: var(--warn); }
.recommend-why { color: var(--sub); font-size: var(--fs-small); }
.vat { color: var(--muted); font-size: var(--fs-small); font-weight: 500; }

.excluded { margin: 0; padding-left: 18px; color: var(--sub); font-size: var(--fs-small); }
.excluded li { margin: 2px 0; }

/* ---- 결과: 놓치기 쉬운 비용 ---- */
.hidden-costs .section-label:first-of-type { margin-top: 4px; }
.hidden-lines { list-style: none; margin: 0; padding: 0; }
.hidden-lines li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hidden-lines li:last-child { border-bottom: 0; }
.hidden-lines .txt { display: flex; flex-direction: column; }
.hidden-lines .ttl { font-weight: 600; }
.hidden-lines .dsc { color: var(--muted); font-size: var(--fs-small); }
.hidden-lines .num { flex: none; font-weight: 700; }
.guide-link { display: inline-block; margin-top: 14px; color: var(--blue); font-weight: 700; font-size: var(--fs-small); }

/* ---- 놓치기 쉬운 비용 안내 페이지 ---- */
.guide-item p { margin: 8px 0 0; color: var(--sub); }
.guide-item .guide-cost { color: var(--text); font-weight: 700; }
.guide-avoid { padding: 12px 14px; border-radius: 12px; background: var(--blue-bg); }
.guide-avoid strong { display: block; color: var(--blue); font-size: var(--fs-small); margin-bottom: 2px; }

/* ---- 용어 ---- */
.term {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline dotted var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: help;
}
.term:hover { color: var(--blue); }
.term-sample { text-decoration: underline dotted var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.term-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
}
.term-sheet-inner {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border: 1px solid var(--line);
}
.term-sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-card); }
.term-sheet p { margin: 8px 0 12px; color: var(--sub); }
.term-sheet a { font-weight: 700; font-size: var(--fs-small); }

.glossary-cat > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.glossary-cat > summary::-webkit-details-marker { display: none; }
.glossary-cat > summary .card-title { margin: 0; }
.glossary-cat .cat-count { color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.glossary-cat > summary::after { content: "⌄"; margin-left: auto; color: var(--muted); font-size: 1.2rem; }
.glossary-cat[open] > summary::after { content: "⌃"; }
.glossary-cat .glossary { margin-top: 8px; }
.glossary { margin: 0; }
.glossary-item + .glossary-item { border-top: 1px solid var(--line); }
.glossary-item { padding: 12px 0; }
.glossary dt { font-weight: 700; }
.glossary .alias { color: var(--muted); font-weight: 500; font-size: var(--fs-small); }
.glossary dd { margin: 4px 0 0; color: var(--sub); font-size: var(--fs-body); }
.field input[type="search"] { padding-right: 14px; }

/* ---- 가격 변동 ---- */
.change-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; font-size: var(--fs-body); }
.up { color: var(--red); font-weight: 700; }
.down { color: var(--blue); font-weight: 700; }

/* ---- 정적 소개 페이지의 가격표 ---- */
.table-wrap { overflow-x: auto; margin: 8px -4px 0; }
.price-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.price-table th, .price-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.price-table thead th { color: var(--sub); font-weight: 600; }
.price-table thead small { color: var(--muted); font-weight: 500; }
.price-table td { text-align: right; font-weight: 700; white-space: nowrap; }

/* ---- 구성 다이어그램 ---- */
.dg-wrap { margin-top: 16px; }
.dg-wrap > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-small);
}
.dg-wrap > summary::-webkit-details-marker { display: none; }
.dg-line { color: var(--sub); }
.dg-toggle { flex: none; color: var(--blue); font-weight: 700; }
.dg-toggle .t-close, .dg-wrap[open] .dg-toggle .t-open { display: none; }
.dg-wrap[open] .dg-toggle .t-close { display: inline; }
.dg-wrap[open] > .diagram { margin-top: 8px; }
@media (min-width: 561px) {
  /* 넓은 화면은 그림을 항상 펼쳐 두므로 요약 줄이 필요 없다 */
  .dg-wrap[open] > summary { display: none; }
  .dg-wrap[open] > .diagram { margin-top: 0; }
}
.diagram {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg);
  overflow-x: auto;
}
.dg-col { display: flex; flex-direction: column; gap: 6px; flex: 1 1 0; min-width: 0; }
.dg-node { background: var(--surface); border-radius: 12px; padding: 10px; border: 1px solid var(--line); }
.dg-head { display: flex; align-items: flex-start; gap: 6px; line-height: 1.3; }
.dg-head strong { display: block; font-size: var(--fs-small); }
.dg-head small { display: block; color: var(--muted); font-size: var(--fs-small); }
.dg-ico { font-size: 1.1rem; font-weight: 700; }
.dg-usd { font-weight: 800; font-size: var(--fs-body); margin-top: 4px; }
.dg-notes { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.dg-notes li { font-size: var(--fs-small); color: var(--sub); background: var(--bg); border-radius: 6px; padding: 2px 6px; }
.dg-notes li.warn-note { color: var(--warn); background: var(--warn-bg); font-weight: 600; }
.dg-arrow { flex: none; width: 14px; height: 14px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); margin: 0 2px; }

/* ---- 값 바꾸기: 더 보기 ---- */
.adjust-more { margin-top: 12px; }
.adjust-more > summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: var(--fs-small); list-style: none; }
.adjust-more > summary::-webkit-details-marker { display: none; }
.adjust-more > summary::after { content: " ⌄"; }
.adjust-more[open] > summary::after { content: " ⌃"; }

.chip-more { border: 0; background: none; color: var(--blue); font-weight: 700; font-size: var(--fs-small); padding: 6px 8px; cursor: pointer; }
.chip.chip-more { background: var(--surface); }
.warn-extra:not([hidden]) { display: contents; }

/* ---- 만든 다음 꼭 할 일 ---- */
.after-launch ol { list-style: none; counter-reset: step; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.after-launch li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; align-items: start; }
.after-launch li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.after-launch summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 28px; cursor: pointer; list-style: none; font-weight: 700; }
.after-launch summary::-webkit-details-marker { display: none; }
.after-launch summary::after { content: "⌄"; flex: none; color: var(--muted); }
.after-launch details[open] > summary::after { content: "⌃"; }
.after-launch details p { margin: 4px 0 0; color: var(--sub); font-size: var(--fs-small); }

/* ---- 공유 ---- */
.share-row { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 40;
  transform: translate(-50%, 20px);
  background: var(--chip-on-bg);
  color: var(--chip-on-text);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.footer-note { margin: 0; }
.site-footer .footer-links { display: grid; gap: 6px; margin-top: 12px; }
.footer-group { display: grid; grid-template-columns: 76px 1fr; gap: 12px; }
.footer-label { color: var(--muted); font-weight: 700; }
.footer-items { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.privacy { margin-top: 12px; }
.privacy > summary { cursor: pointer; width: fit-content; }
.privacy p { margin: 6px 0 0; }

@media (max-width: 560px) {
  .diagram { flex-direction: column; align-items: stretch; }
  .dg-col { flex: none; }
  .dg-arrow { align-self: center; transform: rotate(135deg); margin: 2px 0; }
  .card { padding: 20px 16px; }
  .pros-cons { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
}
