/* 딸깍 솔루션 5-Step 마법사 스타일 */

* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  margin: 0; background: #f6f7f9; color: #1c1c1e; line-height: 1.6;
}
header { text-align: center; padding: 28px 16px 8px; }
header h1 { margin: 0; font-size: 26px; }
header .sub { margin: 6px 0 0; color: #6b7280; font-size: 14px; }

.steps { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 12px; }
.chip {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: #e5e7eb; color: #6b7280;
}
.chip.active { background: #2563eb; color: #fff; font-weight: 600; }

main { max-width: 720px; margin: 0 auto; padding: 8px 16px 60px; }
.step { display: none; background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.step.active { display: block; }
.step h2 { margin-top: 0; font-size: 19px; }

label { display: block; margin: 14px 0; font-weight: 600; font-size: 14px; }
input, textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d1d5db;
  border-radius: 9px; font-size: 14px; font-family: inherit;
}
textarea { resize: vertical; }
.post-item textarea { min-height: 120px; }
.post-item { margin-bottom: 12px; }
.post-item .title-input { margin-bottom: 6px; }
.post-item .del { float: right; font-size: 12px; color: #ef4444; background: none; border: none; cursor: pointer; }

.actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
button { cursor: pointer; border-radius: 9px; font-size: 14px; padding: 11px 18px; border: none; font-family: inherit; }
.primary { background: #2563eb; color: #fff; font-weight: 600; margin-left: auto; }
.primary:hover { background: #1d4ed8; }
.back, .ghost { background: #eef0f3; color: #374151; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cards .card { background: #f9fafb; border: 1px solid #eceef1; border-radius: 10px; padding: 12px; }
.cards .card h4 { margin: 0 0 6px; font-size: 13px; color: #2563eb; }
.cards .card p { margin: 0; font-size: 13px; }
.box { background: #f9fafb; border: 1px solid #eceef1; border-radius: 10px; padding: 14px; white-space: pre-wrap; font-size: 14px; }
.hint { color: #6b7280; font-size: 13px; }

.collect-box { background: #eff6ff; border: 1px solid #dbeafe; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.collect-box .row { display: flex; gap: 8px; margin-top: 6px; }
.collect-box .row input { margin-top: 0; }
.collect-box .row button { white-space: nowrap; }

.loading { text-align: center; padding: 24px; color: #2563eb; }
.loading span { display: inline-block; width: 16px; height: 16px; border: 3px solid #c7d2fe; border-top-color: #2563eb; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 14px; margin-top: 16px; }
.hidden { display: none; }

@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* 설정 화면 */
.settings-link { display: inline-block; margin-top: 8px; font-size: 13px; color: #2563eb; text-decoration: none; }
.settings-link:hover { text-decoration: underline; }
.radioline { display: inline-flex; align-items: center; gap: 6px; margin: 6px 16px 6px 0; font-weight: 500; }
.radioline input { width: auto; margin-top: 0; }
.req { color: #ef4444; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.badge.set { background: #dcfce7; color: #166534; }
.badge.unset { background: #fee2e2; color: #b91c1c; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 5px; font-size: 12px; }
select { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 9px; font-size: 14px; font-family: inherit; background: #fff; }

/* 인증 */
.authbar { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.authbar .hi { color: #374151; font-weight: 600; }
.authlink { color: #2563eb; text-decoration: none; }
.authlink:hover { text-decoration: underline; }
.authlink.need-key { color: #b91c1c; font-weight: 700; }
.tabs { display: flex; gap: 6px; }
.tab { flex: 1; background: #eef0f3; color: #374151; }
.tab.active { background: #2563eb; color: #fff; font-weight: 600; }

/* STEP 5 이미지 배치 미리보기 */
.imgprev-box { margin-top: 24px; border-top: 1px dashed #d1d5db; padding-top: 16px; }
.imgprev-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.imgprev-head h3 { margin: 0; font-size: 16px; }
.prev-btns { display: flex; gap: 8px; }
.rec-blue { color: #2563eb; }
.preview { background: #fff; border: 1px solid #eceef1; border-radius: 10px; padding: 18px; margin-top: 10px; }
.preview .prev-text { font-size: 15px; line-height: 1.85; margin: 0 0 4px; white-space: pre-wrap; word-break: break-word; }
.preview h3.prev-text { font-size: 17px; font-weight: 700; margin: 20px 0 8px; color: #111827; }
.img-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.prev-img { position: relative; margin: 0; }
.prev-img img { max-width: 240px; max-height: 190px; border-radius: 8px; display: block; border: 1px solid #e5e7eb; }
.img-del { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1; }
.img-del:hover { background: rgba(0,0,0,.85); }
.img-add { border-radius: 8px; cursor: pointer; white-space: nowrap; }
/* 추천 위치: 크고 파랗게 강조 */
.img-add-rec { background: #eff6ff; color: #2563eb; border: 1px dashed #60a5fa; padding: 9px 14px; font-size: 13px; font-weight: 600; }
.img-add-rec:hover { background: #dbeafe; }
/* 그 외 위치: 작고 은은하게 */
.img-add-min { background: #f3f4f6; color: #9ca3af; border: 1px dashed #e5e7eb; padding: 4px 10px; font-size: 12px; }
.img-add-min:hover { background: #e5e7eb; color: #6b7280; }
