@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이 막힌 곳에서도 같은 글꼴 */
/* 왕박사 연구소 홈: 흰 바탕, 검은 글씨, 붓글씨 이름 (모찌 게임과 같은 톤) */
:root {
  --ink: #111;
  --gray: #777;
  --line: #ececec;
  --card: #fff;
  --bg: #fafaf8;
  --point: #d7354a;
  --wang: #98a03c; /* 왕박사 조끼 초록: 아주 조금만 */
  --brush: 'Gowun Batang', 'Nanum Myeongjo', serif; /* 라벨 글씨: 게임들과 같은 붓펜 명조 */
  --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: 960px; margin: 0 auto; padding: 0 16px calc(24px + var(--safe-b));
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* 머리 */
.head { display: flex; align-items: center; gap: 12px; padding: 36px 0 22px; }
.logo { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--wang); object-fit: contain; flex: none; }
.head h1 { font-weight: 900; font-size: 30px; line-height: 1.1; letter-spacing: -0.04em; } /* 게임 시작 화면 제목과 같은 굵은 고딕 */
.sub { margin-top: 6px; font-size: 14px; color: var(--gray); }
.sound { margin-left: auto; align-self: flex-start; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; flex: none; }
.sound .cross { display: none; }
.sound.off { color: #bbb; }
.sound.off .wave { display: none; }
.sound.off .cross { display: inline; }

/* 거르기 줄 */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.count { font-size: 13px; color: var(--gray); }
.chips { display: flex; gap: 6px; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #555; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }

.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #999; }
.search[hidden] { display: none; }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; color: var(--ink); background: none; min-width: 0; }

/* 카드 */
.grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 860px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07); }
a.card:active { transform: translateY(0); }
.card .pic { aspect-ratio: 4 / 3; background: #fff; display: block; width: 100%; object-fit: cover; border-bottom: 1px solid var(--line); }
.card .pic.none { display: grid; place-items: center; font-family: var(--brush); font-size: 26px; color: #d8d8d8; background: #fcfcfb; }
.card .txt { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 3px; }
.card .top { display: flex; align-items: center; gap: 5px; min-height: 18px; }
.card .no { font-size: 11px; font-weight: 700; color: #aaa; letter-spacing: 0.04em; margin-right: auto; }
.badge { font-size: 10px; font-weight: 900; padding: 2px 6px; border-radius: 999px; line-height: 1.3; }
.badge.new { background: var(--wang); color: #fff; }
.badge.use { border: 1px solid var(--line); color: #888; font-weight: 500; }
.card h2 { font-size: 15px; font-weight: 700; line-height: 1.35; word-break: keep-all; }
.card .line { font-size: 12px; color: var(--gray); line-height: 1.45; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.soon { opacity: 0.5; border-style: dashed; }

.empty { padding: 40px 0; text-align: center; color: var(--gray); font-size: 14px; }
.foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: #aaa; text-align: center; }
