:root {
  --bg: #f5f6f0;
  --card: #ffffff;
  --ink: #17231c;
  --muted: #66736b;
  --line: #dfe5dd;
  --green: #1f7a4d;
  --green-dark: #145a38;
  --lime: #dff36d;
  --orange: #ff8a5b;
  --shadow: 0 18px 50px rgba(30, 55, 40, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 0%, rgba(223, 243, 109, 0.34), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: Pretendard, "Apple SD Gothic Neo", Inter, system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  width: min(1120px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.16rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  color: white;
  background: var(--green);
  transform: rotate(-5deg);
}
nav { display: flex; gap: 28px; color: var(--muted); font-weight: 700; font-size: 0.92rem; }
nav a:hover { color: var(--green); }

main { min-height: 70vh; }
.home, .tool-page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 76px 0 58px; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(223, 243, 109, 0.58);
  font-weight: 800;
  font-size: 0.82rem;
}
.hero h1 {
  max-width: 760px;
  margin: 0 auto 20px;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}
.hero h1 span { color: var(--green); position: relative; }
.hero p { max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }
.tool-search {
  width: min(610px, 100%);
  height: 62px;
  margin: 30px auto 0;
  padding: 0 16px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #cbd6cc;
  border-radius: 20px;
  background: white;
  box-shadow: 0 14px 40px rgba(30, 55, 40, 0.1);
  text-align: left;
}
.tool-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(31,122,77,.1), var(--shadow); }
.tool-search > span { color: var(--green); font-size: 1.45rem; font-weight: 900; }
.tool-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.tool-search kbd { padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--bg); font: 700 .78rem/1.5 system-ui; }

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin: 8px 0 42px;
  border: 1px dashed #bdc8be;
  border-radius: 16px;
  color: #8a958d;
  background: rgba(255,255,255,0.5);
  font-size: 0.78rem;
}
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.04em; }
.section-head p { margin: 0; color: var(--muted); }
.category-tabs {
  display: flex;
  gap: 8px;
  margin: -4px 0 22px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  font-weight: 800;
  font-size: .86rem;
}
.category-tab:hover, .category-tab.active { color: white; border-color: var(--green); background: var(--green); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-card {
  position: relative;
  min-height: 210px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 2px 0 rgba(23,35,28,0.02);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tool-card:hover { transform: translateY(-5px); border-color: #aabdab; box-shadow: var(--shadow); }
.tool-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  border-radius: 15px;
  background: var(--icon-bg, #edf4ed);
  font-size: 1.25rem;
}
.tool-card h3 { margin: 0 0 7px; font-size: 1.18rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.tool-card .arrow { position: absolute; right: 24px; top: 26px; color: var(--green); font-weight: 900; }
.compact-card { min-height: 175px; }
.compact-card .tool-icon { margin-bottom: 18px; }
.empty-state {
  padding: 54px 20px;
  border: 1px dashed #bdc8be;
  border-radius: var(--radius);
  text-align: center;
  background: rgba(255,255,255,.55);
}
.empty-state strong, .empty-state span { display: block; }
.empty-state span { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.recent-section { margin-top: 72px; }

.about {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  margin: 90px 0;
}
.about-main, .about-stat {
  padding: 38px;
  border-radius: 28px;
}
.about-main { color: white; background: var(--green-dark); }
.about-main h2 { margin: 0 0 14px; font-size: 2rem; line-height: 1.2; }
.about-main p { margin: 0; color: #c8ded1; }
.about-stat { background: var(--lime); display: flex; flex-direction: column; justify-content: space-between; }
.about-stat strong { font-size: 3.8rem; line-height: 1; letter-spacing: -0.06em; }
.about-stat span { font-weight: 800; }

.tool-page { padding: 42px 0 90px; }
.breadcrumbs { margin-bottom: 22px; color: var(--muted); font-size: .86rem; }
.breadcrumbs a:hover { color: var(--green); }
.tool-header { max-width: 730px; margin-bottom: 34px; }
.tool-header h1 { margin: 0 0 12px; font-size: clamp(2.2rem, 5vw, 3.7rem); line-height: 1.1; letter-spacing: -0.05em; }
.tool-header p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.tool-box {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.side-ad { min-height: 250px; margin: 0; position: sticky; top: 20px; }
.field { margin-bottom: 20px; }
.field label, .field-label { display: block; margin-bottom: 8px; font-weight: 800; font-size: .9rem; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #ccd6cd;
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fbfcfa;
  transition: border-color .2s, box-shadow .2s;
}
.field input, .field select { height: 52px; padding: 0 15px; }
.field textarea { min-height: 220px; padding: 15px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(31,122,77,.1); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 850;
}
.btn-primary { color: white; background: var(--green); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { color: var(--ink); background: #eef1ec; }
.btn-secondary:hover { background: #e3e8e1; }
.results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.result {
  padding: 18px;
  border-radius: 16px;
  background: #f0f5ef;
}
.result span { display: block; color: var(--muted); font-size: .8rem; }
.result strong { display: block; margin-top: 4px; font-size: 1.3rem; line-height: 1.2; word-break: break-all; }
.big-result {
  margin-top: 22px;
  padding: 26px;
  border-radius: 20px;
  background: var(--lime);
  text-align: center;
}
.big-result span { display: block; font-size: .84rem; font-weight: 800; }
.big-result strong { display: block; margin-top: 5px; font-size: clamp(2rem, 7vw, 4rem); line-height: 1.05; letter-spacing: -0.04em; }
.options { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.check input { accent-color: var(--green); width: 18px; height: 18px; }
.info-section {
  max-width: 760px;
  margin-top: 48px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.info-section h2 { font-size: 1.45rem; }
.info-section p, .info-section li { color: var(--muted); }
.inline-note { margin: 12px 0 0; color: var(--muted); font-size: .82rem; }
.warning-note { color: #a33b24; font-weight: 750; }
.initial-tool-box { min-height: 180px; }
.initial-tool-box h2 { margin-top: 0; }
.initial-tool-box p, .server-link-list { color: var(--muted); }
.server-link-list { padding-left: 20px; }
.server-link-list a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.legal-page { max-width: 880px; }
.legal-content h2 { margin: 34px 0 8px; font-size: 1.25rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--muted); }
.legal-content a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.contact-email { font-size: 1.2rem; font-weight: 850; }
.faq-section { margin-top: 34px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
}
.faq-list summary {
  padding: 17px 46px 17px 18px;
  cursor: pointer;
  font-weight: 800;
  position: relative;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--green);
  font-size: 1.25rem;
  transform: translateY(-50%);
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 18px 18px; }
.not-found {
  width: min(680px, calc(100% - 40px));
  min-height: 65vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-code { color: var(--green); font-size: clamp(4rem, 16vw, 8rem); font-weight: 950; line-height: 1; letter-spacing: -.08em; }
.not-found h1 { margin: 18px 0 8px; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.05em; }
.not-found p { margin: 0 0 28px; color: var(--muted); }
.not-found .btn { display: inline-flex; align-items: center; }

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.footer-brand { color: var(--ink); }
.footer-links { display: flex; gap: 18px; }
.footer-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}
.footer-button:hover { color: var(--green); }
.copyright { grid-column: 1 / -1; margin: 10px 0 0; }
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  width: min(760px, calc(100% - 28px));
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 22px 70px rgba(20, 40, 28, .2);
}
.consent-banner[hidden] { display: none; }
.consent-banner strong { display: block; }
.consent-banner p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.consent-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.consent-actions .btn { min-height: 42px; white-space: nowrap; font-size: .84rem; }
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  padding: 11px 18px;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-weight: 700;
  font-size: .88rem;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .side-ad { position: static; min-height: 100px; }
  .results { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-header, .home, .tool-page, footer { width: min(100% - 28px, 1120px); }
  nav a:last-child { display: none; }
  .hero { padding: 50px 0 42px; }
  .hero h1 { font-size: 3rem; }
  .tool-search { height: 56px; margin-top: 24px; border-radius: 17px; }
  .tool-search kbd { display: none; }
  .tool-grid, .about, .field-row { grid-template-columns: 1fr; }
  .tool-card { min-height: 180px; }
  .about { margin: 60px 0; }
  footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
  .copyright { grid-column: auto; }
  .consent-banner { align-items: stretch; flex-direction: column; gap: 14px; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
