/* 51WORK — 라이트 그레이 (시안 B) */
:root {
  --bg: #F4F4F4; --ink: #1E1E1E; --ink2: #3A3A3A; --mute: #5E5E5E; --line: #C9C9C9; --line2: #D0D0D2;
  --card: #F4F4F4; --panel: #ECECEE; --band: #E8E8EA; --pad: clamp(16px, 5.5vw, 104px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Noto Sans KR', system-ui, -apple-system, 'Malgun Gothic', sans-serif; font-size: 17px; line-height: 1.6; }
a { color: var(--ink); }
a:hover { color: #000; }
h1, h2, h3, p { margin-top: 0; }
button { font-family: inherit; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid #DCDCDC; }
.top-in { max-width: 1712px; margin: 0 auto; padding: 0 var(--pad); height: 82px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 900; font-size: 34px; letter-spacing: -1.5px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--mute); margin-left: 8px; }
.menu-btn { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--ink); cursor: pointer; }
.menu { position: absolute; right: clamp(16px, 3vw, 58px); top: 72px; width: 220px; padding: 10px; background: #F7F7F7; border: 1px solid #DCDCDC; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu a { padding: 12px 14px; border-radius: 6px; text-decoration: none; }
.menu a:first-child { font-weight: 700; }
.menu a:hover { background: #E8E8EA; }

/* 메인 */
.hero { background: radial-gradient(ellipse 72% 95% at 50% 58%, #E6E6E8 0%, #CBCBCD 52%, #A4A4A6 100%); overflow: hidden; }
.hero-in { max-width: 1200px; margin: 0 auto; padding: 64px 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(34px, 5.2vw, 88px); line-height: 1.15; letter-spacing: -2px; word-break: keep-all; }
.hero p { margin: 0; font-size: clamp(16px, 1.4vw, 24px); color: #2A2A2A; word-break: keep-all; }
.hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 24px; padding-top: 18px; }
.hero-btns a { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 44px; background: #EFEFEF; color: var(--ink); border-radius: 999px; font-size: 20px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.hero-img { display: block; width: 100%; height: auto; margin-top: 8px; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%); mask-image: linear-gradient(to bottom, transparent 0%, #000 14%); }

.wrap { max-width: 1712px; margin: 0 auto; padding: 44px var(--pad) 96px; display: flex; flex-direction: column; gap: 32px; }
.wrap h2, .dl h2 { margin: 0 0 24px; font-weight: 700; font-size: 42px; letter-spacing: -1px; color: var(--ink2); }
.state { padding: 48px 0; text-align: center; color: var(--mute); }
.state[hidden], #mainBlock[hidden], #projBlock[hidden], .empty[hidden] { display: none; }
.state button { margin-left: 8px; min-height: 40px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; cursor: pointer; }

/* 아이콘 줄 (앱 아이콘 + 기기 그림) */
.ico { display: flex; align-items: center; gap: 14px; color: #2A2A2A; }
.ico img { display: block; }
.ico svg { flex: none; }

/* Main 카드 */
.featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 42px; }
.f-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 44px 40px 36px; background: var(--panel); border: 1.5px solid #8E8E90; border-radius: 22px; }
.f-badge { position: absolute; right: 24px; top: 20px; padding: 3px 12px; background: var(--ink); color: var(--bg); border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.f-card .ico img { width: 84px; height: 84px; border-radius: 18px; }
.f-card h3 { margin: 0; font-size: 38px; font-weight: 700; letter-spacing: -1px; line-height: 1.25; }
.f-card h3 .v { font-size: 22px; font-weight: 500; letter-spacing: 0; color: var(--mute); }
.f-addr { margin-top: -6px; font-size: 20px; font-weight: 500; color: var(--ink2); word-break: break-all; }
.f-why { margin: 0; font-size: 20px; line-height: 1.6; color: var(--ink2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 3px 12px; border: 1px solid #A8A8AA; border-radius: 999px; font-size: 14px; color: #4A4A4A; }
.f-act { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 10px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 32px; background: var(--ink); color: var(--bg); border: 1.5px solid var(--ink); border-radius: 999px; font-size: 18px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn:hover { color: var(--bg); background: #000; }
.btn.out { background: transparent; color: var(--ink); font-weight: 700; }
.btn.out:hover { background: #E2E2E4; color: var(--ink); }
.btn.off { background: var(--band); color: #6A6A6C; border: 1px dashed #8E8E90; cursor: default; }
.btn.sm { min-height: 46px; padding: 0 20px; font-size: 16px; }

/* 검색·분류 */
.search-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.search-row h2 { margin: 0; }
.search-box { flex: 0 1 380px; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.search-box label { font-size: 15px; color: var(--mute); }
.search-field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; background: #F4F4F4; border: 1px solid #B5B5B7; border-radius: 999px; }
.search-field input { flex: 1; min-width: 0; height: 100%; background: transparent; border: none; outline: none; color: var(--ink); font-family: inherit; font-size: 17px; }
.search-field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(0,0,0,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.chip { min-height: 46px; padding: 0 22px; background: #F4F4F4; color: var(--ink); border: 1px solid #B5B5B7; border-radius: 999px; font-size: 16px; font-weight: 500; cursor: pointer; }
.chip small { font-size: 13px; color: #6A6A6C; margin-left: 2px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.chip[aria-pressed="true"] small { color: var(--bg); opacity: .7; }

/* 프로젝트 카드 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 42px; }
.card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 230px; padding: 32px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-align: center; text-decoration: none; color: var(--ink); }
a.card:hover { border-color: #8E8E90; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.card .ico { margin-bottom: 18px; justify-content: center; }
.card .ico img { height: 110px; width: auto; max-width: 150px; }
.card .nm { font-size: 28px; font-weight: 500; letter-spacing: -.5px; line-height: 1.3; }
.card .nm .v { font-size: 18px; letter-spacing: 0; color: #6A6A6C; }
.card .sb { font-size: 18px; color: var(--mute); line-height: 1.5; }
.card .bd { margin-top: 8px; padding: 2px 12px; border: 1px dashed #6E6E70; border-radius: 999px; font-size: 14px; color: #4A4A4A; }
.card .go { margin-top: 6px; font-size: 16px; font-weight: 700; text-decoration: underline; }
.empty { padding: 56px 24px; border: 1px dashed #B5B5B7; border-radius: 18px; text-align: center; }
.empty p { margin: 4px 0; color: var(--mute); }
.empty .empty-1 { font-size: 22px; font-weight: 700; color: var(--ink); }

/* 다운로드 센터 */
.dl { background: var(--band); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.dl-in { max-width: 1712px; margin: 0 auto; padding: 72px var(--pad) 88px; display: flex; flex-direction: column; gap: 32px; }
.dl h2 { margin-bottom: 6px; }
.dl-sub { margin: 0; font-size: 18px; color: var(--mute); }
.dl-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.dl-table { flex: 999 1 680px; min-width: 0; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.dl-table table { width: 100%; border-collapse: collapse; font-size: 17px; }
.dl-table th { padding: 16px 12px; text-align: left; font-weight: 500; font-size: 15px; color: var(--mute); border-bottom: 1px solid var(--line2); }
.dl-table td { padding: 16px 12px; border-bottom: 1px solid #E2E2E4; color: #4A4A4A; vertical-align: middle; }
.dl-table tr:last-child td { border-bottom: none; }
.dl-table .c-name { padding-left: 24px; }
.dl-table td.c-name { color: var(--ink); font-weight: 700; }
.dl-table .c-act { padding-right: 24px; text-align: right; }
.acts { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.guide { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.guide h3 { margin: 0; font-size: 21px; font-weight: 700; }
.guide ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; color: #4A4A4A; }

/* 하단 */
.foot { background: var(--bg); }
.foot-in { max-width: 1712px; margin: 0 auto; padding: 40px var(--pad) 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot-l { display: flex; flex-direction: column; gap: 2px; }
.foot-logo { font-weight: 900; font-size: 24px; letter-spacing: -1px; }
.foot-logo small { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--mute); }
.foot-slogan { font-size: 15px; color: var(--mute); }
.foot-r { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 15px; color: var(--mute); }
.foot-r a { color: var(--ink2); }

/* 모바일 */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top-in { height: 64px; }
  .logo { font-size: 26px; }
  .logo small { font-size: 12px; margin-left: 6px; }
  .menu { top: 56px; }
  .hero-in { padding-top: 40px; gap: 16px; }
  .hero-btns a { min-height: 52px; padding: 0 28px; font-size: 17px; }
  .wrap { padding-top: 32px; padding-bottom: 64px; gap: 24px; }
  .wrap h2, .dl h2 { font-size: 32px; }
  .featured { gap: 24px; }
  .f-card { padding: 40px 22px 26px; }
  .f-card .ico img { width: 64px; height: 64px; border-radius: 14px; }
  .f-card h3 { font-size: 28px; }
  .f-card h3 .v { font-size: 17px; }
  .f-addr, .f-why { font-size: 17px; }
  .btn { min-height: 48px; padding: 0 22px; font-size: 16px; }
  .grid { gap: 16px; }
  .card { min-height: 0; padding: 24px 18px; }
  .card .ico img { height: 88px; }
  .card .nm { font-size: 22px; }
  .card .nm .v { font-size: 15px; }
  .card .sb { font-size: 16px; }
  .dl-in { padding-top: 48px; padding-bottom: 56px; }
  .dl-table { flex-basis: 100%; overflow: visible; border: none; background: transparent; }
  .dl-table table, .dl-table tbody, .dl-table tr, .dl-table td { display: block; width: 100%; }
  .dl-table thead { display: none; }
  .dl-table tr { margin-bottom: 14px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
  .dl-table td { padding: 3px 0; border: none; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
  .dl-table td::before { content: attr(data-l); color: var(--mute); }
  .dl-table td.blank { display: none; }
  .dl-table td.c-name { padding: 0 0 6px; font-size: 18px; display: block; }
  .dl-table td.c-name::before { content: none; }
  .dl-table td.c-act { padding: 10px 0 0; display: block; text-align: left; }
  .dl-table td.c-act::before { content: none; }
  .acts { justify-content: flex-start; }
}
