*{box-sizing:border-box;margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
html{overflow-y:scroll;scroll-behavior:smooth}
body{background:#f5f5f5;color:#111827;line-height:1.55}

/* ===== Header ===== */
.site-header{background:#0f172a;color:#e5e7eb}
.site-header-inner{max-width:960px;margin:0 auto;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.logo{font-size:17px;font-weight:800;color:#e5e7eb;text-decoration:none;letter-spacing:.2px}

.header-actions{display:flex;align-items:center;gap:10px}
.icon-btn{
    width:34px;height:34px;border-radius:999px;
    border:1px solid #334155;background:#111827;color:#e5e7eb;
    display:inline-flex;align-items:center;justify-content:center;
    cursor:pointer;font-size:16px
}
.icon-btn:hover{background:#0b1220;border-color:#475569}

.main-nav{position:relative}
.nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid #4b5563;background:#111827;color:#e5e7eb;font-size:18px;cursor:pointer}
.nav-links{list-style:none;position:absolute;right:0;top:40px;min-width:160px;background:#020617;border-radius:12px;padding:6px 8px;box-shadow:0 10px 25px rgba(0,0,0,.4);display:none;z-index:20}
.nav-links.open{display:block}
.nav-links li+li{margin-top:4px}
.nav-links a{display:block;padding:7px 10px;border-radius:10px;color:#e5e7eb;font-size:13px;text-decoration:none}
.nav-links a:hover{background:#1e293b}
.nav-links a.active{background:#2563eb}

@media (min-width:700px){
    .site-header-inner{padding:12px 16px}
    .page-wrapper{padding:20px 16px 44px}
}

/* ===== Layout ===== */
.page-wrapper{max-width:960px;margin:0 auto;padding:16px 12px 40px}
.header-card{background:#fff;border-radius:16px;padding:20px 18px 16px;margin-top:12px;margin-bottom:14px;box-shadow:0 4px 16px rgba(15,23,42,.06)}
h1{font-size:22px;margin-bottom:6px}
.subtitle{font-size:13.5px;color:#6b7280}

/* ===== Shared cards (tool pages, contact, etc.) ===== */
.tool-card{background:#fff;border-radius:16px;padding:18px 16px 20px;margin-top:16px;box-shadow:0 4px 16px rgba(15,23,42,.06)}
h2{font-size:18px;margin-bottom:10px}
label{font-size:14px;display:block;margin-bottom:4px}

input[type="date"],input[type="number"],select{
    width:100%;padding:8px 10px;margin-bottom:12px;border-radius:10px;border:1px solid #d1d5db;font-size:14px;background:#fff
}
button{
    width:100%;padding:10px;border-radius:10px;border:none;font-size:15px;font-weight:700;cursor:pointer;background:#2563eb;color:#fff
}
button:disabled{opacity:.5;cursor:default}
.result{margin-top:10px;font-size:15px;font-weight:700}
.small{font-size:13px;color:#6b7280;margin-top:4px}
.row{display:flex;gap:8px}
.row>div{flex:1}
.checkbox-inline{display:flex;align-items:center;gap:4px;font-size:13px;margin-bottom:10px}

/* Tabs */
.tabs{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.tab-button{
    flex:1;min-width:120px;border-radius:999px;border:1px solid #d1d5db;background:#f9fafb;padding:6px 10px;font-size:13px;cursor:pointer;color:#374151;display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap
}
.tab-button.active{background:#2563eb;border-color:#1d4ed8;color:#fff}
.tab-panel{display:none}
.tab-panel.active{display:block}

/* Box */
.box{margin-top:10px;padding:10px 12px;border-radius:10px;border:1px solid #e5e7eb;background:#f9fafb;max-height:260px;overflow:auto;font-size:13px;white-space:pre-wrap}

/* ===== Home Hub ===== */
.home-hub{background:#fff;border-radius:16px;padding:18px 16px;margin-bottom:12px;box-shadow:0 4px 16px rgba(15,23,42,.06)}
.hub-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.hub-title{font-size:15.5px;margin:0}
.hub-sub{font-size:12px;color:#94a3b8}
.hub-more{font-size:13px;color:#2563eb;text-decoration:none}
.hub-more:hover{text-decoration:underline}
.mt-14{margin-top:14px}

/* Chips */
.chip-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:12px
}
.chip{
    display:flex;align-items:center;justify-content:center;
    padding:10px 10px;border-radius:999px;
    border:1px solid #e5e7eb;background:#fff;
    text-decoration:none;color:#111827;font-size:14px;font-weight:800;
    transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease
}
.chip:hover{
    border-color:#c7d2fe;
    box-shadow:0 6px 16px rgba(15,23,42,.06);
    transform:translateY(-1px)
}

/* Search */
.search-bar{display:flex;gap:8px;margin:6px 0 6px}
.search-bar input{
    flex:1;padding:10px 12px;border-radius:12px;border:1px solid #e5e7eb;
    font-size:14px;background:#fff;outline:none
}
.search-bar input:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(59,130,246,.12)}
.search-clear{
    width:auto;padding:10px 12px;border-radius:12px;border:1px solid #e5e7eb;background:#f9fafb;
    cursor:pointer;font-size:13px;color:#374151
}
.search-clear:hover{background:#f3f4f6}
.search-hint{font-size:12px;color:#6b7280;margin-bottom:8px}

/* Segmented tabs */
.segmented{
    display:flex;gap:6px;align-items:center;
    padding:6px;border-radius:14px;border:1px solid #e5e7eb;background:#f8fafc;
    overflow:auto; -webkit-overflow-scrolling: touch;
}
.seg-btn{
    width:auto;min-width:74px;
    padding:9px 12px;border-radius:12px;
    border:1px solid transparent;background:transparent;
    color:#334155;font-size:13.5px;font-weight:900;
    cursor:pointer;white-space:nowrap
}
.seg-btn:hover{background:#eef2ff}
.seg-btn.active{background:#2563eb;color:#fff}
.filter-hint{font-size:12px;color:#6b7280;margin-top:8px}

/* Section title */
.section-title{background:#fff;border-radius:16px;padding:16px 16px;margin-bottom:12px;box-shadow:0 4px 16px rgba(15,23,42,.04)}
.section-title h2{font-size:16px;margin-bottom:6px}
.section-sub{font-size:13px;color:#6b7280}

/* ===== Tool list (default = card) ===== */
.tool-list{display:grid;grid-template-columns:1fr;gap:12px}
.tool-item{
    background:#fff;border-radius:18px;padding:16px 16px 16px;
    box-shadow:0 4px 16px rgba(15,23,42,.04);
    border:1px solid rgba(148,163,184,.35);
    transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease
}
.tool-item.clickable{cursor:pointer}
.tool-item:hover{
    border-color:#c7d2fe;
    box-shadow:0 10px 24px rgba(15,23,42,.08);
    transform:translateY(-1px)
}
.tool-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.tool-item h3{font-size:17px;margin:0}
.pill{
    font-size:12px;font-weight:900;color:#334155;
    border:1px solid #e2e8f0;background:#f8fafc;
    padding:4px 8px;border-radius:999px
}
.tool-item p{font-size:13.5px;color:#475569;margin:8px 0 12px}
.tool-button{
    display:inline-flex;align-items:center;justify-content:center;
    padding:8px 14px;border-radius:999px;background:#2563eb;color:#fff;
    font-size:13.5px;font-weight:900;text-decoration:none
}
.tool-button:hover{background:#1d4ed8}

/* ===== COMPACT MODE (전체(all)일 때만 적용) ===== */
.tool-list.is-compact{
    gap:8px;
}
.tool-list.is-compact .tool-item{
    padding:12px 12px;
    border-radius:14px;
}
.tool-list.is-compact .tool-item p{
    display:none; /* 설명 숨김 */
}
.tool-list.is-compact .tool-item .tool-button{
    display:none; /* 버튼 숨김 */
}
.tool-list.is-compact .tool-head{
    margin-bottom:0; /* 위아래 공간 줄임 */
}
.tool-list.is-compact .tool-item h3{
    font-size:15.5px;
}
.tool-list.is-compact .pill{
    font-size:11px;
    padding:3px 8px;
}
@media (min-width:640px){
    .tool-list{grid-template-columns:repeat(2,minmax(0,1fr))}
    .chip-grid{grid-template-columns:repeat(4,minmax(0,1fr))}

    /* 컴팩트 모드는 더 촘촘히 (많아져도 깔끔하게) */
    .tool-list.is-compact{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:900px){
    .tool-list.is-compact{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* SEO footer */
.seo-footer{margin-top:14px;background:#fff;border-radius:16px;padding:16px 16px;box-shadow:0 4px 16px rgba(15,23,42,.04)}
.seo-footer h2{font-size:15px;margin-bottom:6px}
.seo-footer p{font-size:13px;color:#6b7280}

/* Footer */
.hidden{display:none}
ul.small{padding-left:18px;margin-top:4px}
ul.small li{margin-bottom:2px}
.footer-text{margin-top:18px;font-size:13px;color:#6b7280;text-align:center}
.footer-text a{color:#2563eb;text-decoration:none}
.footer-text a:hover{text-decoration:underline}
