/* 오버레이 사이트 공통 (밝은 톤) */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e3e6ea;
  --text: #16191f;
  --sub: #4c5563;
  --faint: #6a7280;
  --accent: #2459d6;
  --accent-tint: #e8eefb;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }

header { background: var(--panel); border-bottom: 1px solid var(--line); }
.bar { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bar a { text-decoration: none; font-size: 17px; font-weight: 600; color: var(--text); }
.bar span { font-size: 13px; color: var(--faint); }



.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.field + .field { margin-top: 18px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin-bottom: 8px; }
input[type='text'], select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d5d9df; border-radius: 8px; background: #fff;
}
input[type='text']:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* 드롭다운: 기본 화살표 대신 얇은 꺾쇠 */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 36px; font-weight: 500;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234C5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  transition: border-color 0.15s, background-color 0.15s;
}
select:hover { border-color: #b9bfc8; background-color: #fafbfc; }
select option { font-weight: 500; }

/* 직접 만든 드롭다운 (스크립트가 select를 숨기고 이걸로 바꾼다) */
.dd { position: relative; }
.dd select { display: none; }
.dd-btn {
  width: 100%; height: 42px; padding: 0 36px 0 12px; text-align: left; cursor: pointer;
  border: 1px solid #d5d9df; border-radius: 8px; font-weight: 500;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234C5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  transition: border-color 0.15s, background-color 0.15s;
}
.dd-btn:hover { border-color: #b9bfc8; background-color: #fafbfc; }
.dd-btn:focus-visible, .dd.open .dd-btn { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.dd.open .dd-btn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 6.5l5-5 5 5' fill='none' stroke='%232459D6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dd-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(22, 25, 31, 0.12);
  opacity: 0; transform: translateY(-4px); pointer-events: none; visibility: hidden;
  transition: opacity 0.12s, transform 0.12s, visibility 0s linear 0.12s;
}
.dd-list:focus { outline: none; }
.dd.open .dd-list { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.12s, transform 0.12s; }
.dd-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px; border-radius: 6px; cursor: pointer; font-weight: 500; font-variant-numeric: tabular-nums;
}
.dd-list li.active { background: #f1f3f6; }
.dd-list li[aria-selected='true'] { color: var(--accent); font-weight: 600; }
.dd-list li[aria-selected='true']::after {
  content: ''; width: 12px; height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.6l3.2 3.1L11 1.3' fill='none' stroke='%232459D6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

/* 체크박스 */
input[type='checkbox'] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  width: 18px; height: 18px; border: 1.5px solid #b9bfc8; border-radius: 5px; background: #fff;
  display: grid; place-items: center;
  transition: background-color 0.15s, border-color 0.15s;
}
input[type='checkbox']::after {
  content: ''; width: 10px; height: 8px; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2l2.6 2.5L9 1.3' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
input[type='checkbox']:hover { border-color: var(--accent); }
input[type='checkbox']:checked { background: var(--accent); border-color: var(--accent); }
input[type='checkbox']:checked::after { opacity: 1; transform: none; }
input[type='checkbox']:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.layouts { display: flex; flex-direction: column; gap: 6px; }
.layouts label {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.layouts label:hover { border-color: #c4cad3; }
.layouts label:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.layouts input { accent-color: var(--accent); margin: 0; }
.layouts .name { font-weight: 600; flex: 1; }
.layouts .size { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.preview {
  border-radius: 10px; border: 1px solid var(--line); padding: 20px; min-height: 360px; overflow: auto;
  background: #3b3f47;
}
.preview.light { background: #e9ebef; }
.preview iframe { display: block; border: 0; background: transparent; transform-origin: 0 0; }
.fit { overflow: hidden; }
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.preview-head h2, .out h2 { font-size: 15px; font-weight: 600; margin: 0; }
.toggle { font-size: 13px; font-weight: 500; color: var(--sub); display: flex; gap: 8px; align-items: center; cursor: pointer; user-select: none; padding: 4px 0; }
.toggle:hover { color: var(--text); }

.out h2 { margin-bottom: 10px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; font-size: 13px; color: var(--sub); background: #f8f9fb; }
.btn {
  height: 42px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn.ghost { background: #fff; color: var(--text); border: 1px solid #d5d9df; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.danger { background: #fff; color: #d1330e; border: 1px solid #f0c4b8; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }

/* 사이트 아래 줄: 비공식 안내 + 약관·개인정보 링크 */
.site-foot { max-width: 1180px; margin: 0 auto; padding: 0 24px 32px; font-size: 12px; color: var(--faint); display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: baseline; }
.site-foot nav { display: flex; gap: 14px; margin-left: auto; }
.site-foot a { color: var(--sub); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.site-foot a.strong { font-weight: 700; }

/* 약관·개인정보 처리방침 같은 긴 글 */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 24px 48px; }
.doc h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
.doc .meta { color: var(--faint); font-size: 13px; margin: 0 0 24px; }
.doc .summary { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 28px; }
.doc .summary ul { margin: 6px 0 0; padding-left: 18px; }
.doc h2 { font-size: 17px; font-weight: 700; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--sub); }
.doc ul, .doc ol { padding-left: 20px; }
.doc li + li { margin-top: 4px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; background: var(--panel); }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: #f8f9fb; font-weight: 600; color: var(--text); white-space: nowrap; }
.doc td { color: var(--sub); }
.doc .table-wrap { overflow-x: auto; }
.doc a { color: var(--accent); }
.doc .contact { font-weight: 600; color: var(--text); }
