/* SEO·OG 검사 도구 — 화이트 톤. 사이트 공통 레이아웃 안에서 동작하도록 .seo-tool 아래로만 적용 */
.seo-tool {
  --ink: #111827;
  --sub: #4b5563;
  --mute: #8a93a3;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --blue: #2563eb;
  --blue-soft: #eef3ff;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  color: var(--ink);
  background: #fff;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
.seo-tool *,
.seo-tool *::before,
.seo-tool *::after { box-sizing: border-box; }
.seo-tool .wrap { width: min(1040px, calc(100% - 40px)); margin: 0 auto; }
.seo-tool h1, .seo-tool h2, .seo-tool h3, .seo-tool p { margin: 0; }
.seo-tool section { padding: 56px 0; }
.seo-tool section + section { border-top: 1px solid var(--line); }
.seo-tool h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.35; }
.seo-tool .lead { margin-top: 8px; color: var(--sub); font-size: 15px; }

/* ── 상단 입력 ── */
.seo-tool .hero { padding: 80px 0 56px; text-align: center; }
.seo-tool .hero h1 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -0.03em; line-height: 1.3; }
.seo-tool .hero .lead { max-width: 560px; margin: 14px auto 0; font-size: 16px; }
.seo-tool .check-form { display: flex; gap: 8px; max-width: 640px; margin: 32px auto 0; }
.seo-tool .check-form input {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px;
  border: 1px solid #d5d9e0; border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.seo-tool .check-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.seo-tool .check-form button {
  height: 54px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--ink); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.seo-tool .check-form button:hover { background: #000; }
.seo-tool .check-form button:disabled { background: #9aa3b2; cursor: default; }
.seo-tool .form-note { margin-top: 12px; color: var(--mute); font-size: 13px; }
.seo-tool .status { min-height: 24px; margin-top: 14px; font-size: 14px; color: var(--sub); }
.seo-tool .status.is-error { color: var(--bad); }
.seo-tool .spinner { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid #cfd5df; border-top-color: var(--blue); border-radius: 50%; animation: seoSpin .8s linear infinite; }
@keyframes seoSpin { to { transform: rotate(360deg); } }

/* ── 결과 ── */
.seo-tool .result[hidden] { display: none; }
.seo-tool .result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seo-tool .result-url { margin-top: 6px; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.seo-tool .tally { display: flex; gap: 8px; flex-wrap: wrap; }
.seo-tool .tally span { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.seo-tool .tally .t-ok { background: var(--ok-soft); color: var(--ok); }
.seo-tool .tally .t-warn { background: var(--warn-soft); color: var(--warn); }
.seo-tool .tally .t-bad { background: var(--bad-soft); color: var(--bad); }

.seo-tool .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.seo-tool .card-box h3 { font-size: 14px; color: var(--sub); font-weight: 600; margin-bottom: 10px; }
.seo-tool .thumb { position: relative; background: var(--soft); overflow: hidden; }
.seo-tool .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.seo-tool .thumb.is-empty::after { content: attr(data-empty); position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); font-size: 12px; }
.seo-tool .clamp1, .seo-tool .clamp2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.seo-tool .clamp1 { -webkit-line-clamp: 1; }
.seo-tool .clamp2 { -webkit-line-clamp: 2; }

/* 카카오톡 */
.seo-tool .pv-kakao { background: #b2c7da; padding: 18px; border-radius: 14px; }
.seo-tool .pv-kakao .bubble { width: min(280px, 100%); background: #fff; border-radius: 4px 14px 14px 14px; overflow: hidden; }
.seo-tool .pv-kakao .thumb { aspect-ratio: 2 / 1; }
.seo-tool .pv-kakao .txt { padding: 10px 12px 12px; }
.seo-tool .pv-kakao b { display: block; font-size: 14px; }
.seo-tool .pv-kakao p { margin-top: 2px; font-size: 12.5px; color: #666; }
.seo-tool .pv-kakao small { display: block; margin-top: 6px; font-size: 11.5px; color: #9a9a9a; }
/* 페이스북·링크드인 */
.seo-tool .pv-fb { border: 1px solid #dadde1; border-radius: 8px; overflow: hidden; }
.seo-tool .pv-fb .thumb { aspect-ratio: 1.91 / 1; }
.seo-tool .pv-fb .txt { padding: 10px 12px; background: #f2f3f5; }
.seo-tool .pv-fb small { display: block; font-size: 12px; color: #65676b; text-transform: uppercase; }
.seo-tool .pv-fb b { display: block; margin-top: 2px; font-size: 15px; }
.seo-tool .pv-fb p { font-size: 13px; color: #65676b; }
/* X */
.seo-tool .pv-x .large { position: relative; border: 1px solid #cfd9de; border-radius: 16px; overflow: hidden; }
.seo-tool .pv-x .large .thumb { aspect-ratio: 1.91 / 1; }
.seo-tool .pv-x .large .domain { position: absolute; left: 12px; bottom: 12px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; }
.seo-tool .pv-x .small { display: flex; border: 1px solid #cfd9de; border-radius: 16px; overflow: hidden; }
.seo-tool .pv-x .small .thumb { flex: 0 0 120px; aspect-ratio: 1; }
.seo-tool .pv-x .small .txt { padding: 12px 14px; min-width: 0; align-self: center; }
.seo-tool .pv-x .small small { font-size: 13px; color: #536471; }
.seo-tool .pv-x .small b { display: block; font-size: 14.5px; font-weight: 500; }
.seo-tool .pv-x .small p { font-size: 13.5px; color: #536471; }
/* 네이버 */
.seo-tool .pv-naver { display: flex; gap: 14px; padding: 14px; border: 1px solid #e3e5e8; border-radius: 10px; }
.seo-tool .pv-naver .thumb { flex: 0 0 96px; aspect-ratio: 1; border-radius: 6px; }
.seo-tool .pv-naver .txt { min-width: 0; }
.seo-tool .pv-naver b { display: block; font-size: 15px; color: #1a0dab; font-weight: 600; }
.seo-tool .pv-naver p { margin-top: 2px; font-size: 13px; color: #555; }
.seo-tool .pv-naver small { display: block; margin-top: 4px; font-size: 12px; color: #03a94d; }

/* 이미지 점검 */
.seo-tool .img-check { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 40px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; }
.seo-tool .img-frame { position: relative; border-radius: 10px; overflow: hidden; background: var(--soft) repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.seo-tool .img-frame img { display: block; width: 100%; height: auto; }
.seo-tool .img-frame .safe { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); aspect-ratio: 1; height: 100%; border: 2px dashed rgba(37, 99, 235, .9); background: rgba(37, 99, 235, .06); pointer-events: none; }
.seo-tool .img-frame .safe span { position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--blue); color: #fff; font-size: 11px; }
.seo-tool .img-frame.no-image { aspect-ratio: 1.91 / 1; display: grid; place-items: center; color: var(--mute); font-size: 13px; }
.seo-tool .img-stats h3 { font-size: 17px; }
.seo-tool .img-stats dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 16px 0 0; font-size: 14px; }
.seo-tool .img-stats dt { color: var(--mute); }
.seo-tool .img-stats dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.seo-tool .img-stats .hint { margin-top: 16px; font-size: 13px; color: var(--sub); }
.seo-tool .toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--sub); cursor: pointer; }

/* 체크리스트 */
.seo-tool .checks { margin-top: 40px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.seo-tool .checks h3 { padding: 16px 20px; font-size: 15px; background: var(--soft); border-bottom: 1px solid var(--line); }
.seo-tool .check { display: grid; grid-template-columns: 72px minmax(0, 200px) minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px 20px; font-size: 14px; }
.seo-tool .check + .check { border-top: 1px solid var(--line); }
.seo-tool .badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; text-align: center; }
.seo-tool .lv-ok .badge { background: var(--ok-soft); color: var(--ok); }
.seo-tool .lv-warn .badge { background: var(--warn-soft); color: var(--warn); }
.seo-tool .lv-bad .badge { background: var(--bad-soft); color: var(--bad); }
.seo-tool .check .name { font-weight: 600; }
.seo-tool .check .msg { color: var(--sub); }
.seo-tool .check .val { display: block; margin-top: 4px; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }

/* ── 권장 사이즈 ── */
.seo-tool table.sizes { width: 100%; margin-top: 24px; border-collapse: collapse; font-size: 14px; }
.seo-tool .sizes th, .seo-tool .sizes td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.seo-tool .sizes th { background: var(--soft); color: var(--sub); font-weight: 600; font-size: 13px; }
.seo-tool .sizes td:first-child { font-weight: 600; white-space: nowrap; }
.seo-tool .sizes td:nth-child(2), .seo-tool .sizes td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.seo-tool .sizes td:last-child { color: var(--sub); }
.seo-tool .tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.seo-tool .tip { padding: 22px; border-radius: 14px; background: var(--soft); }
.seo-tool .tip b { display: block; font-size: 15px; }
.seo-tool .tip p { margin-top: 6px; color: var(--sub); font-size: 14px; }
.seo-tool .safe-demo { position: relative; aspect-ratio: 1.91 / 1; margin-top: 14px; border-radius: 8px; background: #dfe5ee; overflow: hidden; }
.seo-tool .safe-demo i { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); aspect-ratio: 1; height: 100%; border-left: 2px dashed var(--blue); border-right: 2px dashed var(--blue); background: rgba(37, 99, 235, .08); }
.seo-tool .safe-demo span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; color: var(--blue); font-weight: 600; white-space: nowrap; }

/* ── FAQ ── */
.seo-tool .faq { margin-top: 24px; border-top: 1px solid var(--line); }
.seo-tool .faq-item { border-bottom: 1px solid var(--line); }
.seo-tool .faq-q { display: flex; justify-content: space-between; gap: 16px; padding: 18px 4px; font-size: 15.5px; font-weight: 600; cursor: pointer; list-style: none; }
.seo-tool .faq-q::-webkit-details-marker { display: none; }
.seo-tool .faq-q::after { content: "+"; color: var(--mute); font-weight: 400; font-size: 20px; line-height: 1; }
.seo-tool .faq-item[open] .faq-q::after { content: "−"; }
.seo-tool .faq-a { padding: 0 4px 20px; color: var(--sub); font-size: 14.5px; }

/* ── 문의 ── */
.seo-tool .cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; border-radius: 16px; background: var(--soft); }
.seo-tool .cta b { display: block; font-size: 18px; }
.seo-tool .cta p { margin-top: 4px; color: var(--sub); font-size: 14px; }
.seo-tool .cta a { flex: none; padding: 13px 22px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; }
.seo-tool .cta a:hover { background: #1d4ed8; }

@media (max-width: 860px) {
  .seo-tool .cards, .seo-tool .img-check, .seo-tool .tips { grid-template-columns: 1fr; }
  .seo-tool .check { grid-template-columns: 64px minmax(0, 1fr); }
  .seo-tool .check .msg { grid-column: 2; }
}
@media (max-width: 600px) {
  .seo-tool section { padding: 44px 0; }
  .seo-tool .hero { padding: 56px 0 40px; }
  .seo-tool .check-form { flex-direction: column; }
  /* 세로 배치에서 flex:1은 높이에 적용돼 입력칸이 납작해지므로 해제 */
  .seo-tool .check-form input { flex: none; width: 100%; height: 54px; }
  .seo-tool .check-form button { width: 100%; }
  .seo-tool .sizes-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
  .seo-tool table.sizes { min-width: 600px; }
  .seo-tool .cta { flex-direction: column; align-items: flex-start; padding: 24px; }
  .seo-tool .img-check { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .seo-tool .spinner { animation: none; } }
