:root {
  --bg: #f5f6f4;
  --card: #ffffff;
  --ink: #1d2320;
  --muted: #66706a;
  --line: #dfe3df;
  --brand: #1f5f4a;
  --brand-ink: #ffffff;
  --brand-soft: #e5f0eb;
  --accent: #e3762c;
  --ok: #1f7a4d;
  --ok-soft: #e3f4ea;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --bad: #b3261e;
  --bad-soft: #fbe7e5;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--brand); }
img, video { max-width: 100%; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1180px; }

/* 상단 */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 19px; color: var(--brand); text-decoration: none; letter-spacing: -0.02em; }
.logo small { color: var(--muted); font-weight: 600; font-size: 12px; margin-left: 6px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .nav button.link { padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.nav a:hover, .nav button.link:hover { background: var(--bg); }
.nav form { margin: 0; }
button.link { background: none; border: 0; cursor: pointer; font: inherit; }

main { padding: 20px 0 48px; }
h1 { font-size: 24px; line-height: 1.3; margin: 8px 0 16px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }

/* 히어로 */
.hero { background: var(--brand); color: var(--brand-ink); border-radius: 16px; padding: 28px 22px; margin-bottom: 16px; }
.hero h1 { color: inherit; font-size: 26px; margin-top: 0; }
.hero p { opacity: .92; }
.hero .btn { background: #fff; color: var(--brand); }

/* 요금 */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.price.main { border: 2px solid var(--brand); }
.price .name { font-weight: 700; margin-bottom: 4px; }
.price .amount { font-size: 24px; font-weight: 800; color: var(--brand); }
.price .list { text-decoration: line-through; color: var(--muted); font-size: 14px; margin-right: 6px; }
.price ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.notice { background: var(--warn-soft); color: #5c3b00; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.notice.info { background: var(--brand-soft); color: #173f31; }

/* 버튼·폼 */
.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; background: var(--brand); color: var(--brand-ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--card); color: var(--bad); border-color: #efc2be; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=url], input[type=date], input[type=month], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.alert.ok { background: var(--ok-soft); color: #13462c; }
.alert.error { background: var(--bad-soft); color: #7c1913; }

/* 날짜 선택(가능/마감만 표시) */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 8px; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; inset: 0; }
.day span { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.day span b { display: block; font-size: 15px; }
.day span i { font-style: normal; font-size: 12px; color: var(--ok); }
.day input:checked + span { border: 2px solid var(--brand); background: var(--brand-soft); }
.day input:focus-visible + span { outline: 2px solid var(--brand); }
.day.full span { background: #f0f1ef; color: #9aa29d; cursor: not-allowed; }
.day.full span i { color: #9aa29d; }

/* 상태 배지·진행 단계 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge.CANCELED { background: #eceeec; color: var(--muted); }
.badge.COMPLETED { background: var(--ok-soft); color: var(--ok); }
.badge.AWAITING_PAYMENT { background: var(--warn-soft); color: var(--warn); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.steps li { text-align: center; font-size: 11px; color: var(--muted); }
.steps li::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.steps li.done::before { background: var(--brand); }
.steps li.now { color: var(--brand); font-weight: 700; }
.steps li.now::before { background: var(--accent); }
@media (max-width: 560px) { .steps li span { display: none; } .steps li.now span { display: inline; } }

/* 목록·표 */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); padding: 12px 0; }
.list li:first-child { border-top: 0; padding-top: 0; }
.case-link { display: block; text-decoration: none; color: inherit; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 800; border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 0 0 10px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline time { display: block; font-size: 12px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery figure { margin: 0; }
.gallery img, .gallery video { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: #000; }
.gallery figcaption { font-size: 12px; color: var(--muted); }
.r-NORMAL { color: var(--ok); font-weight: 700; }
.r-ADJUSTED { color: var(--brand); font-weight: 700; }
.r-REPLACE { color: var(--bad); font-weight: 700; }
.r-RECOMMENDED { color: var(--warn); font-weight: 700; }
.r-NOT_APPLICABLE, .r-PENDING { color: var(--muted); }

/* 직원 화면 */
.staff body, body.staff { background: #eef0ee; }
.capbar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
@media (max-width: 760px) { .capbar { grid-template-columns: repeat(4, 1fr); } }
.cap { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 13px; }
.cap b { display: block; font-size: 14px; }
.cap.full { background: var(--bad-soft); border-color: #efc2be; }
.cap.closed { background: #eceeec; color: var(--muted); }
.cap.sel { outline: 2px solid var(--brand); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.inline { display: inline; margin: 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > * { flex: 1 1 140px; }
.inline-form .btn { flex: 0 0 auto; }
.pre { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 10px; font-size: 14px; }
.choice { display: grid; gap: 8px; margin-bottom: 12px; }
.choice label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
.choice label.disabled { opacity: .5; }
.choice .amt { margin-left: auto; font-weight: 800; }
footer.foot { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: 13px; }
footer.foot a { color: var(--muted); margin-right: 12px; }
