/* Rucid Tools — 공통 스타일 */
:root {
  --navy: #10141F;
  --navy-sub: #222B38;
  --gold: #D4A437;
  --gold-light: #E8C46E;
  --ivory: #FAF6EC;
  --red: #E05252;
  --hl: #F8E9A8;
  --text: #1c2230;
  --text-sub: #5a6272;
  --line: #e6e2d6;
  --card: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Malgun Gothic', sans-serif;
  background: var(--ivory);
  color: var(--text);
  line-height: 1.65;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* 헤더 */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.logo .gold { color: var(--gold); }
.gnb { display: flex; gap: 16px; font-size: 0.88rem; flex-wrap: wrap; }
.gnb a { color: #c9cedb; }
.gnb a:hover, .gnb a.active { color: var(--gold-light); }

/* 히어로 */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-sub) 100%);
  color: #fff;
  padding: 48px 0 56px;
  text-align: center;
}
.hero h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 12px; }
.hero h1 .gold { color: var(--gold); }
.hero p { color: #b8bfce; font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* 메인 */
.page-main { padding: 36px 0 64px; }

/* 도구 카드 그리드 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(16, 20, 31, 0.1);
  border-color: var(--gold);
}
.tool-card .emoji { font-size: 1.6rem; }
.tool-card h3 { font-size: 1.05rem; margin: 10px 0 6px; font-weight: 700; }
.tool-card p { font-size: 0.85rem; color: var(--text-sub); }

/* 도구 페이지 공통 */
.tool-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.tool-title .gold { color: var(--gold); }
.tool-desc { color: var(--text-sub); font-size: 0.95rem; margin-bottom: 24px; }

.tool-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 28px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fdfcf8;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field .hint { font-size: 0.78rem; color: var(--text-sub); margin-top: 4px; }

.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 140px; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--navy-sub); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.gold:hover { background: var(--gold-light); }

/* 결과 */
.result {
  display: none;
  margin-top: 24px;
  border-top: 2px solid var(--gold);
  padding-top: 20px;
}
.result.show { display: block; }
.result-big {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
}
.result-big .unit { font-size: 1rem; font-weight: 600; color: var(--text-sub); }
.result-label { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 2px; }

.result-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.9rem; }
.result-table th, .result-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.result-table th { text-align: left; font-weight: 600; color: var(--text-sub); }
.result-table .total td, .result-table .total th { font-weight: 800; color: var(--navy); }

/* 통계 칩 (글자수 세기) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.stat-chip {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.stat-chip .num { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.stat-chip .lbl { font-size: 0.78rem; color: var(--text-sub); }

/* 최신성 배지 */
.badge-fresh {
  display: inline-block;
  background: #eef7ee;
  color: #2e7d32;
  border: 1px solid #cde5cd;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* 결과 해석 문구 */
.insight {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--ivory);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: #4a4432;
}

/* 공유 버튼 줄 */
.share-row { margin-top: 16px; }
.share-row .btn { font-size: 0.88rem; padding: 10px 18px; }

/* 광고 자리 */
.ad-slot {
  margin: 28px 0;
  min-height: 100px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b6b0a0;
  font-size: 0.8rem;
  background: #fdfcf8;
}

/* 가이드 본문 */
.guide { margin-top: 40px; }
.guide h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--gold);
}
.guide h3 { font-size: 1.02rem; font-weight: 700; margin: 20px 0 8px; }
.guide p { font-size: 0.93rem; margin-bottom: 12px; color: #333a4a; }
.guide ul, .guide ol { padding-left: 22px; margin-bottom: 12px; font-size: 0.93rem; color: #333a4a; }
.guide li { margin-bottom: 6px; }
.guide .hl {
  background: linear-gradient(transparent 55%, var(--hl) 55%);
  font-weight: 700;
}
.guide table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 12px 0; }
.guide table th, .guide table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.guide table th { background: var(--ivory); font-weight: 700; }

.notice {
  background: #fdf6e4;
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.83rem;
  color: #6b5b2a;
  margin-top: 20px;
}

/* 푸터 */
.site-footer {
  background: var(--navy);
  color: #8e96a8;
  padding: 32px 0;
  font-size: 0.82rem;
  margin-top: 40px;
}
.site-footer .container { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #b8bfce; margin-right: 14px; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .brand { font-weight: 700; color: #fff; }
.site-footer .brand .gold { color: var(--gold); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.45rem; }
  .tool-title { font-size: 1.3rem; }
  .tool-box { padding: 20px 16px; }
  .result-big { font-size: 1.4rem; }
}
