:root {
  --bg: #e9ebf6;
  --ink: #2c2e44;
  --muted: #767a95;
  --faint: #9a9fb6;
  --card: #ffffff;
  --brd: #eef0f7;
  --accent: #6c5ce7;
  --accent-d: #5a49d6;
  --accent-soft: #efecfe;
  --mint: #38c79a;
  --mint-soft: #dcf6ec;
  --coral: #ff8f76;
  --coral-soft: #ffe7e0;
  --sky: #4aa8f0;
  --sky-soft: #e2f1fd;
  --lav-soft: #efeafe;
  --shadow: 0 16px 38px rgba(72, 68, 122, .10), 0 4px 12px rgba(72, 68, 122, .05);
  --shadow-sm: 0 8px 22px rgba(72, 68, 122, .08);
  --radius: 26px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
  overflow-x: hidden;
}

/* Soft pastel backdrop */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  background:
    radial-gradient(38% 40% at 14% 10%, rgba(167, 139, 250, .42), transparent 60%),
    radial-gradient(36% 38% at 86% 6%, rgba(125, 211, 252, .38), transparent 60%),
    radial-gradient(42% 46% at 82% 82%, rgba(255, 170, 165, .34), transparent 62%),
    radial-gradient(40% 42% at 8% 86%, rgba(150, 233, 196, .38), transparent 60%);
  filter: blur(64px) saturate(115%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); }
}

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-size: 19px; font-weight: 700; }
.logo-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #7c6cff, #a78bfa); color: #fff; font-size: 16px;
  box-shadow: 0 8px 18px rgba(108, 92, 231, .4);
}
.logo-text b { color: var(--accent); }
.badge {
  font-size: 12.5px; color: var(--accent-d); font-weight: 600;
  background: var(--accent-soft); padding: 7px 14px; border-radius: 999px;
}

/* Hero */
.hero { text-align: center; padding: 66px 0 36px; }
.hero-pill {
  display: inline-block; margin-bottom: 22px;
  font-size: 13px; font-weight: 600; color: var(--accent-d);
  background: #fff; border: 1px solid var(--brd);
  padding: 8px 17px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: 47px; line-height: 1.2; margin: 0 0 18px; font-weight: 800; letter-spacing: -.03em;
}
.hero h1 .grad {
  background: linear-gradient(115deg, #6c5ce7 0%, #9b6cf0 45%, #ff8fb3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 code {
  font-family: inherit;
  background: #fff; border: 1px solid var(--brd);
  color: var(--accent-d);
  padding: 2px 16px; border-radius: 14px; font-size: .78em;
  box-shadow: var(--shadow-sm);
}
.hero .sub { color: var(--muted); max-width: 600px; margin: 0 auto; font-size: 16.5px; }
.hero .sub b { color: var(--ink); font-weight: 700; }
.trust { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.trust span {
  font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.trust span:nth-child(1) { background: var(--lav-soft); color: #6d51d6; }
.trust span:nth-child(2) { background: var(--sky-soft); color: #2b82c9; }
.trust span:nth-child(3) { background: var(--coral-soft); color: #e0654a; }
.trust span:nth-child(4) { background: var(--mint-soft); color: #1d9b76; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px; margin: 20px 0;
}
.card h2 { margin: 0 0 18px; font-size: 20px; font-weight: 700; }

/* Dropzone */
.dropzone {
  position: relative;
  background: #fff;
  border: 2px dashed #d3d7ea;
  border-radius: var(--radius);
  padding: 60px 20px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s, transform .14s, box-shadow .2s;
  outline: none; box-shadow: var(--shadow);
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 22px 46px rgba(108, 92, 231, .18);
}
.dropzone.dragover {
  border-color: var(--accent); background: var(--accent-soft);
  transform: scale(1.01); box-shadow: 0 22px 46px rgba(108, 92, 231, .22);
}
.dz-inner { position: relative; }
.dz-icon {
  width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 22px;
  background: linear-gradient(135deg, #7c6cff, #9b8cff); color: #fff;
  display: grid; place-items: center; font-size: 30px;
  box-shadow: 0 14px 30px rgba(108, 92, 231, .42);
}
.dz-title { font-size: 20px; font-weight: 700; margin: 4px 0; }
.dz-or { color: var(--faint); margin: 9px 0; font-size: 14px; }
.dz-hint { color: var(--faint); font-size: 13px; margin-top: 14px; }

/* Buttons */
.btn {
  border: none; border-radius: 14px; padding: 13px 24px; font-size: 15px;
  font-weight: 700; cursor: pointer; font-family: inherit;
  transition: transform .1s, box-shadow .2s, background .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px rgba(108, 92, 231, .4); }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(108, 92, 231, .5); }
.btn-ghost { background: #f1f2fa; color: var(--ink); }
.btn-ghost:hover { background: #e7e8f5; }
.btn-sm { padding: 9px 17px; font-size: 13.5px; }

/* Settings */
.setting-group { margin-bottom: 24px; }
.setting-group:last-child { margin-bottom: 0; }
.setting-title { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 12px; }
.setting-hint { color: var(--faint); font-size: 13px; margin: 10px 0 0; }
.setting-row { display: flex; gap: 22px; flex-wrap: wrap; }
.setting-row .setting-group { flex: 1; min-width: 200px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 1.5px solid var(--brd); border-radius: 14px;
  font-size: 14px; cursor: pointer; user-select: none;
  background: #f7f8fc; color: var(--muted); font-weight: 600;
  transition: border-color .14s, background .14s, color .14s, box-shadow .14s, transform .1s;
}
.chip:hover { border-color: #c9cdea; color: var(--ink); transform: translateY(-1px); }
.chip:has(input:checked) {
  border-color: transparent; color: #fff;
  background: var(--accent); box-shadow: 0 10px 22px rgba(108, 92, 231, .38);
}
.chip input { display: none; }

select, input[type="color"] {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--brd); border-radius: 14px;
  font-size: 14.5px; font-family: inherit; background: #f7f8fc; color: var(--ink);
  cursor: pointer; transition: border-color .14s, box-shadow .14s;
}
select:hover { border-color: #c9cdea; }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="color"] { height: 48px; padding: 5px; margin-top: 10px; }

/* Results */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.results-head h2 { margin: 0; }
.count { color: var(--accent); font-size: 15px; }
.results-actions { display: flex; gap: 9px; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 15px; }
.result-item {
  border: 1px solid var(--brd); border-radius: var(--radius-sm); padding: 16px; text-align: center;
  background: #fbfbfe; transition: transform .12s, box-shadow .16s;
}
.result-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.result-item.error { border-color: #ffd4cc; background: #fff5f3; }
.thumb {
  width: 90px; height: 90px; margin: 0 auto 12px; border-radius: 14px;
  background-color: #eef0f6;
  background-image:
    linear-gradient(45deg, #dfe2ee 25%, transparent 25%),
    linear-gradient(-45deg, #dfe2ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe2ee 75%),
    linear-gradient(-45deg, transparent 75%, #dfe2ee 75%);
  background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  display: grid; place-items: center; overflow: hidden;
}
.thumb img { max-width: 78px; max-height: 78px; }
.result-name { font-size: 13px; font-weight: 700; word-break: break-all; margin-bottom: 4px; }
.result-meta { font-size: 12px; color: var(--faint); margin-bottom: 12px; }
.result-err { font-size: 12.5px; color: #e0654a; margin-bottom: 12px; }

/* Content */
.content h2 { margin-top: 30px; }
.content h2:first-child { margin-top: 0; }
.steps, .features { padding-left: 22px; margin: 0; }
.steps li, .features li { margin-bottom: 12px; color: var(--muted); }
.steps li b, .features li b { color: var(--ink); }
.content code { background: var(--accent-soft); color: var(--accent-d); padding: 1px 7px; border-radius: 6px; font-size: .9em; }
.faq details {
  border: 1px solid var(--brd); border-radius: var(--radius-sm); padding: 15px 19px; margin-bottom: 11px; background: #fbfbfe;
  transition: box-shadow .14s;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋ "; color: var(--accent); font-weight: 800; }
.faq details[open] summary::before { content: "－ "; }
.faq details[open] summary { margin-bottom: 9px; }
.faq p { margin: 0; color: var(--muted); }

/* Guides list (homepage) */
.guide-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.guide-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border: 1px solid var(--brd); border-radius: var(--radius-sm); background: #fbfbfe;
  text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .16s, border-color .14s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: rgba(108, 92, 231, .4); }
.guide-card b { font-size: 15px; }
.guide-card span { font-size: 13px; color: var(--muted); }

/* Article pages */
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.article p { color: var(--muted); }
.article h2 { margin-top: 28px; }
.article ol, .article ul { color: var(--muted); padding-left: 22px; }
.article ol li, .article ul li { margin-bottom: 10px; }
.article b { color: var(--ink); }
.cta {
  display: inline-block; margin-top: 10px; background: var(--accent); color: #fff;
  padding: 13px 26px; border-radius: 14px; font-weight: 700; text-decoration: none;
  box-shadow: 0 12px 26px rgba(108, 92, 231, .4); transition: background .18s, transform .1s;
}
.cta:hover { background: var(--accent-d); transform: translateY(-2px); }
.related { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--brd); }
.related b { display: block; margin-bottom: 8px; }
.related a { color: var(--accent); text-decoration: none; font-weight: 600; display: inline-block; margin-right: 16px; }
.related a:hover { text-decoration: underline; }

/* Ads */
.ad-slot {
  min-height: 92px; margin: 20px auto; border: 1.5px dashed #d3d7ea; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: rgba(255, 255, 255, .5);
}
.ad-label { color: var(--faint); font-size: 13px; }
.ad-inline { margin: 26px 0; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255, 255, 255, .6); margin-top: 36px; padding: 26px 0; }
.site-footer p { color: var(--faint); font-size: 13.5px; text-align: center; margin: 0; }
.site-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

/* Overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(233, 235, 246, .75); backdrop-filter: blur(6px);
  display: grid; place-content: center; justify-items: center; gap: 16px; z-index: 50;
}
.spinner {
  width: 48px; height: 48px; border: 3.5px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
#overlayText { color: var(--accent-d); font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .hero { padding: 42px 0 24px; }
  .hero h1 { font-size: 32px; }
  .hero .sub { font-size: 15px; }
  .card { padding: 22px; }
  .badge { display: none; }
}
