/* 다모아툴 — 공용 디자인 시스템 (라이트 전용). 도구 페이지는 이 파일만 사용 */
:root {
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --bg-elev: #eef1f5;
  --text: #191c22;
  --text-dim: #626b7a;
  --border: #dfe4ec;
  --accent: #ff7847;        /* 코랄 — 도구별 포인트는 --tool-accent 로 덮어씀 */
  --tool-accent: var(--accent);
  --ok: #34c179;
  --radius: 14px;
  --shadow: rgba(20, 30, 50, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  transition: background 0.25s;
}
#app { max-width: 760px; margin: 0 auto; padding: 0 16px; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, textarea, select { font-family: inherit; }
a { color: var(--tool-accent); text-decoration: none; }

/* ── 헤더 ── */
.header { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.15rem; color: var(--text); }
.brand .mark { font-size: 1.25rem; }
.nav { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  background: none; border: none; color: var(--text-dim);
  font-size: 1.1rem; width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg-elev); color: var(--text); }

/* ── 메인 공통 ── */
.main { flex: 1; padding: 20px 0 32px; display: flex; flex-direction: column; gap: 18px; }
.main > * { animation: sec-in 0.35s ease backwards; }
.main > *:nth-child(2) { animation-delay: 0.07s; }
.main > *:nth-child(3) { animation-delay: 0.14s; }
@keyframes sec-in { from { opacity: 0; transform: translateY(10px); } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 12px var(--shadow);
}
.page-title { font-size: 1.35rem; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.page-desc { color: var(--text-dim); font-size: 0.92rem; margin-top: 4px; }

/* ── 폼 요소 ── */
.field label { font-size: 0.8rem; font-weight: 700; color: var(--text-dim); display: block; margin-bottom: 6px; }
.input, textarea.input {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  padding: 11px 13px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.input:focus { border-color: var(--tool-accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--tool-accent); color: #fff;
  border: none; border-radius: 10px;
  font-size: 1.02rem; font-weight: 800;
  padding: 13px 22px; cursor: pointer;
  transition: filter 0.15s, transform 0.08s;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost {
  background: var(--bg-elev); color: var(--text); box-shadow: none;
  border: 1px solid var(--border);
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* 칩(프리셋/참가자) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.88rem; font-weight: 700; padding: 7px 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chip-btn:hover { border-color: var(--tool-accent); }
.chip-btn.on { background: var(--tool-accent); color: #fff; border-color: var(--tool-accent); }

/* 결과 영역 */
.result-box {
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.result-big { font-size: 2rem; font-weight: 900; }

/* ── 허브 그리드 ── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 8px;
  color: var(--text);
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--tool-accent); }
.tool-card .icon { font-size: 2rem; }
.tool-card .name { font-weight: 900; font-size: 1.08rem; }
.tool-card .desc { font-size: 0.85rem; color: var(--text-dim); }

/* ── SEO 텍스트 섹션 ── */
.seo-content { border-top: 1px solid var(--border); padding: 24px 0 8px; }
.seo-content h2 { font-size: 1rem; margin: 18px 0 8px; }
.seo-content p, .seo-content li, .seo-content dd { font-size: 0.88rem; color: var(--text-dim); }
.seo-content dt { font-weight: 800; font-size: 0.9rem; margin-top: 10px; color: var(--text); }
.seo-content ol, .seo-content ul { padding-left: 20px; }

/* ── 푸터 ── */
.footer { border-top: 1px solid var(--border); padding: 14px 0 24px; font-size: 0.78rem; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer a { color: var(--text-dim); font-weight: 700; }
.footer a:hover { color: var(--tool-accent); }

/* ── 토스트 ── */
.toast-wrap { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg);
  font-weight: 800; font-size: 0.9rem;
  padding: 11px 18px; border-radius: 9px;
  box-shadow: 0 4px 14px var(--shadow);
  animation: toast-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.toast.out { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.95); } }

/* ── 전체화면 모드 ── */
.fs-active .header, .fs-active .seo-content, .fs-active .footer { display: none; }
.fs-active .main { justify-content: center; }

@media (max-width: 480px) {
  .page-title { font-size: 1.15rem; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── 쿠팡 파트너스 슬롯 ── */
.promo { margin: 16px 0; text-align: center; }
.promo-label { font-size: 0.68rem; color: var(--text-dim); font-weight: 800; letter-spacing: 0.05em; }
.promo a { font-weight: 800; display: inline-block; margin: 4px 0; }
.promo-disclosure { font-size: 0.72rem; color: var(--text-dim); margin-top: 6px; line-height: 1.5; text-align: center; }
.coupang-wrap { display: flex; justify-content: center; margin: 8px 0; min-height: 140px; max-width: 100%; overflow-x: hidden; }

/* ── 쿠팡 사이드 레일 (넓은 화면 전용) ── */
.side-rail { position: fixed; top: 90px; width: 160px; display: none; z-index: 5; }
@media (min-width: 1160px) { .side-rail { display: block; } }
.side-l { left: calc(50% - 564px); }
.side-r { left: calc(50% + 404px); }
.fs-active .side-rail { display: none !important; }
