/* gosumatch 공통 스타일. 값의 근거는 docs\design.md (참고: yjtv.kr 실측).
   색·글자·여백은 아래 변수만 바꾼다. 화면 파일에 색 값을 직접 쓰지 않는다. */

/* Paperlogy (SIL OFL 1.1, assets\fonts\OFL.txt). 사이트가 쓰는 굵기 500·700만 둔다. */
@font-face {
  font-family: "Paperlogy";
  src: url("/assets/fonts/Paperlogy-5Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Paperlogy";
  src: url("/assets/fonts/Paperlogy-7Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --bg-tint: #FBFCFC;
  --ink: #17283B;
  --ink-sub: #526271;
  --accent: #9C6210;
  --accent-bg: #FFF8EC;
  --line: #E2E7EB;
  --danger: #B93D26;
  --danger-bg: #FDF1EE;

  --font: "Paperlogy", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --radius-btn: 14px;
  --radius-card: 24px;
  --wrap: 1200px;
  --gap-section: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
  word-break: keep-all;
}

h1, h2, h3, p, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 480px; }

/* 머리·바닥 */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.head-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.logo { font-size: 22px; font-weight: 700; text-decoration: none; }
.head-nav { display: flex; align-items: center; gap: 14px; font-size: 16px; }
.head-nav a { text-decoration: none; white-space: nowrap; }
/* 휴대폰에서는 이름을 숨긴다. 이름까지 넣으면 머리글이 화면 폭을 넘는다. PC 에서만 보인다(맨 아래). */
.head-name { display: none; color: var(--ink-sub); }
.inline-form { margin: 0; }

.site-foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--ink-sub); font-size: 14px; line-height: 1.7; }
.site-foot p + p { margin-top: 8px; }

/* 구역 */
.section { padding: var(--gap-section) 0; }
.section-tint { background: var(--bg-tint); }
.section h2 { font-size: 28px; margin-bottom: 24px; }
.page-title { font-size: 28px; margin-bottom: 24px; }

.hero { padding: 56px 0 64px; }
.hero h1 { font-size: 36px; margin: 8px 0 16px; }
.lead { color: var(--ink-sub); max-width: 560px; }
.eyebrow { color: var(--accent); font-size: 16px; font-weight: 700; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px;
  border: 1px solid var(--ink); border-radius: var(--radius-btn);
  font: inherit; font-weight: 700; line-height: 1.3; text-decoration: none; cursor: pointer;
}
.btn-main { background: var(--ink); color: #FFFFFF; }
.btn-line { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:focus-visible, .chip input:focus-visible + span, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* 카드 */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.card h3 { font-size: 21px; margin: 4px 0 10px; }
.card p:last-child { color: var(--ink-sub); }
.steps { display: grid; gap: 16px; }

/* 폼 */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .field > legend { font-size: 15px; font-weight: 700; }
.field > legend { margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-btn);
  background: var(--bg); color: var(--ink); font: inherit;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--bg);
}
.chip input:checked + span { border-color: var(--ink); background: var(--accent-bg); font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.form-foot { margin-top: 20px; color: var(--ink-sub); font-size: 15px; }

/* 안내·오류 */
.notice { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--accent-bg); }
.notice + p { margin-top: 16px; }
.errors { margin-bottom: 18px; padding: 14px 18px; border-radius: var(--radius-btn); background: var(--danger-bg); color: var(--danger); font-size: 15px; }

/* 관리자·목록 화면 */
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 6px 16px; border-radius: var(--radius-btn); text-decoration: none; font-weight: 700; }
.admin-nav a.on { background: var(--accent-bg); color: var(--accent); }
/* .section h2(구역 제목)보다 우선해야 한다. 화면 안의 작은 제목은 화면 제목(.page-title)보다 작다. */
.section .sub-title { font-size: 22px; margin: 40px 0 16px; }
.form-narrow { max-width: 480px; }
.field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-btn);
  background: var(--bg); color: var(--ink); font: inherit;
}
.field textarea { line-height: 1.6; resize: vertical; }
.tab-chips { margin-bottom: 20px; }
.chip-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-btn); text-decoration: none; font-size: 15px;
}
.chip-link.on { border-color: var(--ink); background: var(--accent-bg); font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-btn); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.table td:nth-child(2) { white-space: normal; min-width: 160px; }
.table th { background: var(--bg-tint); color: var(--ink-sub); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table small { color: var(--ink-sub); }
.row-actions { display: flex; gap: 6px; }
.badge { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-tint); font-size: 13px; font-weight: 700; }
.badge-approved { border-color: var(--ink); }
.badge-pending { background: var(--accent-bg); color: var(--accent); }
.badge-suspended, .badge-off, .badge-blocked { background: var(--danger-bg); color: var(--danger); }
.todo-list { display: grid; gap: 16px; }
.section .notice { margin-bottom: 18px; }

/* 요청 상세의 항목 목록, 선 구분 목록(내 요청·받은 견적) */
.badge-open { background: var(--accent-bg); color: var(--accent); }
.page-title .badge { vertical-align: middle; margin-left: 6px; }
.detail { margin: 0; border-top: 1px solid var(--line); }
.detail dt { padding-top: 14px; color: var(--ink-sub); font-size: 14px; font-weight: 700; }
.detail dd { margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.detail small { color: var(--ink-sub); margin-left: 6px; }
.line-list { border-top: 1px solid var(--line); }
.line-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 240px; text-decoration: none; overflow-wrap: anywhere; }
.line-main span { color: var(--ink-sub); font-size: 15px; line-height: 1.6; }
.line-side { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.line-side small { color: var(--ink-sub); font-weight: 500; }

/* PC */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  .head-name { display: inline; }
  .hero { padding: 88px 0 96px; }
  .hero h1 { font-size: 66px; }
  .section h2 { font-size: 44px; margin-bottom: 32px; }
  .page-title { font-size: 36px; }
  .card h3 { font-size: 23px; }
  .steps, .todo-list { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
