:root {
  --bg: #f6f7fb;
  --panel: #fff;
  --text: #171923;
  --muted: #667085;
  --line: #e6e8ef;
  --primary: #111827;
  --accent: #2563eb;
  --ok: #047857;
  --warn-bg: #fff7ed;
  --warn-line: #fed7aa;
  --warn-text: #9a3412;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard, "Noto Sans KR", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 34rem),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 18px 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.service-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.service-logo-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(6, 182, 212, 0.24);
}

.service-logo-text {
  font-size: 20px;
  white-space: nowrap;
}

.home-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: #374151;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.hero, .panel, .seo-section {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(230,232,239,0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero {
  padding: 30px;
  backdrop-filter: blur(12px);
}

.eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.hero p {
  margin: 16px 0 0;
  max-width: 760px;
  color: #475467;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-action, .secondary-action, .result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary-action, .result-link.primary {
  background: var(--primary);
  color: #fff;
}

.secondary-action, .result-link.secondary {
  background: #fff;
  color: #344054;
  border-color: var(--line);
}

.result-link.warn {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-text);
  font-size: 14px;
  font-weight: 750;
}

.panel, .seo-section {
  margin-top: 18px;
}

.panel-header {
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.step-num {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.step-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.panel-body {
  padding: 20px 24px 24px;
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  padding: 11px 14px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.tab.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  min-height: 52px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-md);
  color: #1f2937;
  font-weight: 850;
  text-align: left;
  padding: 13px 14px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.choice:hover {
  transform: translateY(-1px);
  border-color: #b8c1d1;
  background: #fbfdff;
}

.choice.selected {
  border-color: #111827;
  background: #f8fafc;
  box-shadow: inset 0 0 0 2px #111827;
}

.choice.direct {
  border-style: dashed;
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.choice.direct.selected {
  box-shadow: inset 0 0 0 2px #2563eb;
  border-color: #2563eb;
}

.hidden {
  display: none !important;
}

.direct-box {
  margin-top: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.direct-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.direct-input {
  width: 100%;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0 13px;
  outline: none;
  background: #fff;
  font-weight: 750;
}

.direct-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.direct-confirm {
  height: 48px;
  border: 0;
  border-radius: var(--radius-md);
  background: #111827;
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
}

.direct-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.result {
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.result-kicker {
  color: var(--ok);
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 8px;
}

.result-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.result-sub {
  margin: 10px 0 0;
  color: #475467;
  font-weight: 650;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.check {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #f8fafc;
}

.check strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.check span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.reset-line {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.reset-link {
  color: #2563eb;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  border: 0;
  padding: 0;
}

.seo-section {
  padding: 24px;
}

.seo-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.seo-section h3 {
  margin: 22px 0 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.seo-section p {
  margin: 0 0 10px;
  color: #475467;
  font-weight: 650;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.keyword-list span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.sticky-state {
  position: sticky;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 10;
  margin-top: 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.sticky-state.show { display: flex; }

.sticky-state span {
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-state button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 13px;
}

.footer {
  margin-top: 22px;
  color: #667085;
  font-size: 13px;
  text-align: center;
  font-weight: 650;
}

.error-note {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-md);
  background: #fff1f2;
  color: #be123c;
  font-weight: 800;
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .check-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding: 16px 12px 52px; }
  .service-logo-icon { width: 32px; height: 32px; border-radius: 12px; font-size: 18px; }
  .service-logo-text { font-size: 18px; }
  .hero { padding: 24px 18px; border-radius: 22px; }
  .panel, .seo-section { border-radius: 22px; }
  .panel-header, .panel-body, .result, .seo-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .grid { grid-template-columns: 1fr; }
  .choice { min-height: 50px; }
  .direct-row { grid-template-columns: 1fr; }
  .direct-confirm { width: 100%; }
  .sticky-state { border-radius: 18px; align-items: stretch; }
  .sticky-state button { min-width: 72px; }
}
