/* 달곰 도구모음 — Clean Structural · 상용급 리디자인 v2
   Archetype: Clean Structural + Editorial Split hero + Bento popular
   Accent: ONE — Deep Blue. Amber reserved for brand mark only. */
:root{
  --bg:#f3f5f9; --surface:#ffffff; --ink:#0f1b2d; --muted:#5b6472; --faint:#8b94a3;
  --line:#e2e7f0; --line-soft:#edf0f6;
  --brand:#1b64da; --brand-ink:#12489f; --brand-soft:#e9f1fe; --brand-ghost:#f3f7ff;
  --amber:#e8821a;
  --r-lg:22px; --r-md:16px; --r-sm:12px;
  --shadow-card:0 20px 50px -22px rgba(27,100,218,.22);
  --shadow-pop:0 8px 24px -12px rgba(15,27,45,.18);
  --spring:cubic-bezier(.16,1,.3,1);
  --max:1120px;
  --font:"Pretendard","Apple SD Gothic Neo","Noto Sans KR",sans-serif;
  --font-en:"Outfit","Pretendard",sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; min-height:100dvh; font-family:var(--font);
  font-size:16px; line-height:1.65; color:var(--ink);
  background:
    radial-gradient(900px 420px at 85% -5%, #e2ecff 0%, transparent 60%),
    radial-gradient(700px 380px at 5% 0%, #f4f6fb 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  word-break:keep-all; overflow-wrap:break-word;
  padding-bottom:84px;
}
/* subtle paper grain */
body::after{
  content:""; position:fixed; inset:0; z-index:60; pointer-events:none; opacity:.05;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
h1,h2,h3{text-wrap:balance; letter-spacing:-.025em; line-height:1.28}
img{max-width:100%}
a{color:var(--brand-ink)}
::selection{background:var(--brand); color:#fff}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px; border-radius:6px}
.wrap{width:min(var(--max),calc(100% - 40px)); margin-inline:auto}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0)}
.num{font-family:var(--font-en); font-variant-numeric:tabular-nums; letter-spacing:-.01em}

/* ---------- header ---------- */
.site-header{position:sticky; top:0; z-index:40; background:rgba(243,245,249,.88); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border-bottom:1px solid var(--line)}
.header-inner{display:flex; align-items:center; gap:12px; padding:12px 0}
.brand{display:inline-flex; align-items:center; gap:10px; color:var(--ink); font-weight:800; font-size:1.05rem; text-decoration:none; white-space:nowrap; letter-spacing:-.02em}
.brand-img{width:34px; height:34px; border-radius:11px; object-fit:cover; display:block; box-shadow:0 6px 16px -6px rgba(232,130,26,.5)}
.searchbox{flex:1; display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:11px 18px; min-width:0; transition:border-color .35s var(--spring), box-shadow .35s var(--spring)}
.searchbox:focus-within{border-color:var(--brand); box-shadow:0 0 0 3px rgba(27,100,218,.14)}
.searchbox input{flex:1; border:0; outline:0; font-size:.95rem; font-family:inherit; min-width:0; background:transparent; color:var(--ink)}
.searchbox input::placeholder{color:var(--faint)}
.searchbox kbd{font-family:var(--font-en); font-size:.7rem; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:2px 7px; background:var(--bg); white-space:nowrap}
@media(max-width:640px){.searchbox kbd{display:none} .brand span:last-child{font-size:.95rem}}

/* ---------- hero : editorial split ---------- */
.hero{display:grid; gap:28px; padding:44px 0 8px; align-items:center}
@media(min-width:900px){.hero{grid-template-columns:1.04fr .96fr; padding:64px 0 12px}}
.eyebrow{display:inline-flex; align-items:center; gap:7px; border-radius:999px; padding:6px 14px; font-size:.72rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; font-family:var(--font-en);
  background:var(--brand-soft); color:var(--brand-ink); border:1px solid #d3e3fd}
.hero h1{font-size:clamp(2rem,5.4vw,3.3rem); line-height:1.22; margin:.45em 0 .3em; font-weight:800}
.hero h1 .accent{color:var(--brand)}
.hero .lead{color:var(--muted); margin:0 0 20px; max-width:36rem}
.hero-cta{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:22px}
.hero-stats{display:flex; gap:26px; flex-wrap:wrap}
.hero-stats div b{display:block; font-size:1.35rem; font-weight:800}
.hero-stats div span{font-size:.8rem; color:var(--muted)}
/* live demo card — double bezel */
.demo-shell{background:rgba(255,255,255,.6); border:1px solid var(--line); border-radius:28px; padding:7px; box-shadow:var(--shadow-card)}
.demo-core{background:var(--surface); border-radius:21px; padding:20px; box-shadow:inset 0 1px 1px rgba(255,255,255,.9), inset 0 -1px 2px rgba(15,27,45,.04)}
.demo-core .demo-tag{font-size:.75rem; font-weight:800; color:var(--brand-ink); display:flex; align-items:center; gap:6px; margin-bottom:10px}
.demo-core textarea{width:100%; border:1px solid var(--line); border-radius:var(--r-sm); padding:12px 14px; font-size:.95rem; font-family:inherit; background:var(--bg); min-height:96px; resize:vertical; color:var(--ink)}
.demo-core textarea:focus{outline:0; border-color:var(--brand); box-shadow:0 0 0 3px rgba(27,100,218,.14)}
.demo-stats{display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:10px}
.demo-stats div{background:var(--brand-ghost); border:1px solid var(--line-soft); border-radius:10px; padding:8px 4px; text-align:center}
.demo-stats b{display:block; font-size:1.05rem}
.demo-stats span{font-size:.68rem; color:var(--muted)}
.demo-link{display:inline-flex; align-items:center; gap:6px; margin-top:12px; font-size:.85rem; font-weight:800; text-decoration:none}
.demo-link:hover{text-decoration:underline}
.demo-link .ic,.demo-tag .ic{width:16px; height:16px}
#qrBox svg{width:min(248px,100%); height:auto; display:block}

/* ---------- buttons ---------- */
.btn{display:inline-flex; align-items:center; gap:9px; border:0; border-radius:999px; padding:14px 24px; font-weight:800; font-size:.95rem; cursor:pointer; min-height:52px; font-family:inherit; text-decoration:none;
  transition:transform .45s var(--spring), box-shadow .45s var(--spring), background .3s}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--brand); color:#fff; box-shadow:0 14px 30px -12px rgba(27,100,218,.55)}
.btn-primary:hover{transform:scale(1.02); box-shadow:0 18px 36px -12px rgba(27,100,218,.6)}
.btn-ghost{background:var(--surface); border:1px solid var(--line); color:var(--ink)}
.btn-ghost:hover{transform:translateY(-1px); box-shadow:var(--shadow-pop)}
.btn .arr{display:inline-grid; place-items:center; width:26px; height:26px; border-radius:50%; background:rgba(255,255,255,.22); transition:transform .45s var(--spring)}
.btn-primary:hover .arr{transform:translateX(3px)}
.btn-ghost .arr{background:var(--bg)}

/* ---------- chips ---------- */
.chips{display:flex; gap:8px; overflow-x:auto; padding:14px 2px; scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:10px 17px; font-weight:700; font-size:.88rem; cursor:pointer; min-height:46px; font-family:inherit; color:var(--ink);
  transition:all .4s var(--spring)}
.chip:hover{border-color:var(--brand); transform:translateY(-1px)}
.chip:active{transform:scale(.96)}
.chip[aria-pressed="true"]{background:var(--ink); color:#fff; border-color:var(--ink)}

/* ---------- sections / grids ---------- */
.section-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:30px 0 14px}
.section-head h2{font-size:1.2rem; margin:0; display:flex; align-items:center; gap:9px}
.section-head h2 .ic{width:22px; height:22px; color:var(--brand)}
.section-head a{font-size:.85rem; font-weight:700; text-decoration:none}
.grid{display:grid; grid-template-columns:repeat(2,1fr); gap:12px}
@media(min-width:760px){.grid{grid-template-columns:repeat(4,1fr); gap:14px}}
/* bento popular */
.bento{display:grid; grid-template-columns:repeat(2,1fr); gap:12px}
@media(min-width:760px){.bento{grid-template-columns:repeat(4,1fr); gap:14px} .bento .tool-card.featured{grid-column:span 2; grid-row:span 1}}

/* ---------- tool card ---------- */
.tool-card{position:relative; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:18px 16px; display:flex; flex-direction:column; gap:9px; text-decoration:none; color:inherit; min-height:150px;
  box-shadow:0 1px 2px rgba(15,27,45,.04); transition:transform .5s var(--spring), box-shadow .5s var(--spring), border-color .3s}
.tool-card:hover{transform:translateY(-4px); box-shadow:var(--shadow-card); border-color:#c9d9f8}
.tool-card:active{transform:scale(.98)}
.tool-card .t-top{display:flex; align-items:flex-start; justify-content:space-between; gap:8px}
.icon-tile{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; flex:0 0 auto}
.icon-tile .ic{width:24px; height:24px}
.tile-blue{background:#e9f1fe; color:#1b64da} .tile-teal{background:#e6f7f2; color:#0e7c66}
.tile-amber{background:#fdf1e2; color:#c26a12} .tile-rose{background:#fdecec; color:#d33f3f}
.tile-slate{background:#eef1f6; color:#475569} .tile-green{background:#e9f7ee; color:#178a4c}
.tool-card .cat{font-size:.72rem; font-weight:800; color:var(--brand-ink); letter-spacing:.02em}
.tool-card h3{margin:0; font-size:1rem}
.tool-card p{margin:0; color:var(--muted); font-size:.82rem; line-height:1.55}
.tool-card.featured{background:linear-gradient(135deg,#10294f 0%,#1b64da 100%); border-color:transparent; color:#fff}
.tool-card.featured p{color:rgba(255,255,255,.78)}
.tool-card.featured .cat{color:#bcd4ff}
.tool-card.featured .icon-tile{background:rgba(255,255,255,.14); color:#fff}
.tool-card.featured .fav-btn{background:rgba(255,255,255,.14); border-color:transparent; color:#fff}
.fav-btn{border:1px solid var(--line); background:var(--bg); border-radius:50%; width:38px; height:38px; display:grid; place-items:center; cursor:pointer; color:var(--faint); transition:all .4s var(--spring); flex:0 0 auto}
.fav-btn .ic{width:17px; height:17px}
.fav-btn:hover{transform:scale(1.1); color:var(--amber); border-color:#f3d9b5}
.fav-btn[aria-pressed="true"]{background:#fff7ec; border-color:#f3d9b5; color:var(--amber)}
.fav-btn[aria-pressed="true"] .ic{fill:currentColor}
.ic{fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; width:20px; height:20px; flex:0 0 auto}
.searchbox .ic{width:18px; height:18px}
.btn .arr .ic{width:14px; height:14px}
.demo-link .ic{width:14px; height:14px}

/* ---------- reveal on scroll ---------- */
.reveal{opacity:0; transform:translateY(22px)}
.reveal.in{opacity:1; transform:none; transition:opacity .7s var(--spring), transform .7s var(--spring); transition-delay:calc(var(--index,0)*70ms)}

/* ---------- tool page ---------- */
.crumbs{margin:16px 0 0; font-size:.82rem; color:var(--muted)}
.crumbs a{color:var(--muted); text-decoration:none}
.crumbs a:hover{color:var(--brand-ink)}
.tool-shell{background:var(--surface); border:1px solid var(--line); border-radius:26px; box-shadow:var(--shadow-card); overflow:hidden; margin:14px 0 20px}
.tool-head{padding:26px 22px 0}
.tool-head .eyebrow{margin-bottom:12px}
.tool-title{display:flex; align-items:center; gap:14px; margin:.3em 0 .35em}
.tool-title .icon-tile{width:54px; height:54px; border-radius:16px}
.tool-title .icon-tile .ic{width:28px; height:28px}
.tool-title h1{margin:0; font-size:clamp(1.4rem,4.6vw,1.9rem); font-weight:800}
.tool-head .desc{color:var(--muted); margin:0; max-width:42rem}
.privacy-badge{display:inline-flex; align-items:center; gap:6px; background:#f0fdf4; border:1px solid #bbe6c8; color:#15803d; font-size:.78rem; font-weight:700; border-radius:999px; padding:5px 13px}
.tool-body{padding:18px 22px 24px; display:grid; gap:13px}
label.f-label{font-weight:800; font-size:.9rem; display:block; margin-bottom:-6px}
textarea.ta,input.ti,select.ts{width:100%; border:1px solid var(--line); border-radius:var(--r-sm); padding:13px 15px; font-size:1rem; font-family:inherit; background:#f8fafd; color:var(--ink); min-height:52px; transition:border-color .3s, box-shadow .3s}
textarea.ta{min-height:140px; resize:vertical; line-height:1.7}
textarea.ta:focus,input.ti:focus,select.ts:focus{outline:0; border-color:var(--brand); box-shadow:0 0 0 3px rgba(27,100,218,.13); background:#fff}
textarea.ta[readonly]{background:#fff}
.btn-row{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
.btn-sm{min-height:46px; padding:11px 18px; font-size:.88rem}
.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:8px}
.stat{background:var(--brand-ghost); border:1px solid var(--line-soft); border-radius:var(--r-sm); padding:11px 12px}
.stat b{display:block; font-size:1.3rem; font-weight:800}
.stat span{font-size:.75rem; color:var(--muted)}
.result{background:#0e1a2e; color:#dbe7ff; border-radius:var(--r-sm); padding:15px 16px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.87rem; line-height:1.7; white-space:pre-wrap; word-break:break-all; max-height:340px; overflow:auto}
.result.light{color:var(--ink); background:var(--brand-ghost); font-family:inherit}
.steps{display:grid; gap:8px; grid-template-columns:1fr}
@media(min-width:760px){.steps{grid-template-columns:repeat(3,1fr)}}
.step{border:1px solid var(--line-soft); background:#fafbfe; border-radius:var(--r-sm); padding:12px 14px; font-size:.86rem; color:var(--muted)}
.step b{display:flex; align-items:center; gap:8px; color:var(--ink); font-size:.9rem; margin-bottom:2px}
.step .n{font-family:var(--font-en); font-size:.72rem; font-weight:700; background:var(--ink); color:#fff; border-radius:50%; width:20px; height:20px; display:inline-grid; place-items:center}
/* ad slot — quiet */
.ad-slot{background:#e9edf3; border:1px dashed #c2cad6; border-radius:14px; min-height:92px; display:grid; place-items:center; color:#9aa4b2; font-size:.76rem; font-weight:600; letter-spacing:.04em; margin:14px 22px}
.ad-slot.page{margin:14px 0}
/* faq */
.faq{border-top:1px solid var(--line); margin-top:6px}
.faq h2{font-size:1.05rem}
.faq details{border-bottom:1px solid var(--line); padding:13px 2px}
.faq summary{font-weight:700; cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:10px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+"; font-family:var(--font-en); font-weight:400; font-size:1.2rem; color:var(--brand); transition:transform .4s var(--spring)}
.faq details[open] summary::after{transform:rotate(45deg)}
/* related mini cards */
.related{display:grid; grid-template-columns:repeat(2,1fr); gap:10px}
@media(min-width:760px){.related{grid-template-columns:repeat(4,1fr)}}
.related a{display:flex; align-items:center; gap:10px; border:1px solid var(--line); background:#fff; border-radius:14px; padding:11px 13px; font-size:.87rem; font-weight:700; text-decoration:none; color:var(--ink); transition:all .4s var(--spring)}
.related a:hover{transform:translateY(-2px); box-shadow:var(--shadow-pop); border-color:#c9d9f8}
.related .icon-tile{width:36px; height:36px; border-radius:11px}
.related .icon-tile .ic{width:19px; height:19px}

/* ---------- prose / footer ---------- */
.prose{color:var(--muted); font-size:.92rem}
.prose h2{color:var(--ink); font-size:1.05rem}
footer.site-foot{color:var(--faint); font-size:.8rem; padding:30px 0 12px; text-align:center}
footer.site-foot a{color:var(--muted); text-decoration:none}
footer.site-foot a:hover{color:var(--brand-ink)}

/* ---------- bottom nav ---------- */
.bottom-nav{position:fixed; left:0; right:0; bottom:0; z-index:50; background:rgba(255,255,255,.92); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-top:1px solid var(--line); display:flex; padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
.bottom-nav a{flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; text-decoration:none; color:var(--faint); font-size:.68rem; font-weight:700; padding:7px 2px; border-radius:12px; transition:all .35s var(--spring)}
.bottom-nav a .ic{width:21px; height:21px}
.bottom-nav a[aria-current="page"]{color:var(--brand-ink); background:var(--brand-soft)}

/* ---------- palette / toast / install ---------- */
.palette-back{position:fixed; inset:0; background:rgba(15,27,45,.45); z-index:90; display:none}
.palette{position:fixed; z-index:91; left:50%; top:11vh; transform:translateX(-50%); width:min(560px,calc(100% - 32px)); background:#fff; border-radius:18px; box-shadow:0 30px 80px rgba(15,27,45,.3); overflow:hidden; display:none}
.palette.open,.palette-back.open{display:block}
.palette input{width:100%; border:0; border-bottom:1px solid var(--line); padding:17px 18px; font-size:1.02rem; outline:0; font-family:inherit}
.palette ul{list-style:none; margin:0; padding:8px; max-height:52vh; overflow:auto}
.palette li a{display:flex; gap:12px; align-items:center; padding:11px 12px; border-radius:12px; text-decoration:none; color:var(--ink)}
.palette li a:hover,.palette li a.active{background:var(--brand-soft)}
.palette li small{color:var(--muted)}
#toast{position:fixed; left:50%; bottom:calc(84px + env(safe-area-inset-bottom)); transform:translateX(-50%) translateY(16px); background:#101c30; color:#fff; font-size:.87rem; font-weight:700; border-radius:999px; padding:12px 22px; z-index:95; opacity:0; pointer-events:none; transition:all .45s var(--spring); box-shadow:0 16px 40px -10px rgba(15,27,45,.5); display:flex; align-items:center; gap:8px; max-width:calc(100% - 40px)}
#toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
#toast .ic{width:16px; height:16px; color:#7ee2a8}
.install-banner{display:none; gap:10px; align-items:center; background:#101c30; color:#fff; border-radius:16px; padding:13px 16px; margin:14px 0; font-size:.88rem}
.install-banner.show{display:flex}
.install-banner button{margin-left:auto; background:#fff; border:0; border-radius:999px; padding:10px 18px; font-weight:800; cursor:pointer; font-family:inherit; transition:transform .4s var(--spring)}
.install-banner button:active{transform:scale(.95)}

/* ---------- guides ---------- */
.guide-list{display:grid; gap:10px}
@media(min-width:760px){.guide-list{grid-template-columns:1fr 1fr}}
.guide-card{display:flex; gap:13px; align-items:flex-start; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:17px 16px; text-decoration:none; color:inherit; box-shadow:0 1px 2px rgba(15,27,45,.04); transition:transform .5s var(--spring), box-shadow .5s var(--spring), border-color .3s}
.guide-card:hover{transform:translateY(-3px); box-shadow:var(--shadow-card); border-color:#c9d9f8}
.guide-card .icon-tile{width:42px; height:42px}
.guide-card .g-copy{min-width:0; flex:1}
.guide-card .g-copy b{display:block; font-size:.97rem}
.guide-card .g-copy small{display:block; color:var(--muted); font-size:.82rem; margin-top:2px}
.guide-card .g-copy em{display:block; font-style:normal; color:var(--faint); font-size:.72rem; margin-top:5px}
.guide-card .g-arr{flex:0 0 auto; width:30px; height:30px; border-radius:50%; background:var(--bg); display:grid; place-items:center; color:var(--muted); align-self:center}
.guide-card .g-arr .ic{width:15px; height:15px}
.guide-card:hover .g-arr{background:var(--brand); color:#fff}
.guide-body h2{font-size:1.08rem; margin:1.5em 0 .5em; padding-top:.4em}
.guide-body h2:first-child{margin-top:.4em}
.guide-body p{color:#3c4657; margin:.55em 0; max-width:42rem}
.guide-body ul{margin:.6em 0; padding-left:20px; color:#3c4657}
.guide-body li{margin:.3em 0}
.tbl-wrap{overflow-x:auto; margin:.8em 0}
.tbl-wrap table{border-collapse:collapse; width:100%; font-size:.87rem; min-width:320px}
.tbl-wrap th,.tbl-wrap td{border:1px solid var(--line); padding:9px 12px; text-align:left}
.tbl-wrap th{background:var(--brand-ghost); font-weight:800}
.read-box{display:flex; gap:13px; align-items:flex-start; background:var(--brand-ghost); border:1px solid #d3e3fd; border-radius:var(--r-md); padding:16px; margin-top:14px}
.read-box a{font-weight:800; text-decoration:none}
.read-box a:hover{text-decoration:underline}

@media print{
  .site-header,.bottom-nav,.ad-slot,.palette-back,.palette,#toast,.install-banner,footer.site-foot,.related,.faq,.steps,.btn-row{display:none !important}
  body{background:#fff; padding:0}
  body::after{display:none}
  .tool-shell{box-shadow:none; border:0; margin:0}
  .wrap{width:100%}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important; transition:none !important}
  html{scroll-behavior:auto}
  .reveal{opacity:1; transform:none}
}
