/* 고양이 키우기 — site.css 공통 디자인 위에 이 페이지에 필요한 것만 */
.cat-home[hidden], .play[hidden], .acts[hidden], .act-hint[hidden], .no-save[hidden] { display: none; }

/* 고양이 그림 자리 */
.cat-fig { display: block; width: 176px; height: 176px; margin-left: -10px; padding: 0; border: 0; background: none; }
.cat-fig svg { display: block; width: 100%; height: 100%; }
.cat-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* 돌보기 */
.cat-head { padding-top: 8px; }
.cat-days { color: var(--sub); font-size: 14px; }
.cat-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -1px; line-height: 1.25; margin-top: 2px; }
.cat-stage { font-size: 15px; color: var(--body); margin-top: 2px; }

.cat-scene { margin-top: 10px; }
.bubble {
  position: relative; display: inline-block; max-width: 100%;
  background: var(--soft); color: var(--text); border-radius: 14px;
  padding: 12px 16px; font-size: 16.5px; line-height: 1.5; letter-spacing: -.3px; min-height: 48px;
}
.bubble::after { /* 말풍선 꼬리 */
  content: ""; position: absolute; left: 40px; bottom: -8px;
  border: 8px solid transparent; border-top-color: var(--soft); border-bottom: 0;
}
.cat-scene .bubble { z-index: 1; }
.cat-scene .cat-fig { margin-top: 2px; }
/* 작은 단계일수록 그림 위쪽이 비어서 말풍선 쪽으로 당김 (크기 차이로 자란 게 보이게 틀은 그대로) */
.cat-scene .stage-0 { margin-top: -30px; }
.cat-scene .stage-1 { margin-top: -14px; }

.stats { margin-top: 12px; }
.stat { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.stat-k { width: 46px; flex: none; font-size: 14px; color: var(--sub); }
.stat-bar { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.stat-bar i { display: block; height: 4px; width: 0; background: var(--accent); transition: width .4s ease; }
.stat-v { width: 76px; flex: none; text-align: right; font-size: 14px; font-weight: 600; }

.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.act {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0;
  background: var(--soft); color: var(--text); border: 0; border-radius: 14px;
  padding: 12px 14px; min-height: 64px; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.act:active { opacity: .85; }
.act b { font-size: 16px; font-weight: 600; letter-spacing: -.4px; }
.act span { font-size: 12.5px; color: var(--sub); }
.act-hint { font-size: 13px; color: var(--sub); margin-top: 10px; }
.act-hint:empty { margin-top: 0; }

/* 놀아 주기 */
.play { margin-top: 14px; }
.play-top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; }
.play-top span:last-child { color: var(--sub); }
.play-field { position: relative; height: 260px; margin-top: 8px; background: var(--soft); border-radius: 14px; overflow: hidden; touch-action: manipulation; }
.toy {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; padding: 0; border: 0; background: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .55s ease-in-out;
}
.toy svg { display: block; width: 56px; height: 56px; }
.play-help { font-size: 13px; color: var(--sub); margin-top: 8px; }

/* 잔디 스레드 버튼 링크 (돌보기 버튼·놀아 주기 판 아래, 연회색 넓은 버튼). 로고는 글자색(밝은 화면 검정·다크 흰색)만 */
.th-link {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; min-height: 56px; padding: 12px 16px;
  background: var(--soft); color: var(--text); border-radius: 14px; text-decoration: none;
  font-size: 15.5px; font-weight: 600; letter-spacing: -.3px; -webkit-tap-highlight-color: transparent;
}
.th-link:active { opacity: .85; }
.th-logo { flex: none; width: 24px; height: 24px; color: #000; }
.th-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.th-t { white-space: nowrap; }
.th-id { color: var(--sub); font-weight: 400; font-size: 13px; white-space: nowrap; }
.th-go { margin-left: auto; color: var(--sub); flex: none; }
@media (prefers-color-scheme: dark) { .th-logo { color: #fff; } }

.brag .links { justify-content: flex-start; margin-top: 4px; }
.reset { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-size: 12.5px; color: var(--sub); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.no-save { color: var(--text); }
.cat-page .sec { margin-top: 24px; }
.cat-page .foot { margin-top: 28px; }

/* 표정 컷: 눈웃음·의기양양일 때 들썩 · 밥 오물오물 · 쓰다듬으면(누르는 동안) 눌림 */
.cat-pic { transform-box: view-box; transition: transform .14s ease-out; }
.mood-happy .cat-pic, .mood-smug .cat-pic { animation: cat-hop 1s ease-in-out infinite; }
.mood-eating .cat-pic { animation: cat-chomp .5s ease-in-out infinite alternate; }
.cat-tap:active .cat-pic { animation: none; transform: scale(1.06, .9); }
@keyframes cat-hop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-2.5px) scale(1.01, .99); } 60% { transform: translateY(0); } }
@keyframes cat-chomp { from { transform: translateY(0); } to { transform: translateY(1.2px); } }
@media (prefers-reduced-motion: reduce) {
  .cat-pic { animation: none !important; transition: none !important; }
  .toy, .stat-bar i { transition: none; }
}

/* 다크모드: 고양이 외곽선이 바탕에 묻히지 않게 밝은 둥근 바탕 (고기 아이콘과 같은 방식) */
@media (prefers-color-scheme: dark) {
  .cat-fig { background: #ece7df; border-radius: 28%; margin-left: 0; }
  .cat-scene .cat-fig { margin-top: 5px !important; }
  .play-field { background: #ece7df; }
}
