/* ========================================
   BAKERY CATS — Global Styles
   ======================================== */
:root {
  --font-d: 'Playfair Display', Georgia, serif;
  --font-b: 'Nunito', 'Comic Sans MS', sans-serif;
  --dark:    #2C1810;
  --brown:   #7B4F2E;
  --caramel: #D4956A;
  --warm:    #FFF8F0;
  --cream:   #FFF3E0;
  --gold:    #F5C842;
  --green:   #1D9E75;
  --red:     #E53935;
  --pink:    #E91E63;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; font-family: var(--font-b); }

/* ── Loading ── */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #FF6B6B 0%, #FFB347 35%, #FFE66D 65%, #A8E6CF 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; transition: opacity 0.5s;
}
.loader-cat { font-size: 64px; animation: bounce 0.7s ease-in-out infinite alternate; }
.loader-title { font-family: var(--font-d); font-size: 38px; font-weight: 700; color: #2C1810; text-shadow: 2px 2px 0 rgba(255,255,255,0.5); }
.loader-sub { font-size: 13px; color: #5D3A0A; font-weight: 800; }
.loader-bar-wrap { width: 220px; height: 12px; background: rgba(255,255,255,0.4); border-radius: 8px; overflow: hidden; margin-top: 4px; }
.loader-bar-fill { height: 100%; background: linear-gradient(90deg,#FF6B6B,#FFB347,#FFE66D); border-radius: 8px; width: 0; transition: width 0.18s; }
.loader-tip { font-size: 13px; color: #5D3A0A; font-weight: 700; }
.loader-cats-row { font-size: 22px; letter-spacing: 6px; opacity: 0.7; margin-top: 4px; }

/* ── App layout ── */
#app { display: none; flex-direction: column; width: 100%; height: 100%; }

/* ── HUD ── */
#hud {
  flex-shrink: 0; height: 50px;
  background: linear-gradient(90deg, #2C1810, #4A2010, #2C1810);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; gap: 8px;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  position: relative; z-index: 50;
}
.hud-logo { font-family: var(--font-d); font-size: 17px; font-weight: 700; color: var(--warm); white-space: nowrap; }
.hud-logo span { display: none; }
@media (min-width: 420px) { .hud-logo span { display: inline; } }
.hud-room-pill {
  flex: 1; text-align: center; font-size: 12px; font-weight: 800; color: var(--cream);
  background: rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.15); max-width: 200px; margin: 0 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hud-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hud-coins {
  background: linear-gradient(135deg, var(--gold), #E8A010);
  color: #2C1810; font-weight: 900; font-size: 15px;
  padding: 4px 12px; border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); white-space: nowrap;
}
.hud-time { font-size: 10px; color: rgba(255,240,200,0.75); font-weight: 700; white-space: nowrap; display: none; }
@media (min-width: 540px) { .hud-time { display: block; } }

/* ── Room Nav ── */
#room-nav {
  flex-shrink: 0; height: 42px;
  background: linear-gradient(90deg, #3A1800, #5A2800);
  display: flex; align-items: center; gap: 4px; padding: 0 8px;
  overflow-x: auto; overflow-y: hidden;
  border-bottom: 2px solid rgba(212,149,106,0.35);
}
#room-nav::-webkit-scrollbar { height: 0; }
.rnav-btn {
  flex-shrink: 0; padding: 5px 11px; border-radius: 10px; border: none;
  background: rgba(255,255,255,0.1); color: #F5D5A8;
  font-family: var(--font-b); font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.rnav-btn:hover { background: rgba(255,255,255,0.22); color: #fff; transform: translateY(-1px); }
.rnav-btn.active { background: linear-gradient(135deg, var(--gold), #E8A010); color: #2C1810; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* ── Game World ── */
#game-world {
  flex: 1; position: relative; overflow: hidden; min-height: 0;
}
#room-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#cat-layer, #fx-layer, #mess-layer { position: absolute; inset: 0; pointer-events: none; }
#cat-layer { pointer-events: all; }
#event-ticker {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  z-index: 100; pointer-events: none;
}
.event-msg {
  background: rgba(26,8,0,0.88); color: var(--warm);
  font-size: 12px; font-weight: 700; padding: 5px 16px; border-radius: 20px;
  border: 1px solid rgba(245,200,66,0.4); white-space: nowrap; max-width: 92vw;
  animation: tickIn 0.3s ease-out;
}
@keyframes tickIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }

/* ── Action Bar ── */
#action-bar {
  flex-shrink: 0; height: 52px;
  background: linear-gradient(90deg, #2C1810, #4A2010, #2C1810);
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 0 8px;
  border-top: 3px solid var(--gold);
  box-shadow: 0 -3px 10px rgba(0,0,0,0.3);
}
.action-btn {
  padding: 7px 9px; border-radius: 11px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.1);
  color: var(--warm); font-family: var(--font-b); font-size: 11px; font-weight: 800;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.action-btn:hover { background: rgba(245,200,66,0.28); border-color: rgba(245,200,66,0.5); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.25); }
.action-btn.special { background: linear-gradient(135deg, #1D9E75, #14755A); border-color: #25C492; }
.action-btn.special:hover { background: linear-gradient(135deg, #25C492, #1D9E75); }

/* ── Cats ── */
.cat-sprite {
  position: absolute; cursor: pointer; transform-origin: bottom center;
  z-index: 10; user-select: none; transition: left 0.25s ease;
  pointer-events: all;
}
.cat-sprite:hover { transform: scale(1.1); z-index: 25; }
.cat-sprite.dragging { cursor: grabbing; transition: none; z-index: 50; }
.cat-sprite.sleeping  { animation: catSway 3s ease-in-out infinite; }
.cat-sprite.playing   { animation: catBop  0.45s ease-in-out infinite alternate; }
.cat-sprite.bad       { animation: catShake 0.3s ease-in-out 3; }
.cat-sprite.cat-selected {
  filter: drop-shadow(0 0 7px #F5C842) drop-shadow(0 0 18px rgba(245,200,66,0.45));
  z-index: 30;
}
@keyframes catSway  { 0%,100%{transform:rotate(-3deg)} 50%{transform:rotate(3deg)} }
@keyframes catBop   { 0%{transform:translateY(0)} 100%{transform:translateY(-9px)} }
@keyframes catShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
@keyframes catSpin  { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes catFlip  { 0%,100%{transform:scaleX(1)} 50%{transform:scaleX(-1) rotate(8deg)} }
@keyframes catJump  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-26px)} }
@keyframes catWiggle{ 0%,100%{transform:rotate(0)} 20%{transform:rotate(-14deg)} 60%{transform:rotate(14deg)} }
@keyframes bounce   { 0%{transform:translateY(0)} 100%{transform:translateY(-10px)} }

/* Cat UI overlays */
.hunger-bar-wrap {
  position: absolute; bottom: -8px; left: 3px; right: 3px;
  height: 5px; background: rgba(0,0,0,0.18); border-radius: 4px; overflow: hidden;
}
.hunger-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s, background 0.5s; }
.mood-icon {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 13px; pointer-events: none;
  animation: moodFloat 2.2s ease-in-out infinite;
}
@keyframes moodFloat { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-4px)} }

/* Reaction bubble */
.reaction-bubble {
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: white; border: 2px solid var(--gold); color: var(--dark);
  font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 14px;
  white-space: nowrap; pointer-events: none; z-index: 100;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  animation: bubblePop 2.4s ease-out forwards;
}
.reaction-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--gold);
}
@keyframes bubblePop {
  0%   { opacity:0; transform:translateX(-50%) scale(0.5) translateY(8px); }
  12%  { opacity:1; transform:translateX(-50%) scale(1.1) translateY(0); }
  20%  { transform:translateX(-50%) scale(1) translateY(0); }
  80%  { opacity:1; transform:translateX(-50%) scale(1) translateY(-6px); }
  100% { opacity:0; transform:translateX(-50%) scale(0.9) translateY(-18px); }
}

/* Quick menu */
.quick-menu {
  position: absolute; z-index: 300;
  background: var(--warm); border-radius: 16px; padding: 10px;
  border: 2px solid var(--gold);
  box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 0 0 4px rgba(245,200,66,0.12);
  min-width: 238px; animation: menuPop 0.14s ease-out;
}
@keyframes menuPop { from{transform:scale(0.85);opacity:0} to{transform:scale(1);opacity:1} }
.qm-name {
  font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--dark);
  text-align: center; margin-bottom: 8px; padding-bottom: 7px;
  border-bottom: 1px solid #F5E6D0;
}
.qm-btns { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.qm-btn {
  padding: 6px 10px; border-radius: 9px; border: 1.5px solid #E8D5C0;
  background: var(--cream); color: var(--dark);
  font-family: var(--font-b); font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all 0.12s;
}
.qm-btn:hover        { background: var(--caramel); color: white; border-color: var(--caramel); transform: translateY(-1px); }
.qm-btn.qm-green     { border-color: #66BB6A; color: #1B5E20; }
.qm-btn.qm-green:hover  { background: #4CAF50; color: white; }
.qm-btn.qm-pink      { border-color: var(--pink); color: #880E4F; }
.qm-btn.qm-pink:hover   { background: var(--pink); color: white; }
.qm-btn.qm-purple    { border-color: #9C27B0; color: #4A148C; }
.qm-btn.qm-purple:hover { background: #9C27B0; color: white; }

/* Selection hint bar */
#selection-hint {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  background: rgba(44,24,16,0.88); color: var(--warm);
  font-size: 11px; font-weight: 700; padding: 5px 15px;
  border-radius: 14px; z-index: 200; pointer-events: none;
  white-space: nowrap; border: 1px solid rgba(212,149,106,0.45);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Messes */
.mess-item {
  position: absolute; font-size: 22px; cursor: pointer; z-index: 15;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.1s;
  animation: messAppear 0.3s ease-out;
}
.mess-item:hover { transform: scale(1.35) rotate(-8deg); }
@keyframes messAppear { from{transform:scale(0) rotate(-20deg);opacity:0} to{transform:scale(1) rotate(0);opacity:1} }

/* FX */
.heart-fx { position: absolute; font-size: 20px; pointer-events: none; z-index: 20; animation: heartRise 1.6s ease-out forwards; }
@keyframes heartRise { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(-72px)} }
.coin-fx { position: absolute; font-size: 14px; font-weight: 900; color: var(--gold); pointer-events: none; z-index: 25; text-shadow: 0 1px 4px rgba(0,0,0,0.5); animation: coinFloat 1.2s ease-out forwards; }
@keyframes coinFloat { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(-52px)} }

/* Toasts */
#toast-container { position: fixed; bottom: 62px; right: 12px; z-index: 9000; display: flex; flex-direction: column-reverse; gap: 6px; }
.toast { background: white; color: var(--dark); font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 12px; border-left: 4px solid var(--caramel); box-shadow: 0 4px 16px rgba(0,0,0,0.18); animation: toastIn 0.25s ease-out, toastOut 0.25s 2.6s ease-in forwards; max-width: 260px; }
@keyframes toastIn  { from{opacity:0;transform:translateX(36px)} to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { from{opacity:1} to{opacity:0} }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(20,8,0,0.62); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--warm); border-radius: 20px;
  border: 3px solid var(--gold);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  width: min(510px, 95vw); max-height: 88vh;
  overflow-y: auto; overflow-x: hidden;
  animation: mPop 0.2s ease-out;
  scrollbar-width: thin; scrollbar-color: var(--caramel) var(--cream);
}
.modal-box::-webkit-scrollbar { width: 5px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--caramel); border-radius: 3px; }
@keyframes mPop { from{transform:scale(0.95) translateY(16px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 2px solid #F5E6D0;
  position: sticky; top: 0; background: var(--warm); z-index: 5;
}
.modal-header h2 { font-family: var(--font-d); font-size: 19px; color: var(--dark); }
#modal-body { padding: 16px 20px; }
.modal-x {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: #F5E6D0; color: var(--dark); font-size: 16px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; transition: all 0.12s;
}
.modal-x:hover { background: var(--red); color: white; }

/* Profile modal */
.profile-box { width: min(560px, 95vw); position: relative; }
.modal-box .modal-x { position: absolute; top: 14px; right: 14px; z-index: 10; }
.profile-header {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; padding-top: 24px;
  background: linear-gradient(135deg, var(--cream), #FFE0B2);
  border-bottom: 2px solid #F5D5A8;
}
.profile-avatar {
  background: white; border-radius: 16px; padding: 8px;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.profile-name { font-family: var(--font-d); font-size: 24px; font-weight: 700; color: var(--dark); }
.profile-meta { font-size: 12px; color: var(--brown); margin-top: 3px; font-weight: 700; }
.profile-style-tag { font-size: 11px; font-weight: 800; color: var(--caramel); display: inline-block; margin-top: 3px; }
.profile-personality {
  margin-top: 9px; font-size: 12px; color: #4A2A12; font-style: italic; line-height: 1.5;
  background: rgba(255,255,255,0.6); border-radius: 10px; padding: 8px 12px;
  border-left: 3px solid var(--caramel);
}
.profile-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: flex; align-items: center; gap: 10px; }
.stat-row label { font-size: 12px; font-weight: 800; color: var(--dark); min-width: 98px; }
.stat-track { flex: 1; height: 12px; background: #F0E0CC; border-radius: 8px; overflow: hidden; }
.stat-fill { height: 100%; border-radius: 8px; transition: width 0.4s, background 0.4s; }
.stat-val { font-size: 12px; font-weight: 800; min-width: 36px; text-align: right; }
.profile-facts { background: white; border-radius: 12px; padding: 12px 16px; border: 1.5px solid #F5E0C0; }
.profile-facts h4 { font-family: var(--font-d); font-size: 14px; color: var(--brown); margin-bottom: 8px; }
.profile-facts ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.profile-facts li { font-size: 12px; color: var(--dark); padding-left: 18px; position: relative; line-height: 1.4; }
.profile-facts li::before { content: '🐾'; position: absolute; left: 0; font-size: 10px; top: 1px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.pb { padding: 8px 14px; border-radius: 10px; border: none; background: var(--cream); color: var(--dark); font-family: var(--font-b); font-size: 12px; font-weight: 800; cursor: pointer; transition: all 0.15s; }
.pb:hover { background: var(--caramel); color: white; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.14); }
.pb.primary { background: linear-gradient(135deg, #1D9E75, #14755A); color: white; }
.pb.primary:hover { background: linear-gradient(135deg, #25C492, #1D9E75); }
.pb.danger { color: var(--red); }
.pb.danger:hover { background: var(--red); color: white; }

/* Modal sections */
.section-title { font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--brown); margin: 14px 0 8px; padding-bottom: 5px; border-bottom: 2px solid #F5E0C0; }

/* Adopt */
.adopt-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: white; border-radius: 14px; border: 2px solid #F5E0C0; margin-bottom: 10px; transition: border-color 0.15s, box-shadow 0.15s; }
.adopt-card:hover { border-color: var(--caramel); box-shadow: 0 4px 14px rgba(212,149,106,0.22); }
.adopt-info { flex: 1; }
.adopt-name { font-family: var(--font-d); font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.adopt-trait { font-size: 12px; color: #5D3A0A; font-style: italic; line-height: 1.4; margin: 5px 0; }
.adopt-row { display: flex; align-items: center; gap: 10px; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 10px; }
.badge-m { background: #E3F2FD; color: #0D47A1; }
.badge-f { background: #FCE4EC; color: #880E4F; }
.badge-age { background: #E8EAF6; color: #283593; }
.cost-pill { font-size: 13px; font-weight: 800; color: #B8860B; background: #FFF9E0; padding: 3px 10px; border-radius: 10px; border: 1px solid var(--gold); }
.btn-adopt { padding: 6px 14px; border-radius: 9px; border: none; background: linear-gradient(135deg, #1D9E75, #14755A); color: white; font-family: var(--font-b); font-size: 12px; font-weight: 800; cursor: pointer; transition: all 0.15s; }
.btn-adopt:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(29,158,117,0.35); }

/* Shop */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9px; margin-bottom: 6px; }
.item-card { background: white; border-radius: 12px; padding: 12px; border: 2px solid #F5E0C0; cursor: pointer; transition: all 0.15s; text-align: center; }
.item-card:hover { border-color: var(--caramel); transform: translateY(-2px); box-shadow: 0 5px 14px rgba(212,149,106,0.22); }
.ic-icon { font-size: 28px; margin-bottom: 5px; }
.ic-name { font-size: 12px; font-weight: 800; color: var(--dark); margin-bottom: 3px; }
.ic-desc { font-size: 10px; color: #7B5030; line-height: 1.4; margin-bottom: 6px; }
.ic-price { font-size: 13px; font-weight: 800; color: #B8860B; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.ic-owned { font-size: 10px; background: #E8F5E9; color: #2E7D32; padding: 1px 6px; border-radius: 8px; font-weight: 800; }

/* Breed */
.breed-panel { background: white; border-radius: 14px; padding: 16px; border: 2px solid #F5E0C0; margin-bottom: 14px; }
.breed-panel h3 { font-family: var(--font-d); font-size: 18px; color: var(--dark); margin-bottom: 6px; }
.breed-panel p { font-size: 13px; color: var(--brown); line-height: 1.5; margin-bottom: 12px; }
.breed-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.breed-col { flex: 1; min-width: 130px; }
.breed-col label { display: block; font-size: 12px; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.breed-col select { width: 100%; padding: 8px; border-radius: 8px; border: 2px solid #F5E0C0; background: var(--cream); color: var(--dark); font-family: var(--font-b); font-size: 12px; font-weight: 700; }
.btn-breed { padding: 9px 18px; border-radius: 10px; border: none; background: linear-gradient(135deg, var(--pink), #C2185B); color: white; font-family: var(--font-b); font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.btn-breed:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(233,30,99,0.32); }

/* Kitten card */
.kitten-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff5f8; border-radius: 11px; border: 1.5px solid #F8BBD0; margin-bottom: 8px; }
.kitten-info { flex: 1; }
.kitten-name { font-size: 14px; font-weight: 800; color: var(--dark); }
.kitten-sub  { font-size: 11px; color: var(--brown); margin-top: 2px; }
.btn-grow { padding: 6px 12px; border-radius: 8px; border: none; background: linear-gradient(135deg, #7BAE7F, #4CAF50); color: white; font-family: var(--font-b); font-size: 11px; font-weight: 800; cursor: pointer; transition: all 0.12s; }
.btn-grow:hover { transform: translateY(-1px); }

/* My Cats */
.mc-card { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: white; border-radius: 12px; border: 2px solid #F5E0C0; margin-bottom: 9px; transition: border-color 0.15s; }
.mc-card:hover { border-color: var(--caramel); }
.mc-info { flex: 1; min-width: 0; }
.mc-name { font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--dark); }
.mc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.mc-badge { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 8px; }
.mb-kitten { background: #FFF3CD; color: #856404; }
.mb-adult  { background: #D1F2EB; color: #0E6655; }
.mb-room   { background: #F3E5F5; color: #6A1B9A; }
.mb-mood   { background: #FCE4EC; color: #880E4F; }
.mini-bars { display: flex; flex-direction: column; gap: 3px; }
.mini-bar-row { display: flex; align-items: center; gap: 5px; }
.mini-label { font-size: 9px; font-weight: 800; color: var(--brown); min-width: 54px; }
.mini-track { flex: 1; height: 6px; background: #F0E0CC; border-radius: 4px; overflow: hidden; }
.mini-fill  { height: 100%; border-radius: 4px; transition: width 0.4s; }
.mini-val   { font-size: 9px; color: var(--brown); font-weight: 700; }
.mc-btns { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.mc-btn { padding: 5px 10px; border-radius: 8px; border: 1.5px solid #F5E0C0; background: var(--cream); color: var(--dark); font-family: var(--font-b); font-size: 11px; font-weight: 800; cursor: pointer; transition: all 0.12s; white-space: nowrap; }
.mc-btn:hover { background: var(--caramel); color: white; border-color: var(--caramel); }

/* Sell */
.sell-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: white; border-radius: 10px; border: 1.5px solid #F5E0C0; margin-bottom: 8px; }
.sell-info { flex: 1; }
.sell-name { font-size: 13px; font-weight: 800; color: var(--dark); }
.sell-sub  { font-size: 11px; color: var(--brown); margin-top: 2px; }
.sell-price { font-size: 14px; font-weight: 800; color: #B8860B; white-space: nowrap; }
.btn-sell { padding: 7px 13px; border-radius: 9px; border: none; background: linear-gradient(135deg, var(--red), #C62828); color: white; font-family: var(--font-b); font-size: 12px; font-weight: 800; cursor: pointer; transition: all 0.12s; white-space: nowrap; }
.btn-sell:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(229,57,53,0.3); }

/* ── Wardrobe ── */
.wardrobe-wrap { display: flex; flex-direction: column; gap: 14px; }
.style-chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.style-chips-row::-webkit-scrollbar { height: 0; }
.style-chip {
  flex-shrink: 0; padding: 6px 13px; border-radius: 20px;
  border: 2px solid #F5E0C0; background: white;
  cursor: pointer; font-size: 11px; font-weight: 800; color: var(--dark);
  transition: all 0.15s; white-space: nowrap;
}
.style-chip:hover  { border-color: var(--caramel); transform: translateY(-1px); }
.style-chip.active { background: linear-gradient(135deg, var(--caramel), #B8702A); color: white; border-color: #B8702A; }
.style-chip.locked { opacity: 0.6; }
.style-chip.custom { border-style: dashed; border-color: var(--caramel); }
.wd-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .wd-panel { grid-template-columns: 1fr; } }
.wd-col { display: flex; flex-direction: column; gap: 10px; }
.wd-label { font-family: var(--font-d); font-size: 13px; font-weight: 700; color: var(--brown); margin-bottom: 4px; }
.cat-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-pick-btn { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 10px; border: 2px solid #F5E0C0; background: white; font-family: var(--font-b); font-size: 11px; font-weight: 800; color: var(--dark); cursor: pointer; transition: all 0.12s; }
.cat-pick-btn:hover, .cat-pick-btn.active { background: var(--caramel); color: white; border-color: var(--caramel); }
.dress-preview {
  background: linear-gradient(135deg, var(--cream), #FFE0B2);
  border-radius: 16px; border: 2px solid #F5D5A8; padding: 16px;
  text-align: center; min-height: 165px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.dress-cat-name { font-family: var(--font-d); font-size: 15px; font-weight: 700; color: var(--dark); }
.dress-cat-style { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 10px; background: linear-gradient(135deg, var(--caramel), #B8702A); color: white; }
.slot-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.slot-cell { background: white; border-radius: 10px; border: 2px dashed #F5E0C0; padding: 6px; text-align: center; cursor: pointer; transition: all 0.15s; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.slot-cell:hover { border-color: var(--caramel); background: var(--cream); }
.slot-cell.filled { border-style: solid; border-color: var(--caramel); background: #FFF9F0; }
.slot-label { font-size: 9px; font-weight: 800; color: var(--brown); text-transform: uppercase; letter-spacing: 0.04em; }
.slot-name  { font-size: 9px; color: var(--dark); line-height: 1.2; }
.slot-remove { font-size: 8px; color: var(--red); }
.acc-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.acc-tab { flex-shrink: 0; padding: 5px 10px; border-radius: 13px; border: 1.5px solid #F5E0C0; background: var(--cream); font-size: 11px; font-weight: 800; color: var(--brown); cursor: pointer; transition: all 0.12s; }
.acc-tab.active { background: linear-gradient(135deg, var(--brown), #4A2A12); color: white; border-color: var(--brown); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 7px; max-height: 260px; overflow-y: auto; }
.acc-grid::-webkit-scrollbar { width: 3px; }
.acc-grid::-webkit-scrollbar-thumb { background: var(--caramel); border-radius: 2px; }
.acc-card { background: white; border-radius: 10px; padding: 8px; border: 2px solid #F5E0C0; text-align: center; cursor: pointer; transition: all 0.15s; position: relative; }
.acc-card:hover   { border-color: var(--caramel); transform: translateY(-1px); }
.acc-card.owned   { border-color: #4CAF50; }
.acc-card.equipped { border-color: var(--gold); background: #FFFDE7; }
.acc-preview { width: 48px; height: 48px; margin: 0 auto 4px; overflow: visible; }
.acc-name  { font-size: 10px; font-weight: 800; color: var(--dark); line-height: 1.3; margin-bottom: 2px; }
.acc-price { font-size: 11px; font-weight: 800; color: #B8860B; }
.rarity-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; }
.r-common   { background: #9E9E9E; }
.r-uncommon { background: #1565C0; }
.r-rare     { background: #6A1B9A; }
.owned-badge { position: absolute; bottom: 3px; left: 3px; background: #4CAF50; color: white; font-size: 8px; font-weight: 800; padding: 1px 4px; border-radius: 4px; }
.acc-btn { display: block; width: 100%; margin-top: 4px; padding: 4px; border-radius: 6px; border: none; font-family: var(--font-b); font-size: 10px; font-weight: 800; cursor: pointer; transition: all 0.12s; }
.acc-btn.buy     { background: var(--gold); color: var(--dark); }
.acc-btn.buy:hover { background: #E8A010; }
.acc-btn.equip   { background: var(--caramel); color: white; }
.acc-btn.equip:hover { background: var(--brown); }
.acc-btn.unequip { background: #FFEBEE; color: var(--red); }
.acc-btn.unequip:hover { background: var(--red); color: white; }
.acc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.custom-form { background: var(--cream); border-radius: 12px; padding: 14px; border: 2px dashed var(--caramel); display: flex; flex-direction: column; gap: 9px; }
.custom-form h4 { font-family: var(--font-d); font-size: 14px; color: var(--brown); }
.custom-form input, .custom-form textarea { padding: 8px 10px; border-radius: 8px; border: 2px solid #F5E0C0; background: white; font-family: var(--font-b); font-size: 13px; color: var(--dark); width: 100%; }
.custom-form input::placeholder, .custom-form textarea::placeholder { color: #BCAAA4; }
.custom-form textarea { resize: vertical; min-height: 52px; }
.emoji-row { display: flex; gap: 5px; flex-wrap: wrap; }
.emoji-pick { width: 32px; height: 32px; border-radius: 8px; border: 2px solid #F5E0C0; background: white; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.12s; }
.emoji-pick:hover, .emoji-pick.sel { border-color: var(--caramel); background: var(--cream); transform: scale(1.12); }
.unlock-banner { background: linear-gradient(90deg, #FFF9F0, var(--cream)); border: 2px solid #F5E0C0; border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.unlock-info { font-size: 12px; color: var(--brown); }
.unlock-info strong { color: var(--dark); display: block; margin-bottom: 2px; }
.btn-unlock { padding: 6px 13px; border-radius: 8px; border: none; background: linear-gradient(135deg, var(--gold), #E8A010); color: var(--dark); font-family: var(--font-b); font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: all 0.15s; flex-shrink: 0; }
.btn-unlock:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(245,200,66,0.38); }
.btn-primary { padding: 8px 16px; border-radius: 10px; border: none; background: linear-gradient(135deg, #1D9E75, #14755A); color: white; font-family: var(--font-b); font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.15s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(29,158,117,0.3); }
