:root {
  --bg: #FFF7EC;
  --card: #FFFFFF;
  --ink: #3B3128;
  --ink-soft: #8A7B6C;
  --accent: #FF8A5C;
  --accent-deep: #F26B3A;
  --mint: #59C9A5;
  --line: #F0E4D3;
  --bubble-pet: #FFFFFF;
  --bubble-me: #FF8A5C;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}
.hidden { display: none !important; }
.screen { height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }

/* ---------- 로그인 ---------- */
#login-screen { overflow-y: auto; padding: 32px 24px; justify-content: center; }
.login-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.login-desc b { color: var(--accent-deep); }
.otp-box { display: flex; flex-direction: column; gap: 12px; }
.login-msg { font-size: 13px; color: var(--accent-deep); min-height: 18px; }
.kakao-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #FEE500; color: #191919; border: none; border-radius: 14px;
  padding: 16px; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: transform .1s;
}
.kakao-btn:active { transform: scale(.98); }

/* ---------- 입양 ---------- */
#adopt-screen { overflow-y: auto; padding: 32px 24px calc(env(safe-area-inset-bottom) + 24px); }
.adopt-inner { display: flex; flex-direction: column; gap: 18px; margin: auto 0; }
.adopt-eyebrow { color: var(--accent-deep); font-weight: 700; font-size: 13px; letter-spacing: .12em; }
.adopt-title { font-size: 34px; line-height: 1.2; font-weight: 800; }
.species-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.species-card {
  background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  padding: 18px 8px 14px; text-align: center; cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.species-card .sp-emoji { font-size: 40px; display: block; }
.species-card .sp-img {
  width: 76px; height: 76px; object-fit: cover; border-radius: 18px;
  display: block; margin: 0 auto;
}
.species-card .sp-label { font-size: 14px; font-weight: 700; margin-top: 6px; display: block; color: var(--ink-soft); }
.species-card.selected {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(242,107,58,.18);
}
.species-card.selected .sp-label { color: var(--accent-deep); }
.name-input {
  border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px;
  font-size: 16px; background: var(--card); outline: none;
}
.name-input:focus { border-color: var(--accent); }
.primary-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 14px;
  padding: 16px; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.primary-btn:disabled { opacity: .35; }
.primary-btn:active { transform: scale(.98); }
.primary-btn.small { padding: 12px 18px; font-size: 14px; }
.ghost-btn { background: none; border: none; color: var(--ink-soft); font-size: 14px; font-weight: 700; padding: 12px; cursor: pointer; }

/* ---------- 메인: 월드 ---------- */
.world {
  flex: 1; position: relative; overflow: hidden;
  background-size: cover; background-position: center bottom;
}
.hud {
  position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 10px; right: 10px;
  background: rgba(255, 252, 245, .78); backdrop-filter: blur(10px);
  border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(59,49,40,.10);
  z-index: 5;
}
.hud-left { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }

.pet-field {
  position: absolute; left: 0; right: 0; bottom: 12%;
  display: flex; justify-content: center; z-index: 2;
}
/* 씬의 앞쪽 풀숲을 펫보다 앞에 겹쳐 그려 "풀숲 안에 서 있는" 깊이감을 만든다 */
.world-fg {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background-size: cover; background-position: center bottom;
  clip-path: inset(86% 0 0 0);
}
.pet-move {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  /* 이동은 JS 산책 AI가 transform으로 제어 */
}

.speech {
  position: relative; margin-bottom: 14px; max-width: 76vw;
  background: rgba(255,255,255,.96); border-radius: 18px;
  padding: 12px 16px; font-size: 15px; line-height: 1.55;
  box-shadow: 0 8px 22px rgba(59,49,40,.14);
  white-space: pre-wrap; word-break: break-word;
  animation: pop .18s ease-out;
}
.speech::after {
  content: ""; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 9px solid rgba(255,255,255,.96);
}
.speech .used-bag { display: block; margin-top: 6px; font-size: 11px; color: var(--mint); font-weight: 700; }

.user-chip {
  position: absolute; top: calc(env(safe-area-inset-top) + 96px); right: 14px;
  background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px;
  padding: 9px 14px; font-size: 13px; font-weight: 600; max-width: 70vw;
  box-shadow: 0 6px 16px rgba(242,107,58,.28); z-index: 4;
  animation: pop .18s ease-out;
}

.battle-fab {
  position: absolute; right: 14px; bottom: 18px; z-index: 5;
  background: linear-gradient(135deg, #FF8A5C, #F2543A); color: #fff;
  border: none; border-radius: 999px; padding: 12px 18px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 20px rgba(242,84,58,.35);
}
.battle-fab:active { transform: scale(.96); }
.shop-fab {
  position: absolute; right: 14px; bottom: 68px; z-index: 5;
  background: linear-gradient(135deg, #59C9A5, #2FA37E); color: #fff;
  border: none; border-radius: 999px; padding: 12px 18px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 20px rgba(47,163,126,.32);
}
.shop-fab:active { transform: scale(.96); }
.rank-fab {
  position: absolute; right: 14px; bottom: 118px; z-index: 5;
  background: linear-gradient(135deg, #8E7CF3, #6A55E0); color: #fff;
  border: none; border-radius: 999px; padding: 12px 18px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 20px rgba(106,85,224,.32);
}
.rank-fab:active { transform: scale(.96); }
.area-toggle {
  position: absolute; left: 14px; bottom: 18px; z-index: 5;
  background: rgba(255,252,245,.9); color: var(--ink); backdrop-filter: blur(8px);
  border: 2px solid var(--line); border-radius: 999px; padding: 11px 16px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 16px rgba(59,49,40,.14);
}
.area-toggle:active { transform: scale(.96); }

/* ---------- 시간대 틴트 + 날씨 ---------- */
.world-tint { position: absolute; inset: 0; z-index: 4; pointer-events: none; transition: background .8s; }
.weather { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.raindrop {
  position: absolute; top: -24px; width: 2px; height: 15px; border-radius: 2px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(195,222,255,.8));
  transform: rotate(11deg);
  animation: raindropfall var(--dur) linear infinite;
}
@keyframes raindropfall {
  0% { transform: rotate(11deg) translateY(0); opacity: 0; }
  6% { opacity: .9; }
  100% { transform: rotate(11deg) translateY(108vh); opacity: .7; }
}
.snowflake {
  position: absolute; top: -12px; border-radius: 50%;
  background: rgba(255,255,255,.95); box-shadow: 0 0 5px 1px rgba(255,255,255,.5);
  animation: snowfall var(--dur) linear infinite;
}
@keyframes snowfall {
  0% { transform: translate(0, -12px); opacity: 0; }
  8% { opacity: .95; }
  100% { transform: translate(var(--sway), 105vh); opacity: .8; }
}

/* ---------- 펫 프로필 ---------- */
.hud-left { cursor: pointer; }
.pf-top { display: flex; align-items: center; gap: 14px; }
.pf-img img { width: 84px; height: 84px; object-fit: contain; }
.pf-top b { display: block; font-size: 19px; }
.pf-top span { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.pf-sec { background: #FBF4E9; border-radius: 14px; padding: 12px 14px; }
.pf-sec h3 { font-size: 12px; color: var(--accent-deep); margin-bottom: 6px; }
.pf-sec p { font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.pf-sec.grow { flex: 1; overflow-y: auto; min-height: 90px; }

/* ---------- 지식랭킹 ---------- */
.rank-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 220px; }
.rank-row {
  display: flex; align-items: center; gap: 10px;
  background: #FBF4E9; border-radius: 14px; padding: 9px 12px;
}
.rank-row.me { outline: 2px solid var(--accent); }
.rank-no { width: 30px; text-align: center; font-weight: 800; font-size: 15px; color: var(--ink-soft); }
.rank-row.top1 .rank-no { color: #E8A400; font-size: 18px; }
.rank-row.top2 .rank-no { color: #9AA5B1; font-size: 17px; }
.rank-row.top3 .rank-no { color: #C77B4F; font-size: 16px; }
.rank-row img { width: 44px; height: 44px; object-fit: contain; }
.rank-info { flex: 1; min-width: 0; }
.rank-info b { display: block; font-size: 14px; }
.rank-info span { display: block; font-size: 11px; color: var(--ink-soft); }
.rank-stats { text-align: right; font-size: 11px; color: var(--ink-soft); }
.rank-stats b { display: block; font-size: 14px; color: var(--accent-deep); }

/* 월드 소품 */
.deco {
  position: absolute; z-index: 1; pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(46,64,29,.25));
}

/* ---------- 상점 ---------- */
.shop-head { display: flex; align-items: center; gap: 10px; }
.shop-head h2 { font-size: 20px; flex: 1; }
.shop-points {
  background: #FFF3C2; color: #A8761A; font-weight: 800; font-size: 13px;
  border-radius: 999px; padding: 5px 12px;
}
.shop-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.shop-sec { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-top: 4px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  background: #FBF4E9; border-radius: 14px; padding: 10px 12px;
}
.shop-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: #fff; }
.shop-info { flex: 1; min-width: 0; }
.shop-info b { display: block; font-size: 14px; }
.shop-info span { display: block; font-size: 11px; color: var(--ink-soft); }
.shop-price { font-size: 12px; font-weight: 800; color: #A8761A; margin-top: 2px; }
.shop-btn {
  border: none; border-radius: 10px; padding: 9px 13px; font-size: 12px;
  font-weight: 800; cursor: pointer; white-space: nowrap;
}
.shop-btn.buy { background: var(--accent); color: #fff; }
.shop-btn.buy:disabled { background: var(--line); color: var(--ink-soft); }
.shop-btn.equip { background: var(--mint); color: #fff; }
.shop-btn.unequip { background: var(--line); color: var(--ink-soft); }

/* ---------- 퀴즈배틀 ---------- */
.battle-card {
  background: var(--card); border-radius: 22px; padding: 20px; width: 100%;
  max-width: 440px; max-height: 86dvh; display: flex; flex-direction: column;
  gap: 12px; animation: pop .2s ease-out; overflow: hidden;
}
#battle-entry { display: flex; flex-direction: column; gap: 12px; }
#battle-entry h2 { font-size: 20px; }
.bt-code-show {
  background: #FFF4E8; border-radius: 14px; padding: 14px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.bt-code-show span { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.bt-code-show b { font-size: 30px; letter-spacing: .28em; color: var(--accent-deep); }
.bt-code-show p { font-size: 12px; color: var(--ink-soft); }
.bt-join-row { display: flex; gap: 8px; }
.bt-join-row .primary-btn { white-space: nowrap; }
.bt-join-row input { flex: 1; text-transform: uppercase; letter-spacing: .12em; }
.bt-wide { width: 100%; padding: 14px; font-size: 14px; }

#battle-arena { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
#battle-arena.hidden { display: none; }
.bt-heads { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bt-head { flex: 1; text-align: center; }
.bt-head img { width: 64px; height: 64px; object-fit: contain; }
.bt-head .bt-name { font-size: 13px; font-weight: 800; display: block; }
.bt-head .bt-sub { font-size: 11px; color: var(--ink-soft); display: block; }
.bt-head .bt-score { font-size: 20px; font-weight: 800; color: var(--accent-deep); display: block; }
.bt-vs { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.bt-feed {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  background: #FBF4E9; border-radius: 14px; padding: 12px; min-height: 220px;
}
.bt-item { font-size: 13px; line-height: 1.5; animation: pop .18s ease-out; }
.bt-item.q {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-weight: 700;
}
.bt-item.q .bt-round { color: var(--accent-deep); margin-right: 6px; }
.bt-item.ans { padding: 8px 12px; border-radius: 12px; max-width: 92%; }
.bt-item.ans.side0 { background: #FFE9DB; align-self: flex-start; }
.bt-item.ans.side1 { background: #DFF3EA; align-self: flex-end; }
.bt-item.ans b { display: block; font-size: 11px; margin-bottom: 2px; }
.bt-item.verdict { text-align: center; color: var(--ink-soft); font-size: 12px; }
.bt-item.verdict b { color: var(--ink); }
.bt-item.final {
  background: linear-gradient(135deg, #FFB65C, #F2775A); color: #fff; text-align: center;
  border-radius: 14px; padding: 14px; font-weight: 800; font-size: 15px;
}
/* ---------- 앱 설치 배너 ---------- */
.install-banner {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 86px);
  display: flex; align-items: center; gap: 10px; z-index: 60;
  background: rgba(255, 252, 245, .97); backdrop-filter: blur(8px);
  border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(59,49,40,.18);
  animation: pop .25s ease-out;
  max-width: 496px; margin: 0 auto;
}
.install-banner img { width: 42px; height: 42px; border-radius: 12px; }
.ib-text { flex: 1; min-width: 0; }
.ib-text b { display: block; font-size: 13.5px; }
.ib-text span { display: block; font-size: 11.5px; color: var(--ink-soft); }

/* ---------- 튜토리얼 ---------- */
.quest-card {
  position: absolute; left: 12px; right: 12px;
  top: calc(env(safe-area-inset-top) + 170px);
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 252, 245, .95); backdrop-filter: blur(8px);
  border: 2px solid var(--accent); border-radius: 16px; padding: 11px 14px;
  box-shadow: 0 8px 22px rgba(242,107,58,.2); z-index: 6;
  animation: pop .25s ease-out;
}
.quest-step {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 4px 9px; white-space: nowrap;
}
.quest-body { flex: 1; min-width: 0; }
.quest-body b { display: block; font-size: 13.5px; }
.quest-body span { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.45; }
.quest-reward { font-size: 12px; font-weight: 800; color: #A8761A; white-space: nowrap; }
.tut-pulse { animation: tutpulse 1.5s ease-out infinite !important; border-radius: 14px; }
@keyframes tutpulse {
  0% { box-shadow: 0 0 0 0 rgba(242, 107, 58, .55); }
  70% { box-shadow: 0 0 0 14px rgba(242, 107, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 107, 58, 0); }
}

.toast {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(59,49,40,.82); color: #fff; border-radius: 999px;
  padding: 9px 18px; font-size: 13px; white-space: nowrap; z-index: 6;
  animation: pop .18s ease-out;
}

.topbar-left { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pet-name { font-size: 18px; font-weight: 800; }
.stage-chip {
  background: var(--mint); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 3px 10px;
}
.demo-chip { background: var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.age-chip {
  background: #FFEAD6; color: var(--accent-deep); font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 3px 10px;
}
.points-chip {
  background: #FFF3C2; color: #A8761A; font-size: 11px; font-weight: 800;
  border-radius: 999px; padding: 3px 10px;
}
.evolve-req { margin-top: 7px; font-size: 11px; color: var(--ink-soft); line-height: 1.5; }
.evolve-req .req { margin-right: 8px; white-space: nowrap; }
.evolve-req .req.ok { color: var(--mint); font-weight: 700; }
.evolve-req .req-title { font-weight: 800; color: var(--ink); margin-right: 6px; }
.bars { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label { font-size: 11px; font-weight: 700; color: var(--ink-soft); width: 26px; }
.bar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.bar-fill.xp { background: linear-gradient(90deg, #FFB65C, var(--accent-deep)); }
.bar-fill.energy { background: linear-gradient(90deg, #7ADCBB, var(--mint)); }
.bar-num { font-size: 10px; color: var(--ink-soft); width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

.pet-sprite { font-size: 88px; line-height: 1; cursor: pointer; }
.pet-sprite.talking { animation: wiggle .5s ease-in-out infinite; }
.pet-sprite img {
  --flip: 1;
  display: block; transform-origin: 50% 100%;
  filter: brightness(1.02) saturate(1.05) drop-shadow(0 10px 12px rgba(46,64,29,.28));
  animation: breathe 3s ease-in-out infinite;
}
.pet-sprite.flip img { --flip: -1; }
.pet-sprite.walking img { animation: hop .45s ease-in-out infinite; }
.pet-sprite.jumping img { animation: jump .55s ease-out; }
.pet-sprite.baby img { width: 100px; }
.pet-sprite.child img { width: 118px; }
.pet-sprite.teen img { width: 134px; }
.pet-sprite.adult img { width: 150px; }
.pet-shadow {
  margin-top: -12px; width: 104px; height: 22px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(38,54,24,.34) 0%, rgba(38,54,24,0) 68%);
  animation: shadow-breathe 3s ease-in-out infinite;
}
/* 숨쉬기: 발바닥 고정한 채 몸이 살짝 눌렸다 펴짐 */
@keyframes breathe {
  0%, 100% { transform: scaleX(var(--flip)) scaleY(1); }
  50% { transform: scaleX(calc(var(--flip) * 1.015)) scaleY(.972); }
}
@keyframes shadow-breathe {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(1.04); opacity: .92; }
}
/* 걷기: 짧은 총총걸음 */
@keyframes hop {
  0%, 100% { transform: scaleX(var(--flip)) translateY(0); }
  50% { transform: scaleX(var(--flip)) translateY(-7px) scaleY(1.02); }
}
/* 쓰다듬으면 폴짝 */
@keyframes jump {
  0% { transform: scaleX(var(--flip)) translateY(0) scaleY(.9); }
  40% { transform: scaleX(var(--flip)) translateY(-26px) scaleY(1.06); }
  100% { transform: scaleX(var(--flip)) translateY(0) scaleY(1); }
}
@keyframes wiggle { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 쓰다듬기 하트 */
.heart {
  position: absolute; bottom: 78px; left: 50%; font-size: 17px; color: #FF6B8A;
  pointer-events: none; animation: heart-up 1.1s ease-out forwards; z-index: 4;
}
@keyframes heart-up {
  0% { transform: translate(var(--hx), 0) scale(.5); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--hx), -74px) scale(1.15); opacity: 0; }
}

/* 환경 연출: 꽃가루 보케(낮) / 반딧불(밤) */
.amb { position: absolute; pointer-events: none; z-index: 1; }
.amb.pollen {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 250, 228, .92); filter: blur(1px);
  box-shadow: 0 0 6px 2px rgba(255, 248, 220, .55);
  animation: pollen-drift var(--dur) ease-in-out infinite alternate;
}
@keyframes pollen-drift {
  0% { transform: translate(0, 0); opacity: .35; }
  40% { opacity: .9; }
  100% { transform: translate(22px, -36px); opacity: .4; }
}
.amb.ffly {
  width: 5px; height: 5px; border-radius: 50%;
  background: #FFE9A8; box-shadow: 0 0 8px 3px rgba(255,233,168,.75);
  animation: firefly var(--dur) ease-in-out infinite alternate;
}
@keyframes firefly {
  0% { transform: translate(0, 0); opacity: .25; }
  40% { opacity: 1; }
  100% { transform: translate(24px, -30px); opacity: .35; }
}

.input-row {
  display: flex; gap: 8px; padding: 10px 12px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--bg); border-top: 1px solid var(--line); align-items: center;
}
.teach-btn {
  background: var(--mint); color: #fff; border: none; border-radius: 12px;
  padding: 12px 12px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap;
  position: relative;
}
.bag-count {
  margin-left: 4px; background: rgba(255,255,255,.3); border-radius: 999px;
  padding: 1px 7px; font-size: 11px;
}
#chat-input {
  flex: 1; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; outline: none; background: var(--card); min-width: 0;
}
#chat-input:focus { border-color: var(--accent); }
.send-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 12px;
  padding: 12px 16px; font-size: 14px; font-weight: 800; cursor: pointer;
}
.send-btn:disabled, .teach-btn:disabled { opacity: .4; }

/* ---------- 모달 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(59,49,40,.45);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.modal-card, .evolve-card {
  background: var(--card); border-radius: 22px; padding: 22px; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 12px; animation: pop .2s ease-out;
}
.modal-card h2 { font-size: 18px; }
.modal-desc { font-size: 13px; color: var(--ink-soft); }
#teach-text {
  border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px;
  font-size: 15px; font-family: inherit; resize: none; outline: none;
}
#teach-text:focus { border-color: var(--mint); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.evolve-card { align-items: center; text-align: center; padding: 32px 22px; }
.evolve-sprite { font-size: 96px; animation: bounce 1.2s ease-in-out infinite; }
.evolve-sprite img { width: 150px; border-radius: 26px; display: block; }
.evolve-card h2 { font-size: 22px; color: var(--accent-deep); }
.evolve-card p { font-size: 14px; color: var(--ink-soft); }
