:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --field: #ffffff;
  --text: #17202a;
  --muted: #65717f;
  --line: #dce3ea;
  --ad-bg: #fdfefe;
  --ad-line: #b8c4ce;
  --ad-text: #7b8794;
  --primary: #1d7f73;
  --primary-dark: #12675d;
  --accent: #c7502f;
  --focus: #2f74d0;
  --shadow: 0 16px 40px rgba(25, 36, 50, 0.09);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --surface: #18212a;
    --surface-2: #22303b;
    --field: #101820;
    --text: #eef4f7;
    --muted: #a7b4bf;
    --line: #31414e;
    --ad-bg: #141d24;
    --ad-line: #51616d;
    --ad-text: #94a3ad;
    --primary: #36a99a;
    --primary-dark: #5cc4b8;
    --accent: #f08a62;
    --focus: #77aef2;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans KR", sans-serif;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header {
  min-height: 72px;
}
.brand {
  font-weight: 800;
  font-size: 1.2rem;
}
.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}
.nav a {
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a:hover,
.nav a:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}
.language-switcher {
  margin-left: auto;
}
.language-switcher select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 32px 0 10px;
  cursor: pointer;
}
.language-switcher select:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 116, 208, 0.16);
  outline: none;
}
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 48px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: end;
  min-height: 360px;
  padding: 52px 0 28px;
}
.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}
.hero-copy p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.search-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.search-panel label {
  font-weight: 700;
}
.search-panel input,
.tool-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  outline: none;
}
.search-panel input {
  min-height: 46px;
  padding: 0 14px;
}
.tool-textarea {
  min-height: 260px;
  padding: 14px;
  resize: vertical;
}
.search-panel input:focus,
.tool-textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 116, 208, 0.16);
}
.ad-slot {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin: 12px 0 36px;
  border: 1px dashed var(--ad-line);
  border-radius: 8px;
  background: var(--ad-bg);
  color: var(--ad-text);
  font-size: 0.82rem;
  text-transform: uppercase;
}
.section {
  margin-top: 42px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.section-heading h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.2;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
}
.category-grid,
.tool-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.category-card,
.tool-card,
.stat-card,
.tool-shell,
.field-label {
  color: var(--muted);
  font-weight: 700;
}
.tool-select {
  min-height: 42px;
  width: min(100%, 260px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding: 0 12px;
}
.status-line {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}
.table-preview {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.table-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table-preview td {
  min-width: 120px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
}
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.category-card,
.tool-card {
  display: grid;
  gap: 10px;
  min-height: 144px;
  padding: 18px;
}
.category-card:hover,
.tool-card:hover,
.category-card:focus-visible,
.tool-card:focus-visible {
  border-color: rgba(29, 127, 115, 0.55);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.category-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 36px;
  border-radius: 8px;
  background: #e5f3ef;
  color: var(--primary-dark);
  font-weight: 800;
}
.category-card h3,
.category-card p,
.tool-card strong,
.tool-card span {
  margin: 0;
}
.category-card p,
.tool-card span,
.stat-card span,
.result-panel p {
  color: var(--muted);
}
.tool-card[data-hidden="true"] {
  display: none;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}
.tool-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.button.secondary {
  border-color: var(--line);
  background: var(--field);
  color: var(--text);
}
.button:hover,
.button:focus-visible {
  background: var(--primary-dark);
}
.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--surface-2);
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat-card {
  padding: 14px;
}
.stat-card strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.2;
}
.field-label {
  color: var(--muted);
  font-weight: 700;
}
.tool-select {
  min-height: 42px;
  width: min(100%, 260px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding: 0 12px;
}
.status-line {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}
.table-preview {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.table-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table-preview td {
  min-width: 120px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  vertical-align: top;
}
.result-panel {
  min-height: 120px;
  padding: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.site-footer {
  min-height: 84px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.site-footer a {
  color: var(--primary-dark);
  font-weight: 700;
}
@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .language-switcher {
    margin-left: 0;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 30px;
  }
  .category-grid,
  .tool-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .site-header,
  .site-footer,
  main {
    width: min(76%, 1120px);
  }
  .site-header {
    gap: 12px;
    padding: 12px 0;
  }
  .nav {
    width: 100%;
  }
  .language-switcher,
  .language-switcher select {
    width: 100%;
  }
  .nav a {
    padding: 7px 8px;
  }
  .hero-copy h1 {
    font-size: 2rem;
  }
  .section {
    margin-top: 30px;
  }
  .search-panel,
  .category-card,
  .tool-card,
  .tool-shell {
    padding: 14px;
  }
  .tool-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .button {
    width: 100%;
  }
}
