@font-face { font-family: "Paperlogy"; src: url("fonts/Paperlogy-5Medium.woff2") format("woff2"); font-weight: 100 599; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("fonts/Paperlogy-7Bold.woff2") format("woff2"); font-weight: 600 749; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("fonts/Paperlogy-8ExtraBold.woff2") format("woff2"); font-weight: 750 900; font-display: swap; }
:root {
  --bg: #ffffff;
  --text: #101010;
  --sub: #5e636b;
  --line: #e4e6eb;
  --paper: #f3f5fa;
  --grid: #e4e8f1;
  --line2: #d6d9df;
  --chip: #f1f2f5;
  --accent: #2545c8;
  --on-accent: #ffffff;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Paperlogy", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-block: 0; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
main { min-height: 70vh; outline: none; }

/* 상단 */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 11; background: var(--bg); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 8px 0; }
.brand-face { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); }
.wordmark { font-size: 19px; font-weight: 800; letter-spacing: -0.05em; color: var(--text); }
.top-nav { display: flex; gap: 4px; }
.top-nav a { text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 14px; border-radius: 999px; }
.top-nav a { position: relative; transition: color .15s ease; }
.top-nav a:hover, .top-nav a:focus-visible { color: var(--accent); }
.top-nav a[aria-current="page"] { color: var(--accent); }
.top-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--accent); border-radius: 2px; }
/* Contact: 평소엔 영어, 올리거나 누르면 한글 (두 글자를 한 칸에 겹쳐 폭이 흔들리지 않게) */
.swap { display: inline-grid; }
.swap span { grid-area: 1 / 1; text-align: center; transition: opacity .15s ease; }
.swap .ko { opacity: 0; }
.swap:hover .en, .swap:focus-visible .en, .swap:active .en { opacity: 0; }
.swap:hover .ko, .swap:focus-visible .ko, .swap:active .ko { opacity: 1; }
.lead-en { color: var(--sub); font-size: 14px; margin: 4px 0 0; }


/* 공통 글자 */
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.25; margin: 0; }
.h1 { font-size: clamp(28px, 7vw, 46px); font-weight: 800; }
.lead { color: var(--sub); font-size: 16px; margin: 10px 0 0; }
.sec-title { font-size: 20px; font-weight: 800; }
.meta { color: var(--sub); font-size: 13px; font-weight: 600; }

/* 검색 */
.search { position: relative; margin-top: 22px; }
.search input {
  width: 100%; height: 54px; padding: 0 52px 0 18px;
  border: 1.5px solid var(--text); border-radius: 14px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--text);
}
.search input::placeholder { color: #8a8f98; font-weight: 500; }
.search .clear {
  position: absolute; right: 8px; top: 7px; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; font-size: 20px; color: var(--sub);
}

/* 입구 */
.home-hero { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 28px 0 8px; }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.who img { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line2); object-fit: cover; }
.who b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.who span { font-size: 13px; color: var(--sub); font-weight: 600; }
.hero-art { display: none; }

/* 결과물 띠: 릴스처럼 세로 타일을 옆으로 넘김 */
.strip-sec { margin: 56px 0 0; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * max(20px, env(safe-area-inset-left, 0px))); padding: 2px max(20px, env(safe-area-inset-left, 0px)) 8px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip .shot-card { scroll-snap-align: start; }

.shot-card { display: flex; flex-direction: column; min-width: 0; }
.shot-media { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--paper); }
.shot-media img, .shot-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-card > b { margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; }
.shot-card .from { margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--sub); text-decoration: none; padding: 7px 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-foot { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 6px; }
.shot-foot .btn { height: 40px; padding: 0 12px; font-size: 13px; }
.shot-card .ptext { margin-top: 8px; padding: 10px 12px; background: var(--paper); border-radius: 10px; font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; max-height: 260px; overflow: auto; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 12px; margin-bottom: 72px; }
.pick { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 10px;
  background: #fff; border: 1px solid var(--line2); border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.pickbar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: -48px 0 48px; padding: 10px 10px 10px 18px; background: var(--text); color: #fff; border-radius: 16px; font-weight: 800; }

/* 바이브코딩 종류 타일 */
.vibe-sec { margin: 52px 0 0; }
.types { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.type-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 4px 12px; background: var(--paper);
  border-radius: 14px; text-decoration: none; text-align: center; transition: background .15s ease; }
.type-tile:hover { background: #e9edf5; }
.type-tile img { width: 44px; height: 44px; object-fit: contain; margin-bottom: 4px; }
.type-tile b { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.type-tile span { font-size: 12px; color: var(--sub); font-weight: 700; }
.type { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--accent); }
.type img { width: 20px; height: 20px; object-fit: contain; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.card .card-meta .meta { margin-top: 0; }
.post-head .card-meta { margin-top: 0; }

.latest { margin: 56px 0 12px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.row-head a { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 8px 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 14px 0; text-decoration: none; }
.row .thumb { aspect-ratio: 1; border-radius: 12px; }
.row b { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; }
.row .type { display: inline-flex; margin-bottom: 2px; }
.row div > span:not(.type) { display: block; margin-top: 3px; font-size: 14px; color: var(--sub); line-height: 1.45; }

.shelves { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 40px 0 72px; }
.shelf { text-decoration: none; border-radius: 14px; background: var(--paper); padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.shelf b { font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
.shelf span { font-size: 13px; color: var(--sub); font-weight: 600; }

/* 썸네일: 모눈 노트 위 손그림 */
.thumb {
  display: grid; place-items: center; overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: -1px -1px;
}
.thumb img { width: 62%; height: 62%; object-fit: contain; }
.thumb video, .thumb .shot { width: 100%; height: 100%; object-fit: cover; }

/* 창고 목록 */
.page-head { padding: 28px 0 4px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 18px -20px 0; padding: 2px 20px 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--chip); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tab small { font-size: 12px; font-weight: 700; color: var(--sub); margin-left: 4px; }
.tab[aria-pressed="true"] { background: var(--text); color: #fff; }
.tab[aria-pressed="true"] small { color: #c9ccd3; }
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px -20px 0; padding: 2px 20px 4px; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.subtab img { width: 24px; height: 24px; object-fit: contain; }
.subtab[aria-pressed="true"] { border-color: var(--text); background: var(--paper); }
.count { margin: 18px 0 12px; }
.gen-gal { margin-bottom: 8px; }
.gen-gal .sec-title { margin: 8px 0 14px; }
.gen-gal .shots { margin-bottom: 40px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 12px; margin-bottom: 64px; }
.card { text-decoration: none; display: flex; flex-direction: column; }
/* 글자 썸네일: 모든 자료를 같은 틀로(제목이 곧 썸네일) */
.tthumb { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 18px 18px; background-position: -1px -1px; transition: transform .2s ease; }
.card:hover .tthumb { transform: translateY(-2px); }
.tthumb b { position: relative; z-index: 1; font-size: clamp(17px, 4.8vw, 25px); font-weight: 800; line-height: 1.25; letter-spacing: -0.035em; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tthumb .type { align-self: flex-start; background: #fff; border-radius: 999px; padding: 4px 10px 4px 6px; }
.tt-icon { position: absolute; right: 10px; bottom: 8px; width: 34%; max-width: 110px; height: auto; opacity: .9; }
.card .card-month { margin-top: 4px; }
.group { margin-bottom: 44px; }
.sec-title small { font-size: 14px; color: var(--sub); font-weight: 700; margin-left: 4px; }
.more-link { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--accent); cursor: pointer; padding: 8px 0; }
.card .thumb { aspect-ratio: 4 / 3; border-radius: 14px; transition: transform .2s ease; }
.card:hover .thumb { transform: translateY(-2px); }
.card .meta { margin-top: 10px; }
.card b { display: block; margin-top: 2px; font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; }
.card p { margin: 10px 0 0; font-size: 14px; line-height: 1.45; color: var(--sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kw { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; align-self: flex-start;
  font-size: 12px; font-weight: 700; color: var(--accent); background: #eaeefb; border-radius: 999px; padding: 4px 10px; }
.empty { text-align: center; padding: 32px 0 72px; grid-column: 1 / -1; }
.empty img { width: 180px; margin: 0 auto 12px; }
.empty b { display: block; font-size: 18px; font-weight: 800; }
.empty span { color: var(--sub); font-size: 14px; }

/* 상세 */
.post { max-width: 720px; margin: 0 auto; padding: 22px 0 40px; }
.back { display: inline-block; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--sub); padding: 8px 0; }
.post-head { display: grid; grid-template-columns: 1fr 108px; gap: 16px; align-items: end; margin: 12px 0 18px; }
.post-head .thumb { aspect-ratio: 1; border-radius: 14px; }
.post-head h1 { font-size: clamp(26px, 6vw, 36px); font-weight: 800; margin-top: 6px; }
.post-head p { margin: 10px 0 0; color: var(--sub); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line2); background: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none; cursor: pointer;
}
.btn.solid { background: var(--text); border-color: var(--text); color: #fff; }
.btn:hover { background: var(--paper); }
.btn.solid:hover { background: #2b2d33; }

.body { font-size: 16px; line-height: 1.75; padding-top: 8px; }
.body h2 { font-size: 22px; font-weight: 800; margin: 40px 0 12px; }
.body h3 { font-size: 18px; font-weight: 800; margin: 28px 0 8px; }
.body p { margin: 12px 0; }
.body ul, .body ol { padding-left: 22px; }
.body li { margin: 4px 0; }
.body a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.body img, .body video { border-radius: 12px; margin: 14px 0; max-width: 100%; }
.body blockquote { margin: 16px 0; padding: 14px 16px; background: var(--paper); border-radius: 12px; }
.body blockquote p { margin: 6px 0; }
.body code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .9em; background: var(--paper); padding: 1px 6px; border-radius: 6px; }
.body code.tap { cursor: pointer; color: var(--accent); background: #eaeefb; }
.body code.tap:hover { background: var(--accent); color: #fff; }
.body td code { white-space: nowrap; }
.table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.body table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; }
.body th, .body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); min-width: 96px; }
.body th { background: var(--paper); font-weight: 800; white-space: nowrap; }
.body tr:last-child td { border-bottom: 0; }
.body details { border: 1px solid var(--line2); border-radius: 12px; padding: 0 16px; margin: 14px 0; }
.body summary { cursor: pointer; font-weight: 800; padding: 14px 0; }
.body details[open] { padding-bottom: 8px; }

.code { margin: 16px 0; border-radius: 14px; overflow: hidden; background: #14161b; color: #eef0f4; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 14px; background: #1f2229; }
.code-bar span { font-size: 12px; font-weight: 700; color: #a9afbb; }
.code-bar button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: #fff; color: var(--text); font-weight: 800; font-size: 13px; cursor: pointer; }
.code-bar button.done { background: var(--accent); color: #fff; }
.code pre { margin: 0; padding: 14px 16px 16px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.6; }
.code pre code { background: none; padding: 0; font-family: "Paperlogy", ui-monospace, monospace; font-size: 14px; color: inherit; }
.code.cmd pre code { font-family: ui-monospace, "SF Mono", Consolas, monospace; white-space: pre; }
.code.cmd pre { white-space: pre; }

.more { max-width: 720px; margin: 8px auto 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.more .grid { margin: 14px 0 0; }

/* 문의 */
.contact { display: grid; gap: 12px; margin: 20px 0 72px; max-width: 640px; }
.contact-card { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line2);
  border-radius: var(--radius); text-decoration: none; }
.contact-card img { width: 56px; height: 56px; object-fit: contain; }
.contact-card b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.contact-card span { display: block; font-size: 14px; color: var(--sub); }
.contact-card .addr { color: var(--text); font-weight: 700; user-select: all; overflow-wrap: anywhere; }
.contact-card .go { font-weight: 800; color: var(--accent); font-size: 14px; }
.contact-act { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
a.contact-card:hover { background: var(--paper); }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  background: var(--text); color: #fff; font-weight: 700; font-size: 14px; padding: 12px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 꼬리 */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-in { display: flex; gap: 16px; align-items: center; }
.foot-art { width: 64px; height: auto; }
.foot-name { margin: 0; font-weight: 800; }
.foot-line { margin: 2px 0 8px; color: var(--sub); font-size: 14px; }
.foot-links { margin: 0; display: flex; gap: 14px; }
.foot-links a { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; padding: 6px 0; }

.loading { padding: 80px 0; text-align: center; color: var(--sub); }

@media (max-width: 759px) {
  .tt-icon { display: none; }
  .tthumb { aspect-ratio: auto; min-height: 128px; }
  .table { border: 0; overflow: visible; }
  .body table, .body tbody, .body tr, .body td { display: block; width: 100%; }
  .body thead { display: none; }
  .body tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; margin: 0 0 10px; }
  .body td { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 8px 0; min-width: 0; border-bottom: 1px dashed var(--line); }
  .body tr td:last-child { border-bottom: 0; }
  .body td::before { content: attr(data-label); font-size: 12px; font-weight: 800; color: var(--sub); padding-top: 2px; }
  .body td[data-label=""]::before { content: none; }
  .body td[data-label=""] { grid-template-columns: 1fr; }
  .body td code { white-space: normal; word-break: break-all; }
}
@media (min-width: 760px) {
  .home-hero { grid-template-columns: 1fr 340px; align-items: center; padding-top: 48px; }
  .hero-art { display: block; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
  .rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .rows li + li { border-top: 0; }
  .rows li { border-bottom: 1px solid var(--line); }
  .strip { grid-auto-columns: 22%; }
  .shots { grid-template-columns: repeat(4, 1fr); gap: 32px 16px; }
  .post-head { grid-template-columns: 1fr 160px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
