:root {
  --bg: #fafafa;
  --fg: #1f2937;
  --muted: #4b5563;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --btn: #475569;
  --btn-hover: #334155;
  --danger: #dc2626;
  --ok: #16a34a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}
main { padding: 32px 16px; }
.wrap { max-width: 768px; margin: 0 auto; }
.wrap.wide { max-width: 960px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
h1 { font-size: 24px; text-align: center; margin: 0 0 28px; }
h2 { font-size: 18px; margin: 0 0 16px; }
h3 { font-size: 16px; margin: 0 0 10px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  main { padding: 16px 12px; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 16px; }
  .box { padding: 14px; }
  .clauses { padding: 14px; }
}
.label { font-size: 14px; color: var(--muted); }
.value { margin: 0; }
label.field { display: block; font-size: 14px; color: #374151; margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=password], input[type=date] {
  width: 100%; padding: 9px 12px; font: inherit; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: var(--fg);
}
input:focus { outline: 2px solid #14b8a6; outline-offset: 0; border-color: transparent; }
.clauses { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.clauses section + section { margin-top: 22px; }
.clauses p { font-size: 14px; color: #374151; margin: 0 0 10px; }
.clauses p:last-child { margin-bottom: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: 14px; color: #374151; }
.consent input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--fg); }
.date { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }
.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; border: 0; border-radius: 6px; padding: 12px 28px; font: inherit; font-weight: 500;
  background: var(--btn); color: #fff; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--btn-hover); }
.btn:disabled { background: #d1d5db; cursor: not-allowed; }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.btn.gray { background: #e5e7eb; color: var(--fg); }
.btn.gray:hover { background: #d1d5db; }
.btn.red { background: var(--danger); }
.btn.green { background: var(--ok); }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 20px; text-align: center; }
.error { color: var(--danger); font-size: 14px; text-align: center; margin: 0 0 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.row .who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row .meta { font-size: 12px; color: var(--muted); }
.row .tools { display: flex; gap: 6px; }
.row form { margin: 0; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.badge.sent { background: #fef9c3; color: #854d0e; }
.badge.signed { background: #dcfce7; color: #166534; }
.top { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.top form { margin: 0; }
.link { color: var(--muted); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: 8px; padding: 24px; max-width: 440px; width: 100%; }
.modal .url { display: flex; gap: 8px; margin: 8px 0 16px; }
.modal .url input { font-size: 14px; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); }
