/* 사이드엑싯 — 기본 토큰·레이아웃·버튼·폼 */
:root {
  --ink: #15171c;
  --ink-2: #3b4150;
  --muted: #6b7180;
  --line: #e6e7eb;
  --line-2: #d5d8de;
  --bg: #ffffff;
  --bg-soft: #f6f7f5;
  --bg-sunk: #eef0ed;
  --brand: #0d6e5f;
  --brand-600: #0a5b4f;
  --brand-50: #e7f3f0;
  --brand-100: #cfe7e1;
  --accent: #f26b1d;
  --accent-50: #fff1e8;
  --ok: #15803d;
  --ok-50: #e9f7ee;
  --warn: #b45309;
  --warn-50: #fdf4e3;
  --bad: #b42318;
  --bad-50: #fdecea;
  --info: #1d4ed8;
  --info-50: #ebf1fe;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --wrap: 1120px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section-soft { background: var(--bg-soft); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sticky { position: sticky; top: 84px; }
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-side { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
}

/* 머리·꼬리 */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: block; flex: none; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.on { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; }
.dot { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .72rem; line-height: 18px; text-align: center; font-weight: 700; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-header .bar { flex-wrap: wrap; height: auto; min-height: 64px; padding: 10px 0; }
  .nav, .nav-right { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0; }
  .site-header.open .nav, .site-header.open .nav-right { display: flex; }
  .nav a { padding: 12px; }
}
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 36px 0 48px; margin-top: 64px; color: var(--muted); font-size: .88rem; }
.site-footer a { color: var(--ink-2); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; font-weight: 600; }
.foot-biz { line-height: 1.8; }
.foot-biz span + span::before { content: "·"; margin: 0 8px; color: var(--line-2); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .96rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 1px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.95); }
.btn-outline { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: #fff; border-color: #f3c7c2; color: var(--bad); }
.btn-danger:hover { background: var(--bad-50); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.inline-form { display: inline; }

/* 폼 */
.form .field { margin-bottom: 18px; }
.form label.lbl, .lbl { display: block; font-weight: 700; font-size: .93rem; margin-bottom: 6px; }
.req { color: var(--accent); margin-left: 2px; }
.help { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.errors { color: var(--bad); font-size: .86rem; margin: 4px 0 0; padding: 0; list-style: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a0a5b1; }
.has-error input, .has-error select, .has-error textarea { border-color: #e6a39b; background: #fffafa; }
.input-unit { position: relative; }
.input-unit input { padding-right: 52px; }
.input-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.man-preview { color: var(--brand); font-size: .85rem; font-weight: 600; margin-top: 4px; min-height: 1em; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: .95rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
ul.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
ul.checks li { display: flex; gap: 8px; align-items: center; }
ul.checks input { width: 18px; height: 18px; accent-color: var(--brand); }
@media (max-width: 640px) { ul.checks { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.seg li { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg label { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-weight: 650; cursor: pointer; background: #fff; }
.seg input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:focus-visible + label { outline: 3px solid var(--brand-100); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; background: #fff; }
.fieldset > legend, .fieldset > .legend { font-weight: 800; font-size: 1.02rem; padding: 0 6px; }
details.more { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; background: var(--bg-soft); }
details.more > summary { cursor: pointer; font-weight: 750; }
details.more[open] > summary { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* 알림 */
.flash { border-radius: 10px; padding: 12px 16px; margin: 16px 0; font-weight: 600; font-size: .95rem; border: 1px solid transparent; }
.flash-success { background: var(--ok-50); color: #14532d; border-color: #c4e7d0; }
.flash-info { background: var(--info-50); color: #1e3a8a; border-color: #cddcfb; }
.flash-warning { background: var(--warn-50); color: #78350f; border-color: #f3dcae; }
.flash-danger { background: var(--bad-50); color: #7f1d1d; border-color: #f5c6c0; }
.note { background: var(--bg-soft); border-left: 4px solid var(--brand); padding: 12px 16px; border-radius: 8px; font-size: .93rem; color: var(--ink-2); }
.note-warn { border-left-color: var(--accent); background: var(--accent-50); }
