:root {
  --ink: #0f1b33;
  --body: #4a5673;
  --mute: #8a94ab;
  --line: #e3e8f2;
  --brand: #2b6bf3;
  --brand-deep: #1747d6;
  --bg: #ffffff;
  --card: #ffffff;
  --col-blue: #edf2ff;
  --col-pink: #fff0f1;
  --col-green: #f1fae9;
  --col-gray: #f1f3f7;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Wanted Sans Variable', 'Wanted Sans', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── 전체 틀: 왼쪽 파란 세로 메뉴 + 본문 ── */
.shell { display: flex; gap: 24px; min-height: 100vh; padding: 20px; max-width: 1480px; margin: 0 auto; }
.rail {
  position: sticky; top: 20px; align-self: flex-start;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 52px; height: calc(100vh - 40px); min-height: 420px;
  padding: 16px 0; border-radius: 16px; background: var(--brand); color: #fff; flex-shrink: 0;
}
.rail .mark { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; font-weight: 800; font-size: 15px; letter-spacing: -0.04em; }
.rail a { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: rgba(255,255,255,0.85); transition: background 0.15s; }
.rail a:hover { background: rgba(255,255,255,0.18); color: #fff; }
.rail a.on { background: #fff; color: var(--brand); }
.rail a svg { width: 18px; height: 18px; }
.rail a span {
  position: absolute; left: 46px; top: 50%; transform: translateY(-50%);
  padding: 5px 9px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 5;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }
.rail .spacer { flex: 1; }

.main { flex: 1; min-width: 0; padding: 8px 4px 40px; }

/* ── 머리 ── */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.top h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.tabs { display: flex; gap: 4px; margin-left: auto; margin-right: auto; }
.tabs button { padding: 8px 12px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--mute); border-bottom: 2px solid transparent; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected='true'] { color: var(--brand); border-bottom-color: var(--brand); }
.total { font-size: 13px; color: var(--mute); font-weight: 600; }
.total b { color: var(--ink); font-weight: 800; }

.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; background: #fff; font-size: 13px; font-weight: 700; color: var(--body); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed='true'] { background: var(--col-blue); color: var(--brand-deep); }
.seg svg { width: 15px; height: 15px; }
.note { font-size: 13px; color: var(--mute); display: inline-flex; align-items: center; gap: 6px; }
.note svg { width: 14px; height: 14px; }
.search { position: relative; margin-left: auto; width: min(320px, 100%); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--mute); }
.search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; }
.search input::placeholder { color: var(--mute); }

/* ── 보드 ── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.board.one { grid-template-columns: minmax(0, 1fr); }
.board.one .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.col { border-radius: 18px; padding: 16px 14px 14px; }
.col[data-tone='blue'] { background: var(--col-blue); }
.col[data-tone='pink'] { background: var(--col-pink); }
.col[data-tone='green'] { background: var(--col-green); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 14px; }
.col-head h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.badge { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; font-size: 12px; font-weight: 800; background: #fff; }
.col[data-tone='blue'] .badge { color: #2b6bf3; }
.col[data-tone='pink'] .badge { color: #e0456b; }
.col[data-tone='green'] .badge { color: #4c9a2a; }
.col-head a { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--body); }
.col-head a:hover { background: rgba(255,255,255,0.8); }
.col-head a svg { width: 16px; height: 16px; }
.cards { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }

.card { background: var(--card); border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgba(15,27,51,0.05); transition: box-shadow 0.15s, transform 0.15s; }
.card:hover { box-shadow: 0 8px 22px rgba(15,27,51,0.09); transform: translateY(-1px); }
.card h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; }
.card h3 a:hover { color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--col-gray); color: var(--body); font-variant-numeric: tabular-nums; }
.tag.blue { background: #e4ecff; color: #2458d8; }
.tag.pink { background: #ffe3e8; color: #cf3559; }
.tag.green { background: #e2f4d3; color: #3d8420; }
.card-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.card-foot .meta { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.card-foot .meta svg { width: 14px; height: 14px; }
.card-foot a.guide { display: inline-flex; align-items: center; gap: 5px; color: var(--body); }
.card-foot a.guide:hover { color: var(--brand); }
.card-foot a.guide svg { width: 14px; height: 14px; }
.dl { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.dl:hover { background: var(--brand-deep); }
.dl svg { width: 14px; height: 14px; }
.more { display: grid; place-items: center; height: 38px; margin-top: 10px; border-radius: 12px; background: rgba(255,255,255,0.75); font-size: 13px; font-weight: 700; color: var(--body); }
.more:hover { background: #fff; color: var(--brand); }
.empty { padding: 26px 8px; text-align: center; font-size: 14px; color: var(--mute); }

/* ── 목록 보기 ── */
.list { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: grid; grid-template-columns: 7.5em 1fr 5em 5em auto auto; align-items: center; gap: 14px; padding: 13px 18px; font-size: 14px; }
.row + .row { border-top: 1px solid var(--line); }
.row .t { font-weight: 700; }
.row .n { color: var(--mute); font-variant-numeric: tabular-nums; font-size: 13px; }
.row .guide { font-size: 13px; font-weight: 600; color: var(--body); }
.row .guide:hover { color: var(--brand); }

.foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mute); line-height: 1.7; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }

/* ── 다운로드 페이지 ── */
.get { max-width: 760px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--body); }
.crumb:hover { color: var(--brand); }
.crumb svg { width: 14px; height: 14px; }
.get h1 { margin: 16px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.25; }
.panel { margin-top: 22px; padding: 22px; border-radius: 18px; background: var(--col-blue); }
.panel dl { display: grid; grid-template-columns: 6em 1fr; gap: 10px 12px; margin: 0; font-size: 14.5px; }
.panel dt { color: var(--body); }
.panel dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.go .big { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 800; }
.go .big:hover { background: var(--brand-deep); }
.go .big[aria-disabled='true'] { background: #b9c6e6; cursor: default; pointer-events: none; }
.go .big svg { width: 17px; height: 17px; }
.go p { margin: 0; font-size: 14px; color: var(--body); }
.go p b { font-variant-numeric: tabular-nums; color: var(--brand-deep); }
.adbox { margin-top: 22px; }
.adbox .cap { font-size: 11px; color: var(--mute); margin-bottom: 6px; }
.adbox ins { display: block; min-height: 250px; }
.steps { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 12px; font-size: 14.5px; line-height: 1.6; color: var(--body); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--col-gray); color: var(--ink); font-size: 12.5px; font-weight: 800; }
.steps a { color: var(--brand-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ── 좁은 화면 ── */
@media (max-width: 1000px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .board .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .tabs { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .total { margin-left: auto; }
}
@media (max-width: 720px) {
  .shell { flex-direction: column; gap: 14px; padding: 12px 16px; }
  .rail { position: static; flex-direction: row; width: 100%; height: 52px; min-height: 0; padding: 0 12px; }
  .rail .mark { margin: 0 8px 0 0; }
  .rail a span { display: none; }
  .main { padding: 4px 0 32px; }
  .top h1, .get h1 { font-size: 25px; }
  .search { margin-left: 0; width: 100%; }
  .note { display: none; }
  .row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .row .c, .row .n, .row .guide { display: none; }
  .go .big { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
