/* ================= เมืองแมว ================= */
.tool[data-a=town] { --c: #d4f5c8; --d: #8fcf7a; }
.tool[data-a=friends] { --c: #ffe3d1; --d: #eab08e; }
.town .catname small { font-size: 14px; color: #6b8a63; font-weight: 700; }
.town-stage { cursor: pointer; background: #bfe7ff; }
.spot { position: absolute; transform: translate(-50%, -50%); z-index: 3; background: #fff; border: 3px solid #fff; border-radius: 999px; padding: 4px 12px; font-size: clamp(12px, 1.8vw, 18px); font-weight: 800; color: #ff5d8f; box-shadow: 0 4px 0 #f3c6d8, 0 6px 12px rgba(0,0,0,.1); white-space: nowrap; animation: bob 2.2s ease-in-out infinite; }
.spot:nth-child(3) { animation-delay: .4s; } .spot:nth-child(4) { animation-delay: .8s; }
.players { position: absolute; inset: 0; }
.tcat { position: absolute; width: 11%; aspect-ratio: 260 / 232; transform: translate(-50%, -100%); transition-property: left, top; transition-timing-function: linear; cursor: pointer; }
.tcat .tsvg, .tcat .tsvg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tcat.walking .tsvg { animation: walk .4s ease-in-out infinite; }
.tcat::before { content: ''; position: absolute; left: 25%; right: 25%; bottom: -2%; height: 9%; border-radius: 50%; background: rgba(74,58,53,.2); }
.tcat.me::before { background: rgba(255,111,156,.45); box-shadow: 0 0 0 3px #fff; }
.tcat .tag { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); background: rgba(255,255,255,.95); border-radius: 999px; padding: 1px 8px; font-size: clamp(10px, 1.4vw, 14px); font-weight: 800; color: #6b524b; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.1); }
.tcat.me .tag { background: #ff8fb6; color: #fff; }
.say { position: absolute; left: 50%; bottom: 96%; transform: translateX(-50%); background: #fff; border: 3px solid #ffd3e3; border-radius: 18px; padding: 4px 10px; font-size: clamp(12px, 1.8vw, 18px); font-weight: 800; color: #ff5d8f; white-space: nowrap; animation: sayin 3.2s forwards; z-index: 2; }
.say.emoji { font-size: clamp(22px, 3.6vw, 38px); padding: 2px 8px; border-radius: 50%; }
.say::after { content: ''; position: absolute; left: 50%; bottom: -10px; margin-left: -7px; border: 7px solid transparent; border-top-color: #ffd3e3; border-bottom: 0; }
@keyframes sayin { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.5); } 10%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -14px); } }
.emotebar, .phrasebar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 8px 10px; }
.emotebar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.emo { width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 3px solid #fff; font-size: 30px; box-shadow: 0 4px 0 #f3c6d8; }
.emo:active, .phr:active { transform: translateY(3px); }
.emo.talk { background: #fff3c4; box-shadow: 0 4px 0 #e2c35a; }
.phrasebar { order: -1; }
.phr { background: #fff; border: 3px solid #fff; border-radius: 999px; padding: 6px 14px; font-size: 18px; font-weight: 800; color: #ff5d8f; box-shadow: 0 4px 0 #f3c6d8; }
.friend-home .stage-wrap { flex: 1; }
.friend-home .catbox { width: 24%; }
.likes { background: #fff; color: #ff5d8f; }
.card small { font-weight: 600; opacity: .7; }
@media (max-width: 700px) { .emo { width: 46px; height: 46px; font-size: 24px; } .tcat { width: 15%; } }
.phrasebar[hidden] { display: none; }
