/* 디자인 체계: 레퍼런스(news.mmmk.kr)의 간격·모서리·타이포 스케일을 따르되 주 색상은 중개사 브랜드색(--brand). */
:root {
  --brand: #03a64a;              /* 템플릿에서 중개사 색으로 덮어씀 */
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --brand-marker: color-mix(in srgb, var(--brand) 22%, #fff);
  --ink: #111a14; --ink-2: #3b4540; --reed: #6b7570; --fog: #c3ccc7;
  --rule: #e4e9e6; --paper: #f5f7f6; --card: #fff; --danger: #e0352b;
  --r: 12px; --lift: 0 8px 28px #111a1414;
  --h-btn: 56px; --h-ctl: 48px; --h-pill: 32px;
  --sans: "Pretendard Variable", "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.55;
       -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: inherit; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 20px; }

/* 머리글 */
.top { position: sticky; top: 0; z-index: 10; background: #fffffff0; backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.logo .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; font-weight: 800; }
.logo b { display: block; font-size: 15px; line-height: 1.2; }
.logo small { display: block; font-size: 12px; color: var(--reed); }
.btn-share { height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font: 600 14px var(--sans); cursor: pointer; }

/* 공통 */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; height: var(--h-btn); border-radius: var(--r);
       border: 0; background: var(--brand); color: #fff; font: 700 17px var(--sans); text-decoration: none; cursor: pointer; }
.btn:disabled { background: var(--rule); color: var(--fog); cursor: default; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--rule); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: var(--h-pill); padding: 0 14px; border-radius: 999px;
        background: var(--brand-soft); font-size: 14px; font-weight: 600; }
.pill em { font-style: normal; color: var(--brand); }
em.hl { font-style: normal; color: var(--brand); }
section { padding: 48px 0; }
.sec-title { font-size: 26px; font-weight: 800; line-height: 1.35; text-align: center; margin: 0 0 24px; letter-spacing: -0.02em; }
.muted { color: var(--reed); font-size: 14px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--lift); }

/* 히어로 */
.hero { text-align: center; padding: 40px 0 44px; background: linear-gradient(180deg, var(--brand-soft), var(--paper)); }
.hero svg { display: block; width: 150px; height: 120px; margin: 0 auto 12px; }
.hero h1 { font-size: 30px; line-height: 1.35; margin: 0 0 12px; letter-spacing: -0.03em; }
.hero p { color: var(--ink-2); margin: 0 0 20px; }
.hero .pill { margin-bottom: 16px; }

/* 보내는 사람(중개사) */
.sender { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.sender img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.sender b { font-size: 16px; }
.sender p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }

/* 장점 3 */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.points li { background: var(--card); border-radius: var(--r); padding: 18px 18px 18px 20px; border-left: 3px solid var(--brand); }
.points b { display: block; font-size: 17px; margin-bottom: 4px; }
.points p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* 레터(맛보기·본문 공용) */
.letter { overflow: hidden; }
.letter-head { padding: 18px 20px; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.letter-head b { font-size: 15px; width: 100%; }
.letter-head span { font-size: 13px; color: var(--reed); }
.letter-head .tag { color: var(--brand); font-weight: 700; }
.letter-body { padding: 20px; }
.letter-body > p:first-child { margin-top: 0; }
.block { margin: 22px 0 0; }
.block h3 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.block h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); }
.trades { width: 100%; border-collapse: collapse; font-size: 14px; }
.trades td { padding: 10px 2px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.trades td small { display: block; color: var(--reed); font-size: 12px; }
.trades .num { text-align: right; white-space: nowrap; font-weight: 700; }
.news { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.news li { padding: 12px 0; border-bottom: 1px solid var(--rule); counter-increment: n; display: grid; grid-template-columns: 26px 1fr; }
.news li::before { content: counter(n); font-weight: 800; color: var(--brand); grid-row: span 3; }
.news a { grid-column: 2; text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.45; }
.news small { grid-column: 2; color: var(--reed); font-size: 12px; margin-top: 4px; }
.locked { position: relative; margin-top: 18px; }
.locked .fake { filter: blur(5px); user-select: none; pointer-events: none; }
.locked .fake i { display: block; height: 12px; border-radius: 6px; background: var(--rule); margin: 12px 0; }
.locked .veil { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 14px; }
.letter-cta { padding: 18px 20px 20px; background: var(--brand-soft); text-align: center; }
.letter-cta p { margin: 0 0 12px; font-weight: 600; }

/* 관심 아파트 vs 희망가 */
.compare { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: var(--r); }
.compare > div { padding: 14px; }
.compare > div + div { border-left: 1px solid var(--rule); }
.compare small { display: block; color: var(--reed); font-size: 12px; }
.compare strong { display: block; font-size: 19px; margin: 2px 0; }
.compare .mine strong { color: var(--brand); }

/* 신청 폼 */
.form { padding: 24px 20px; }
.field { margin-bottom: 26px; }
.field > label, .field > .label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.field mark { display: block; background: none; color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
select, input[type=tel], input[type=number], input[type=text], input[type=password], input[type=url] { width: 100%; height: var(--h-ctl); padding: 0 12px; font: 16px var(--sans);
  border: 1px solid var(--rule); border-radius: var(--r); background: #fff; color: var(--ink); }
select { margin-bottom: 8px; }
select:focus, input:focus { outline: 2px solid var(--brand-marker); border-color: var(--brand); }
select:disabled { background: var(--paper); color: var(--fog); }
.row-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.row-add select { margin-bottom: 0; }
.btn-add { height: var(--h-ctl); padding: 0 16px; border-radius: var(--r); border: 1px solid var(--brand); background: #fff;
           color: var(--brand); font: 700 15px var(--sans); cursor: pointer; }
.btn-add:disabled { border-color: var(--rule); color: var(--fog); cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: var(--h-pill); padding: 0 6px 0 12px; border-radius: 999px;
        background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
.chip button { border: 0; background: none; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--rule);
             background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.pick input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.pick input:focus-visible + span { outline: 2px solid var(--brand); }
.topic { grid-column: 2; justify-self: start; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft);
         padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }
.note { white-space: pre-line; margin: 0 0 8px; padding: 14px; background: var(--brand-soft); border-radius: var(--r); font-size: 15px; }
.note.notice { background: #fff8e6; }
.recent { margin-top: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); }
.recent b { font-size: 14px; }
.hint { font-size: 13px; color: var(--reed); margin: 6px 0 0; min-height: 1em; }
.consent { border-top: 1px solid var(--rule); padding: 14px 0; }
.consent label { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 15px; cursor: pointer; }
.consent input { width: 20px; height: 20px; accent-color: var(--brand); }
.consent .req { color: var(--brand); }
.consent details { margin: 6px 0 0 30px; font-size: 13px; color: var(--reed); }
.consent summary { cursor: pointer; text-decoration: underline; }
.err { color: var(--danger); }

/* 하단 고정 신청 버튼 (모바일) */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
              background: linear-gradient(180deg, transparent, var(--paper) 30%); transition: transform .2s; z-index: 9; }
.sticky-cta .btn { max-width: 520px; margin: 0 auto; box-shadow: var(--lift); }
.sticky-cta.hide { transform: translateY(120%); }

/* 바닥글 */
.foot { padding: 32px 0 110px; font-size: 13px; color: var(--reed); border-top: 1px solid var(--rule); background: var(--card); }
.foot h3 { font-size: 14px; color: var(--ink); margin: 0 0 8px; }
.foot p { margin: 0 0 12px; }

/* 관리 화면 */
.admin-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-nav form { margin: 0; }
.admin-h { font-size: 17px; margin: 28px 0 10px; }
.admin-h .muted { font-weight: 400; }
.admin-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; margin-bottom: 10px; text-decoration: none; }
.admin-row small, .cust-top small { display: block; color: var(--reed); font-size: 13px; margin-top: 2px; }
.badge { font-size: 13px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.warn { color: #b45309; background: #fff4e0; }
.warn-box { background: #fff8e6; }
.copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.copy-row code { background: var(--paper); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.admin-cust { padding: 14px 16px; margin-bottom: 10px; }
.cust-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.note-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0 6px; }
.admin-cust > a { font-size: 13px; }
textarea { width: 100%; padding: 10px 12px; font: 15px var(--sans); border: 1px solid var(--rule); border-radius: var(--r); resize: vertical; }
.news-edit { display: grid; grid-template-columns: 22px 56px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.news-edit input[type=checkbox] { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--brand); }
.news-edit input[type=number] { height: 36px; padding: 0 6px; }
.news-edit a { text-decoration: none; font-weight: 600; font-size: 14px; }
.news-edit small { display: block; color: var(--reed); font-size: 12px; }
.news-edit + .btn { margin-top: 14px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; }
input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.my-links { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 18px; font-size: 14px; }
.my-links form { margin: 0; }
.my-links button { border: 0; background: none; color: var(--reed); font: 14px var(--sans); text-decoration: underline; cursor: pointer; padding: 0; }
.btn-ghost.err { color: var(--danger); }
.mine { padding: 16px 18px; border-left: 4px solid var(--brand); }
.mine-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.mine-row a { color: var(--brand); font-weight: 700; }
.cust-sub { padding: 10px 0 6px; border-top: 1px solid var(--rule); margin-top: 10px; }
.cust-sub > a { font-size: 13px; }
