@font-face { font-family: "Pretendard Variable"; font-weight: 45 920; font-style: normal; font-display: swap; src: url("assets/fonts/PretendardVariable.woff2") format("woff2-variations"), url("assets/fonts/PretendardVariable.woff2") format("woff2"); } /* 외부 CDN이 막힌 곳에서도 같은 글꼴 */
/* 왕박사의 쓸데없는 연구소 홈 — Clay 레퍼런스(_디자인라이브러리/design-md/clay): 크림 바탕 + 작품마다 다른 색 큰 카드 + 검정 버튼.
   글꼴은 Pretendard 유지, 색 순서 맨 앞은 왕박사 말차. 2026-11-11 */
:root {
  --ink: #191F28;
  --gray: #4E5968;
  --line: #F2F4F6;
  --bg: #ffffff;      /* 사랑연구소: 흰 바탕 (11-27 체리 팔레트) */
  --wang: #D9302A;    /* 로고 테두리 = 메인 체리 (11-27 사랑연구소, 옛 초록 #98a03c) */
  --matcha: #FFD9D4;  /* 연분홍 (옛 말차 자리) */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink); background: var(--bg);
  max-width: 1120px; margin: 0 auto; padding: 0 16px calc(24px + var(--safe-b));
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--matcha); color: var(--ink); }

/* 머리: 모바일은 [로고 · 인스타] 아래 두 줄 제목, 넓으면 한 줄 */
.head { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo . insta" "name name name"; align-items: center; gap: 12px; padding: 16px 0 18px; }
.logo { grid-area: logo; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid var(--wang); object-fit: contain; }
.name { grid-area: name; }
.head h1 { font-weight: 900; font-size: 34px; line-height: 1.1; letter-spacing: -0.045em; word-break: keep-all; }
.head h1 span { display: block; }
.sub { margin-top: 10px; font-size: 15px; color: var(--gray); word-break: keep-all; }
.insta { grid-area: insta; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease); }
.insta:active { transform: scale(0.97); }
@media (min-width: 640px) {
  .head { grid-template-areas: "logo name insta"; padding: 40px 0 30px; gap: 18px; }
  .logo { width: 68px; height: 68px; }
  .head h1 { font-size: 40px; }
  .head h1 span { display: inline-block; }
}

/* 검색 */
.search { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 16px; margin-bottom: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; color: #777; }
.search[hidden] { display: none; }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--ink); background: none; min-width: 0; height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.clear { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #555; flex: none; }
.clear[hidden] { display: none; }
.clear:hover { background: #FFF1EF; }

.count { font-size: 14px; font-weight: 700; color: var(--gray); margin-bottom: 12px; }

/* 카드: 폰은 [그림 | 글] 가로 카드 1열 → 넓으면 2열 → 3열은 그림 위 */
.grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

.card { --c: var(--matcha); --t: var(--ink); position: relative; background: var(--c); color: var(--t); border-radius: 24px; transition: transform 200ms var(--ease); }
.k0 { --c: #FFD9D4; }                      /* 연분홍 */
.k1 { --c: #D9302A; --t: #fff; }           /* 체리 */
.k2 { --c: #191F28; --t: #fff; }           /* 먹색 */
.k3 { --c: #FFF1EF; }                      /* 체리 안개 */
.k4 { --c: #F2F4F6; }                      /* 연회색 */
.k5 { --c: #A8231F; --t: #fff; }           /* 진한 체리 */
@media (hover: hover) { .card:hover { transform: translateY(-2px); } .card:hover .pic { transform: scale(1.03); } }
.card:active { transform: scale(0.985); }
.go { display: grid; grid-template-columns: 40% 1fr; gap: 14px; align-items: center; padding: 14px; height: 100%; color: inherit; text-decoration: none; border-radius: 24px; }
.go:focus-visible { outline-offset: 3px; border-radius: 24px; }
.frame { display: block; border-radius: 16px; overflow: hidden; background: #fff; aspect-ratio: 4 / 3; align-self: start; }
.pic { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
.pic.none { display: grid; place-items: center; font-size: 20px; font-weight: 700; color: #8B95A1; }
@media (min-width: 1040px) {
  .go { grid-template-columns: 1fr; align-items: stretch; padding: 16px; }
}
.txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-right: 30px; } /* 오른쪽은 공유 버튼 자리 */
@media (min-width: 1040px) { .txt { padding: 2px 4px 2px; } }
.top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.no { font-size: 12px; font-weight: 800; opacity: 0.75; letter-spacing: 0.02em; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; line-height: 1.4; background: #fff; color: var(--ink); }
.badge.new { background: var(--ink); color: #fff; }
.k1 .badge.new, .k2 .badge.new, .k5 .badge.new { background: #fff; color: var(--ink); }
.badge.draft { background: rgba(255, 255, 255, 0.7); } /* 테스트 사이트에서만 보임 */
.card h2 { font-size: 18px; font-weight: 800; line-height: 1.3; letter-spacing: -0.025em; word-break: keep-all; }
.line { font-size: 13.5px; line-height: 1.45; opacity: 0.85; word-break: keep-all; }
.cta { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.k1 .cta, .k2 .cta, .k5 .cta { background: #fff; color: var(--ink); }
@media (min-width: 1040px) { .card h2 { font-size: 20px; } .line { font-size: 14px; } .cta { margin-top: 12px; } }

/* 공유 버튼: 링크 밖 형제, 카드 오른쪽 위 */
.share { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--ink); transition: transform 160ms var(--ease); }
.share:active { transform: scale(0.94); }
.share:focus-visible { border-radius: 50%; }
@media (min-width: 1040px) { .share { top: 24px; right: 24px; } }

.empty { padding: 36px 0 12px; text-align: center; color: var(--gray); font-size: 15px; word-break: keep-all; }
.empty[hidden] { display: none; }
.empty .ghost { margin-top: 14px; }

.ghost, .solid { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 12px; font-size: 15px; font-weight: 800; text-decoration: none; transition: transform 160ms var(--ease); }
.ghost:active, .solid:active { transform: scale(0.97); }
.ghost { border: 1.5px solid var(--ink); background: #fff; color: var(--ink); }
.solid { background: var(--ink); color: #fff; border: 0; }

/* 인스타 안내: 검정 큰 카드 */
.next { margin-top: 28px; padding: 26px 20px; border-radius: 24px; background: var(--ink); color: #fff; text-align: center; }
.next p { font-size: 17px; font-weight: 800; margin-bottom: 16px; word-break: keep-all; }
.next .solid { background: #D9302A; color: #fff; }

.foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--gray); text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; z-index: 10; white-space: nowrap; }
.toast[hidden] { display: none; }

.copy { margin: auto; width: min(420px, calc(100% - 32px)); padding: 20px; border: 0; border-radius: 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); }
.copy::backdrop { background: rgba(0, 0, 0, 0.35); }
.copy h2 { font-size: 17px; margin-bottom: 12px; }
.copy input { width: 100%; height: 46px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 15px; margin-bottom: 14px; }
.copy .solid { width: 100%; }

@media (prefers-reduced-motion: reduce) { .card, .pic, .share, .insta, .ghost, .solid { transition: none; } .card:hover, .card:hover .pic { transform: none; } }
