/* 볼트와너트 본진 v8 (2026-10-29). 밝은 연두 판, 조립도로 셈·심·점 고르기, 검색. v7 파일은 그대로 둔다. */

@font-face { font-family: "Plex KR"; font-weight: 400; font-display: swap; src: url("/assets/fonts/plex-kr/v2/plex-kr-400-ko.woff2") format("woff2"); unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7AF; }
@font-face { font-family: "Plex KR"; font-weight: 400; font-display: swap; src: url("/assets/fonts/plex-kr/v2/plex-kr-400-la.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+00D7; }
@font-face { font-family: "Plex KR"; font-weight: 500; font-display: swap; src: url("/assets/fonts/plex-kr/v2/plex-kr-500-ko.woff2") format("woff2"); unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7AF; }
@font-face { font-family: "Plex KR"; font-weight: 500; font-display: swap; src: url("/assets/fonts/plex-kr/v2/plex-kr-500-la.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+00D7; }
@font-face { font-family: "Plex KR"; font-weight: 700; font-display: swap; src: url("/assets/fonts/plex-kr/v2/plex-kr-700-ko.woff2") format("woff2"); unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7AF; }
@font-face { font-family: "Plex KR"; font-weight: 700; font-display: swap; src: url("/assets/fonts/plex-kr/v2/plex-kr-700-la.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+00D7; }

:root {
  --ink: #1c2219;
  --hero: #dce5c4;
  --base: #e3ead3;
  --list: #ecf1de;
  --paper: #f4f7ea;
  --olive: #2e4430;
  --olive-ink: #e6edd2;
  --lime: #b9d08a;
  --muted: #4f5b47;
  --muted-2: #3f4b37;
  --rule: #b7c29f;
  --hot: #b4512f;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: "Plex KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--ink); color: var(--paper); font-size: 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.defs { position: absolute; width: 0; height: 0; }
.grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .05; z-index: 50; }
.heavy { font-weight: 700; -webkit-text-stroke: .8px currentColor; paint-order: stroke fill; }
h2 { -webkit-text-stroke: .5px currentColor; paint-order: stroke fill; }
.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 var(--gutter); }

/* 머리띠 */
.topbar, .top { background: var(--hero); }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: -.03em; -webkit-text-stroke: .8px currentColor; paint-order: stroke fill; }
.logo svg { width: 24px; height: 24px; }
.logo-hole { fill: var(--hero); }
.menu-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; background: none; border: 0; cursor: pointer; }
.menu-btn svg { width: 22px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 1.5; }
.menu-btn .i-close { display: none; width: 20px; height: 20px; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.menu { display: none; }
.menu.open { display: grid; grid-template-columns: 1fr 1fr; position: absolute; top: 58px; left: var(--gutter); right: var(--gutter); z-index: 40; border: 1.5px solid var(--ink); background: var(--ink); gap: 1.5px; }
.menu a { text-decoration: none; }
.menu.open a { display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; padding: 16px 16px 14px; }
.menu .mt { font-size: 19px; font-weight: 700; letter-spacing: -.02em; -webkit-text-stroke: .5px currentColor; paint-order: stroke fill; }
.menu .ms { display: block; font-size: 14px; line-height: 1.45; color: var(--muted-2); }
.menu .m-1 { background: #cfe0c4; }
.menu .m-2 { background: #ccddee; }
.menu .m-3 { background: #f2d5c6; }
.menu .m-4 { background: #efe3ad; }
.menu.open a:hover .mt, .menu.open a:focus-visible .mt { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* 첫 화면 */
.hero { padding-top: 28px; padding-bottom: 40px; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.3; letter-spacing: -.035em; }
.sub { margin: 14px 0 0; font-size: 15px; line-height: 1.65; color: var(--muted-2); }
.search { position: relative; display: flex; align-items: center; height: 52px; margin: 24px 0 0; background: var(--paper); border: 1.5px solid var(--ink); }
.search:focus-within { outline: 2px solid var(--hot); outline-offset: 2px; }
.search > svg { flex: 0 0 48px; width: 48px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 0; border: 0; background: transparent; outline: none; font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: #5d6953; opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.clear { flex: 0 0 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
.clear svg { width: 13px; height: 13px; fill: none; stroke: var(--ink); stroke-width: 1.5; }

.hero-art { margin-top: 34px; }
.parts { position: relative; padding-top: 30px; }
.assembly { display: block; width: 100%; height: auto; overflow: visible; }
.axis { stroke: var(--ink); stroke-width: .75; stroke-dasharray: 18 3 3 3; }
.ol { stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.ol:not(.face):not(.ink):not([fill]) { fill: none; }
.dl { stroke: var(--ink); stroke-width: .6; }
.dl:not(.ink) { fill: none; }
.face { fill: var(--paper); }
.riso * { fill: none; }
.part { transition: opacity .3s; }
.slide { transition: transform .38s cubic-bezier(.3, 1.4, .5, 1); }

.pick { position: absolute; top: 0; bottom: 0; padding: 0; background: none; border: 0; cursor: pointer; }
.pick-sem { left: 0; width: 60%; }
.pick-sim { left: 60%; width: 20%; }
.pick-jeom { left: 80%; width: 20%; }
.pl { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
.pl b { font-size: 36px; line-height: 1; letter-spacing: -.02em; transition: color .2s; }
.pl small { margin-top: 8px; font-size: 14px; font-weight: 500; }

.caption { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 14px; }
.caption p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.d { display: none; }
.show-all { display: none; flex: 0 0 auto; height: 44px; margin-top: -12px; padding: 0 2px; background: none; border: 0; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* 고른 부품 */
.top[data-part="all"] .d-all, .top[data-part="sem"] .d-sem, .top[data-part="sim"] .d-sim, .top[data-part="jeom"] .d-jeom { display: inline; }
.top:not([data-part="all"]) .show-all { display: block; }
.top:not([data-part="all"]) .part { opacity: .4; }
.top[data-part="sem"] .p-sem .part, .top[data-part="sim"] .p-sim .part, .top[data-part="jeom"] .p-jeom .part { opacity: 1; }
.top[data-part="sem"] .p-sem { transform: translateX(10px); }
.top[data-part="sim"] .p-sim { transform: translateX(-8px); }
.top[data-part="jeom"] .p-jeom { transform: translateX(-12px); }
.top[data-part="sem"] .p-sem .face { fill: #e3eed9; }
.top[data-part="sim"] .p-sim .face { fill: #dce8f3; }
.top[data-part="jeom"] .p-jeom .face { fill: #f7e3d8; }
.top[data-part="sem"] .p-sem .riso * { fill: #4f8a5c; }
.top[data-part="sim"] .p-sim .riso * { fill: #4c82bc; }
.top[data-part="jeom"] .p-jeom .riso * { fill: #d2704a; }
.top[data-part="sem"] .pick-sem b { color: #2d6a43; }
.top[data-part="sim"] .pick-sim b { color: #2c5f94; }
.top[data-part="jeom"] .pick-jeom b { color: var(--hot); }

/* 최근 만든 것 */
.c-sem { --c: #2d6a43; --tint: #cfe0c4; --line: #3e5a38; }
.c-sim { --c: #2c5f94; --tint: #ccddee; --line: #2f4a66; }
.c-jeom { --c: #b4512f; --tint: #f2d5c6; --line: #6e3a26; }
.recent { padding-top: 56px; }
.recent h2, .list h2, .rules h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; }
.strip { display: flex; gap: 12px; margin-top: 16px; padding: 0 var(--gutter) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.card { flex: 0 0 min(320px, 82vw); display: flex; flex-direction: column; height: 300px; background: var(--tint); text-decoration: none; scroll-snap-align: start; }
.art { display: flex; align-items: center; justify-content: center; height: 186px; border-bottom: 1px solid var(--line); }
.art svg { width: 288px; max-width: 90%; height: auto; }
.card .ink { fill: var(--c); }
.card .pin { stroke: var(--ink); stroke-width: 1; }
.card .legs { stroke: var(--ink); stroke-width: 1.6; }
.q { display: block; padding: 16px 18px 0; font-size: 19px; font-weight: 700; line-height: 1.4; letter-spacing: -.025em; }
.n { display: block; padding: 8px 18px 0; font-size: 14px; color: var(--line); }
.card:hover .q { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }

/* 전부 보기 */
.list { margin-top: 48px; padding: 36px 0 44px; background: var(--list); scroll-margin-top: 0; }
.list:focus { outline: none; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.count { font-size: 14px; color: var(--muted); }
.t-find { display: none; }
.rest.searching .t-all { display: none; }
.rest.searching .t-find { display: inline; }
.groups { margin-top: 22px; }
.group + .group { margin-top: 40px; }
.group h3 { display: flex; align-items: center; gap: 10px; margin: 0; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); font-size: 15px; font-weight: 700; }
.group h3 svg { height: 22px; width: auto; }
.g-sem h3 svg { width: 30px; height: 16px; fill: #2d6a43; }
.g-sim h3 svg { fill: #2c5f94; }
.g-jeom h3 svg { fill: var(--hot); }
.gc { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--muted); }
.group ul { margin: 0; padding: 0; list-style: none; }
.group li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.group li b { display: block; font-size: 17px; line-height: 1.4; letter-spacing: -.02em; }
.group li span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.group li a:hover b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.rest[data-part="sem"] .group:not(.g-sem), .rest[data-part="sim"] .group:not(.g-sim), .rest[data-part="jeom"] .group:not(.g-jeom) { display: none; }
.rest[data-part="sem"] .card:not([data-cat="sem"]), .rest[data-part="sim"] .card:not([data-cat="sim"]), .rest[data-part="jeom"] .card:not([data-cat="jeom"]) { display: none; }
.rest.searching .recent { display: none; }
.rest.searching .list { margin-top: 0; }
[hidden] { display: none !important; }
.empty { margin-top: 20px; padding: 20px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.empty p { margin: 0; font-size: 15px; line-height: 1.65; }
.empty a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: 15px; font-weight: 700; text-underline-offset: 4px; }
.ad-slot[data-ad-state="off"] { display: none; }

/* 만드는 기준 */
.rules { margin-top: 80px; padding: 40px 0 44px; background: var(--olive); color: var(--olive-ink); }
.rules ol { margin: 22px 0 0; padding: 0; list-style: none; }
.rules li { display: flex; gap: 16px; align-items: flex-start; font-size: 15px; line-height: 1.65; }
.rules li + li { margin-top: 20px; }
.rules .no { flex: 0 0 26px; font-size: 26px; line-height: 1; color: var(--lime); }
.rules li > span:last-child { padding-top: 2px; }

/* 표제란 바닥글 */
.foot { padding-top: 36px; padding-bottom: 44px; }
.tb { border: 1px solid var(--ink); }
.tb-name { display: flex; align-items: center; gap: 12px; padding: 16px; }
.tb-name svg { flex: 0 0 28px; width: 28px; height: 28px; }
.tb-name p { margin: 0; font-size: 14px; color: var(--muted); }
.tb-name p.heavy { font-size: 19px; line-height: 1.2; letter-spacing: -.03em; color: var(--ink); }
.tb-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.tb-links a { display: flex; align-items: center; justify-content: center; min-height: 48px; font-size: 14px; font-weight: 500; text-decoration: none; }
.tb-links a + a { border-left: 1px solid var(--ink); }
.tb-links .mail { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ink); }
.tb-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 16px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.legal a { color: var(--muted); text-underline-offset: 3px; }
.copy { margin: 6px 0 0; font-size: 14px; line-height: 1.7; color: var(--muted); }

@media (min-width: 600px) {
  :root { --gutter: 40px; }
  .hero-copy, .hero-art { max-width: 560px; }
}

@media (min-width: 960px) {
  :root { --gutter: 64px; }
  .bar { height: 76px; }
  .logo { font-size: 21px; gap: 10px; }
  .logo svg { width: 28px; height: 28px; }
  .menu-btn { display: none; }
  .menu, .menu.open { display: flex; flex-direction: row; position: static; gap: 8px; padding: 0; background: none; border: 0; }
  .menu, .menu.open { gap: 32px; }
  .menu a, .menu.open a { display: flex; align-items: center; min-height: 0; height: 44px; padding: 0; background: none !important; }
  .menu .mt { font-size: 15px; font-weight: 500; -webkit-text-stroke: 0; }
  .menu .ms { display: none; }
  .menu a:hover .mt { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }

  .hero { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 80px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
  .hero h1 { font-size: 50px; line-height: 1.25; letter-spacing: -.04em; }
  .sub { margin-top: 18px; font-size: 18px; }
  .search { max-width: 480px; height: 58px; margin-top: 32px; }
  .search input { font-size: 17px; }
  .hero-art { margin-top: 0; max-width: none; }
  .parts { padding-top: 24px; }
  .pl b { font-size: 46px; }
  .pl small { margin-top: 10px; font-size: 15px; }
  .caption { margin-top: 18px; }
  .caption p { font-size: 15px; }

  .recent { width: 100%; max-width: 1168px; margin: 0 auto; padding: 72px var(--gutter) 0; }
  .recent h2 { padding: 0; font-size: 26px; }
  .strip { gap: 16px; margin-top: 20px; padding: 0 0 4px; scroll-padding-left: 0; }
  .card { flex-basis: calc((100% - 32px) / 3); height: 320px; }
  .art { height: 200px; }
  .art svg { width: 312px; }
  .q { font-size: 20px; }

  .list { margin-top: 72px; padding: 64px 0 72px; }
  .list h2, .rules h2 { font-size: 26px; }
  .list-head { justify-content: flex-start; }
  .count { font-size: 15px; }
  .groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; align-items: start; margin-top: 28px; }
  .group + .group { margin-top: 0; }
  .rest[data-part]:not([data-part="all"]) .groups, .rest.searching .groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .rules { margin-top: 96px; padding: 64px 0 72px; }
  .rules ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 28px; }
  .rules li { flex-direction: column; gap: 14px; }
  .rules li + li { margin-top: 0; }
  .rules .no { font-size: 34px; }

  .foot { padding-top: 56px; padding-bottom: 64px; }
  .tb { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .tb-name { padding: 18px 20px; }
  .tb-name p.heavy { font-size: 20px; }
  .tb-links { grid-template-columns: repeat(3, 120px) 240px; border-top: 0; }
  .tb-links a { border-left: 1px solid var(--ink); }
  .tb-links .mail { grid-column: auto; border-top: 0; border-left: 1px solid var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .part, .pl b { transition: none; }
}
