/* mg-refund 입금 반환 신청 — 기준 화면(seedreamgift 접수 사이트, 참고자료 08 6-1 캡처 E04·E05)과 같은 구성·느낌(REQ-107).
   외부 글꼴·라이브러리 없음, 아이콘은 Lucide 인라인 SVG */
:root {
	--bg: #f6f7f9; --surface: #fff; --fg: #1f2937; --muted: #6b7280; --line: #e5e7eb;
	--blue: #2563eb; --blue-dark: #1d4ed8; --blue-soft: #eff6ff; --blue-line: #bfdbfe;
	--red: #dc2626; --red-soft: #fef2f2; --red-line: #fecaca;
	--sun-soft: #fffbeb; --sun-line: #fde68a; --sun-ink: #92400e;
	--green: #16a34a;
	--r: 12px; --r-sm: 8px;
	--font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 var(--font); word-break: keep-all; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
.icon { width: 1em; height: 1em; vertical-align: -.125em; flex-shrink: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* 머리 — 제목 · 지금 시각 · [진행 상태 조회](파랑). 사고 조회는 없앰(사용자 2026-10-20, REQ-110) */
.top { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.top h1 { font-size: 1.35rem; font-weight: 800; margin-right: auto; }
.top h1 a { text-decoration: none; }
.clock { color: var(--muted); font-size: .88rem; font-weight: 600; }
.btn-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: var(--r-sm); color: #fff;
	font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-top.blue { background: var(--blue); }
.btn-top.blue:hover { background: var(--blue-dark); }
.btn-home { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
	color: var(--muted); font-size: .85rem; text-decoration: none; background: var(--surface); }
.btn-home:hover { color: var(--fg); }
.top .btn-home + h1 { margin-right: auto; }

main { padding: 28px 0 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card + .card { margin-top: 24px; }

/* 안내 카드 — 어떤 경우인가요? */
.guide h2 { font-size: 1.1rem; margin-bottom: 8px; }
.guide .lead { font-weight: 700; margin: 0 0 4px; }
.guide p { margin: 0; color: var(--muted); font-size: .9rem; }
.guide p b { color: var(--fg); }
.guide .box { margin: 16px 0; padding: 12px 14px; background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: var(--r-sm); }
.guide .box strong { display: block; color: var(--blue-dark); font-size: .95rem; }
.guide .box p { font-size: .85rem; }
.guide .box small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }
.guide hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.guide h3 { font-size: .95rem; margin-bottom: 4px; }
.guide .em { color: var(--blue-dark); font-weight: 700; }

/* 신청서 탭 제목(기준: 가운데 파란 밑줄) */
.form-tab { margin: 32px 0 24px; border-bottom: 1px solid var(--line); text-align: center; }
.form-tab span { display: inline-block; padding: 0 24px 12px; border-bottom: 2px solid var(--blue); margin-bottom: -1px;
	color: var(--blue); font-weight: 800; }

/* 노란 주의 상자 */
.notice { padding: 14px 16px; background: var(--sun-soft); border: 1px solid var(--sun-line); border-radius: var(--r-sm);
	text-align: center; font-size: .88rem; line-height: 1.7; }
.notice p { margin: 0; }
.notice .head { color: var(--sun-ink); font-weight: 700; }
.notice .warn { color: var(--red); font-weight: 700; }
.notice .warn u { text-underline-offset: 3px; }
.notice .ok { color: var(--muted); font-weight: 600; }

/* 칸 */
.field { display: block; min-width: 0; }
.field > .label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; color: #374151; }
.nowrap { white-space: nowrap; }   /* 동의 끝 낱말과 * 를 함께(REQ-120) */
.req { color: var(--red); font-weight: 600; font-size: .78rem; margin-left: 2px; }
.field input:not([type="checkbox"]):not([type="file"]), .field select, .field textarea {
	width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: .95rem; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue-line); border-color: var(--blue); }
.field input::placeholder, .field textarea::placeholder { color: #9ca3af; }
.help { margin: 6px 0 0; font-size: .78rem; color: var(--blue-dark); }
.field-error { margin: 6px 0 0; font-size: .8rem; font-weight: 700; color: var(--red); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.count { float: right; font-weight: 400; color: var(--muted); font-size: .78rem; }
.form-top { margin-top: 20px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.pair > .wide { grid-column: 1 / -1; }
.sec { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; color: var(--blue-dark); }
.sec::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: currentColor; }
.sec.green { color: var(--green); font-size: .9rem; }
.sec.small { font-size: .9rem; }
.tip { padding: 10px 12px; background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: var(--r-sm); font-size: .8rem; }
.tip p { margin: 0; }
.tip b { font-weight: 700; }

/* 신분증 붉은 상자 */
.alert-red { padding: 12px 14px; background: var(--red-soft); border: 1px solid var(--red-line); border-radius: var(--r-sm); font-size: .8rem; color: #4b5563; }
.alert-red strong { display: block; color: #b91c1c; font-size: .9rem; margin-bottom: 2px; }
.alert-red p { margin: 0; }

/* 끌어다 놓기 칸 — 진짜 file input 이 칸 전체를 덮는다(누르면 파일 고르기, 끌어다 놓기도 그대로) */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 140px; padding: 20px; border: 2px dashed var(--line); border-radius: var(--r-sm); text-align: center; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-soft); }
.drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop .icon { width: 30px; height: 30px; color: #9ca3af; }
.drop strong { color: #374151; font-size: .9rem; }
.drop small { font-size: .75rem; }
.drop:focus-within { outline: 2px solid var(--blue-line); }
.files { list-style: none; margin: 8px 0 0; padding: 0; font-size: .82rem; }
.files li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .size { color: var(--muted); white-space: nowrap; }
/* 첨부 하나씩 빼기(REQ-113) — Lucide x + 글자, 키보드로도 누름 */
.file-del { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px;
	background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 600; cursor: pointer; }
.file-del:hover, .file-del:focus-visible { border-color: var(--red-line); color: var(--red); }
.file-del .icon { width: 14px; height: 14px; }   /* 누르는 크기 40~44px(휴대폰 점검, REQ-120) */
.file-count { margin: 8px 0 0; font-size: .78rem; color: var(--muted); text-align: right; }
.file-note { margin: 6px 0 0; font-size: .8rem; font-weight: 600; color: var(--red); white-space: pre-line; }
.file-left { margin: 6px 0 0; font-size: .78rem; color: var(--muted); text-align: right; }   /* 칸마다 남은 용량(REQ-119) */
.bank-note { margin: 0; padding: 12px 14px; background: var(--red-soft); border: 1px solid var(--red-line); border-radius: var(--r-sm);
	color: #b91c1c; font-size: 1rem; font-weight: 800; line-height: 1.5; word-break: keep-all; }   /* 출금 계좌 강조 — 신분증 안내 상자(.alert-red)와 같은 상자, 글자만 크고 굵게(사용자 2026-10-20) */
.req-note { margin: 12px 0 0; font-size: .8rem; color: var(--muted); text-align: right; }   /* * 표시 안내(REQ-116) */
.col-right .field.grow { flex: 1; display: flex; flex-direction: column; }
.col-right .field.grow textarea { flex: 1; }

/* 접수 후 안내 */
.after { margin-top: 28px; padding: 14px 16px; background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: var(--r-sm); font-size: .82rem; }
.after strong { display: block; color: var(--blue-dark); margin-bottom: 4px; }
.after ul { margin: 0; padding-left: 18px; color: #4b5563; }
.after b { color: var(--fg); }

/* 동의 — 글자를 누르면 체크, [보기]로 본문 펼침 */
.agree { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.agree-item { border: 1px solid var(--line); border-radius: var(--r-sm); background: #fafafa; }
.agree-item > .field-error { margin: 0; padding: 0 14px 10px; }
.agree-row { display: flex; align-items: center; gap: 10px; padding: 4px 14px; }
.agree-row label { display: flex; align-items: center; gap: 10px; flex: 1; min-height: 44px; padding: 6px 0; cursor: pointer; font-size: .88rem; }   /* 글자 줄 전체가 체크 칸 */
.agree-row input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.agree .must { color: var(--red); font-weight: 700; }
.agree .view { flex-shrink: 0; min-width: 52px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; font-size: .8rem; font-weight: 700; cursor: pointer; }
.agree .view[aria-expanded="true"] { background: #6b7280; }
.agree .terms { padding: 0 14px 14px; font-size: .8rem; color: #4b5563; }
.agree .terms p { margin: 8px 0 0; }
.agree .terms table { width: 100%; border-collapse: collapse; }
.agree .terms th, .agree .terms td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.agree .terms th { background: #f3f4f6; width: 30%; font-weight: 600; }

.btn-submit { display: block; width: 100%; margin-top: 20px; padding: 15px; border: 0; border-radius: var(--r-sm);
	background: var(--blue); color: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.btn-submit:hover { background: var(--blue-dark); }
.btn-submit:disabled { background: #9ca3af; cursor: not-allowed; }
.form-notice { margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--red-soft); color: var(--red); font-weight: 700; font-size: .88rem; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }   /* 미끼 칸 — 사람에게는 안 보임 */

/* 조회 화면(E05) — 좁은 카드 하나 */
.narrow { max-width: 880px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
	color: #4b5563; font-size: .88rem; font-weight: 600; text-decoration: none; }
.back:hover { color: var(--fg); background: #f9fafb; }
.lookup h2 { margin-top: 28px; font-size: 1.4rem; font-weight: 800; }
.lookup .sub { margin: 4px 0 20px; color: #9ca3af; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 1rem; }
.search input:focus { outline: 2px solid var(--blue-line); border-color: var(--blue); }
.search button { padding: 0 24px; border: 0; border-radius: var(--r-sm); background: #1f2937; color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }
.search button:hover { background: #111827; }
.search button:disabled { background: #9ca3af; cursor: not-allowed; }
.result { margin: 24px 0 0; border-top: 1px solid var(--line); }
.result > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.result dt { color: var(--muted); font-size: .88rem; }
.result dd { margin: 0; font-weight: 600; min-width: 0; }
.result .proc-message { white-space: pre-line; overflow-wrap: anywhere; }   /* mg-admin 처리 메시지의 줄바꿈 그대로, 긴 낱말도 폭 안에서(Q-8) */
.state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--blue-soft); color: var(--blue-dark); }
.state.done { background: #dcfce7; color: #166534; }
.state.rejected { background: var(--red-soft); color: #b91c1c; }
.state.processing { background: #fef3c7; color: #92400e; }   /* 처리중(REQ-160) — 매뉴얼 15장 주황(D97706) 계열, 글자는 읽기 쉽게 진한 쪽 */

/* 접수 완료 — 식별코드 크게 + [복사] */
.done { text-align: center; }
.done .mark { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.done .mark .icon { width: 28px; height: 28px; }
.done h2 { font-size: 1.4rem; font-weight: 800; }
.done > p { margin: 6px 0 0; color: var(--muted); }
.code-box { margin: 24px auto 0; max-width: 520px; padding: 18px; border: 2px solid var(--blue); border-radius: var(--r); background: var(--blue-soft); }
.code-box .label { display: block; color: var(--blue-dark); font-size: .85rem; font-weight: 700; }
.code-box .row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.code-box strong { font-size: clamp(1.15rem, 5vw, 1.7rem); letter-spacing: .04em; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.btn-copy { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--blue); border-radius: var(--r-sm);
	background: var(--surface); color: var(--blue); font-size: .85rem; font-weight: 700; cursor: pointer; }
.code-box small { display: block; margin-top: 10px; color: var(--muted); font-size: .8rem; }
.done .after { text-align: left; max-width: 640px; margin: 20px auto 0; }   /* PC에서 안내 첫 줄(반환 시간)이 한 줄로(REQ-159, 글자 약 500px), 휴대폰은 줄바꿈 */

@media (max-width: 760px) {
	.cols { grid-template-columns: 1fr; gap: 24px; }
	.col-right .field.grow textarea { min-height: 140px; }
}
@media (max-width: 520px) {
	body { font-size: 14px; }
	.top .wrap { gap: 8px; min-height: 56px; }
	.top h1 { font-size: 1.15rem; flex-basis: 100%; }
	.top .btn-home + h1 { flex-basis: auto; }
	.clock { margin-right: auto; font-size: .8rem; }
	.top .btn-top { padding: 10px 14px; font-size: .85rem; }
	.top .btn-home + h1 + .clock { flex-basis: auto; margin-left: auto; }
	main { padding: 16px 0 40px; }
	.card { padding: 18px 16px; }
	.pair { grid-template-columns: 1fr; }
	.notice { text-align: left; }
	.search { flex-direction: column; }
	.search button { padding: 12px; }
	.result > div { grid-template-columns: 96px 1fr; }
}
