:root {
  --ink: #2a1d4a;
  --glass: rgba(255, 255, 255, 0.16);
  --glass-line: rgba(255, 255, 255, 0.32);
  --gold: #ffd86b;
  --font: Nunito, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #1a1238;
  font-family: var(--font);
  color: #fff;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#sky, #stars, #game, #fade { position: fixed; inset: 0; }
#sky { background: linear-gradient(180deg, #86bfff, #eee3ff); transition: background 1.2s linear; }
#stars {
  width: 1px; height: 1px; inset: 0 auto auto 0;
  border-radius: 50%; opacity: 0; transition: opacity 1.5s;
  pointer-events: none;
}
#game { width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
#game.usable { cursor: pointer; }
#hoverTag {
  position: fixed; z-index: 5; pointer-events: none; transform: translate(0, -50%);
  background: rgba(20, 12, 50, 0.72); color: #fff; font: 800 13px var(--font);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
#hoverTag.hidden { display: none; }

.gem {
  width: 13px; height: 13px; transform: rotate(45deg); border-radius: 3px;
  background: linear-gradient(135deg, #fff6c8, var(--gold) 55%, #ffab4a);
  box-shadow: 0 0 12px rgba(255, 216, 107, 0.9);
}
@keyframes bump { 50% { transform: scale(1.18); } }

/* Action button */
#action {
  position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 18px 15px 26px; border: 0; border-radius: 999px;
  background: #fff; color: var(--ink);
  font: 900 17px var(--font);
  box-shadow: 0 10px 40px rgba(40, 20, 90, 0.35), 0 0 0 6px rgba(255,255,255,.18);
  cursor: pointer;
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), opacity .2s;
}
#action:active { transform: translateX(-50%) scale(0.95); }
#action.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(16px) scale(.9); }
#action kbd {
  font: 900 12px var(--font); color: #7a64c8;
  background: var(--jelly-2); border-radius: 8px; padding: 4px 8px;
}
@media (hover: none) { #action kbd { display: none; } #action { padding-right: 26px; } }

/* Speech */
#bubbles { position: fixed; inset: 0; pointer-events: none; }
.bubble {
  position: absolute; transform: translate(-50%, calc(-100% - 10px));
  max-width: min(280px, 72vw); padding: 11px 16px 12px;
  background: #fff; color: var(--ink); border-radius: 18px;
  font-weight: 700; font-size: 15px; line-height: 1.35;
  box-shadow: 0 10px 30px rgba(40, 20, 90, 0.25);
  animation: pop .3s cubic-bezier(.3,1.7,.5,1);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px;
  background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px;
}
.bubble b { display: block; font-weight: 900; font-size: 12px; color: #8a6fe0; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
.bubble.out { opacity: 0; transition: opacity .25s; }
.bubble.music { background: #7f96ff; color: #fff; font-size: 22px; padding: 8px 16px; }
.bubble.music::after { background: #7f96ff; }
.notes { display: inline-block; animation: sway 0.9s ease-in-out infinite; }
@keyframes pop { from { transform: translate(-50%, calc(-100% - 10px)) scale(.6); opacity: 0; } }
@keyframes sway { 50% { transform: translateY(-3px) rotate(-4deg); } }

/* Toast */
#toast {
  position: fixed; left: 50%; top: max(76px, calc(env(safe-area-inset-top) + 64px));
  transform: translate(-50%, -10px); opacity: 0;
  max-width: min(440px, calc(100vw - 32px)); text-align: center;
  padding: 12px 20px; border-radius: 16px;
  background: rgba(30, 20, 70, 0.72); color: #fff;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-weight: 800; font-size: 15px; line-height: 1.35;
  transition: opacity .3s, transform .3s; pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Travel */
#fade { opacity: 0; pointer-events: none; transition: opacity .45s ease; background: #1a1238; }
#fade.on { opacity: 1; pointer-events: auto; }

/* Decorate button */
#decorBtn {
  position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom));
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: var(--glass); color: #fff; font: 900 16px var(--font); cursor: pointer;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
#decorBtn.hidden, #shop.hidden, #worldgate.hidden, #decor.hidden, #decorTools.hidden, #tabItems.hidden, #tabHouse.hidden, #tabSala.hidden { display: none; }
body.decorating #action, body.decorating #decorBtn { display: none; }

/* Shop */
#shop, #worldgate {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 12, 50, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s;
}
#worldgateGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.offer.world { cursor: pointer; border: 0; }
.world-dot { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.6), 0 6px 18px rgba(80,50,140,.18); }
.shop-card {
  width: min(760px, 100%); max-height: min(86vh, 760px); overflow: auto;
  padding: 22px;
}
.shop-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.shop-card header > div:first-child { flex: 1; }
.shop-card h2 { margin: 0; font-size: 24px; font-weight: 900; }
.shop-card p { margin: 2px 0 0; font-weight: 700; opacity: .6; }
.wallet { display: flex; align-items: center; gap: 8px; background: var(--ink-strong); color: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 900; font-size: 17px; }
.close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--jelly-2); color: var(--ink); font: 900 24px var(--font); cursor: pointer; line-height: 1; }
#shopGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.offer {
  position: relative; background: #fff; border-radius: 20px; padding: 12px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 2px 0 var(--rim), 0 6px 18px rgba(80, 50, 140, 0.08);
}
.offer.basic { background: #f8f5ff; }
.offer.just { animation: bump .4s cubic-bezier(.3,1.8,.5,1); }
.offer img { width: 110px; height: 110px; object-fit: contain; }
.offer-name { font-weight: 900; font-size: 15px; text-align: center; }
.owned { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 900; color: #8a6fe0; background: var(--jelly-2); padding: 3px 8px; border-radius: 999px; }
.buy {
  display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px;
  padding: 9px 18px; background: var(--ink-strong); color: #fff; font: 900 15px var(--font); cursor: pointer;
}
.buy:disabled { background: #e6e0f2; color: #a89cc4; cursor: default; }
.buy:disabled .gem { box-shadow: none; filter: grayscale(1); opacity: .5; }
.buy .gem { width: 10px; height: 10px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(42,29,74,.15); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px #2a1d4a; }
.swatches.small .sw { width: 20px; height: 20px; border-width: 2px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0; } }

/* Decorating */
#decor { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); pointer-events: none; }
#decor > * { pointer-events: auto; }
.decor-panel {
  max-width: 820px; margin: 0 auto; padding: 10px 16px 14px; border-radius: 32px;
}
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { border: 0; background: none; padding: 9px 14px; border-radius: 999px; font: 900 15px var(--font); color: var(--soft); cursor: pointer; }
.tabs button.on { background: var(--jelly-2); color: var(--ink); }
#decorDone { margin-left: auto; background: var(--ink-strong); color: #fff; padding: 9px 20px; }
#invStrip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.inv {
  position: relative; flex: 0 0 auto; width: 104px; border: 0; background: #fff; border-radius: 18px; padding: 8px 6px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  box-shadow: 0 2px 0 var(--rim), 0 4px 14px rgba(80, 50, 140, 0.08); font: 800 12px var(--font); color: var(--ink);
}
.inv img { width: 72px; height: 72px; object-fit: contain; }
.inv b { position: absolute; top: 6px; right: 8px; background: var(--ink-strong); color: #fff; border-radius: 999px; padding: 2px 7px; font-size: 11px; }
.empty { margin: 14px 8px; font-weight: 700; opacity: .6; }
.row { display: flex; align-items: center; gap: 14px; padding: 6px 4px; }
.row > span { width: 78px; flex: 0 0 auto; font-weight: 900; font-size: 14px; }
.seg { display: flex; gap: 4px; background: var(--jelly-2); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font: 800 14px var(--font); color: var(--soft); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(80,50,140,.15); }
#decorTools { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
#decorTools button {
  border: 0; border-radius: 999px; padding: 12px 20px; background: #fff; color: var(--ink);
  font: 900 15px var(--font); cursor: pointer; box-shadow: 0 8px 24px rgba(20, 10, 60, 0.25);
}
#decorTools button:disabled { opacity: .4; }
#decorTools button[data-t="store"] { background: var(--ink-strong); color: #fff; }
@media (max-width: 520px) {
  .row { flex-direction: column; align-items: flex-start; gap: 6px; }
  #shopGrid { grid-template-columns: repeat(2, 1fr); }
  .offer img { width: 90px; height: 90px; }
}

/* Talking to a neighbour */
#talk {
  /* centrada sin transform: la animación de la gelatina pisa el transform y la hacía entrar desde la derecha */
  position: fixed; left: 0; right: 0; margin-inline: auto; bottom: max(22px, env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 24px)); padding: 12px 14px 14px;
}
#talk.hidden, #job.hidden { display: none; }
.talk-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; }
.talk-head b { font-size: 18px; font-weight: 900; }
#talkHearts { display: flex; gap: 4px; margin-left: auto; }
.heart {
  width: 18px; height: 16px; display: inline-block;
  background: linear-gradient(to top, #ff6f9a var(--fill), #eadff5 var(--fill));
  clip-path: path('M9 16 C9 16 0 10 0 4.8 C0 2 2.2 0 4.8 0 C6.6 0 8.2 1 9 2.6 C9.8 1 11.4 0 13.2 0 C15.8 0 18 2 18 4.8 C18 10 9 16 9 16 Z');
}
.talk-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.talk-actions button {
  border: 0; border-radius: 16px; padding: 12px 8px; background: var(--jelly-2); color: var(--ink);
  font: 900 14px var(--font); cursor: pointer; line-height: 1.2;
}
.talk-actions button:active { transform: scale(.96); }
.talk-actions em { font-style: normal; opacity: .6; }
.talk-actions .bye { background: var(--ink-strong); color: #fff; }
body:has(#talk:not(.hidden)) #action { display: none; }
.bubble.mine { background: #7f96ff; color: #fff; }
.bubble.mine::after { background: #7f96ff; }
#talk.ocupado .talk-actions { pointer-events: none; opacity: .5; transition: opacity .2s; }

/* Jobs */
#job {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 12, 50, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s; touch-action: manipulation;
}
.job-card {
  width: min(560px, 100%); padding: 20px;
  user-select: none; -webkit-user-select: none;
}
.job-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.job-card h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 900; }
.job-time { height: 8px; border-radius: 99px; background: var(--jelly-2); overflow: hidden; margin-bottom: 14px; }
.job-time i { display: block; height: 100%; width: var(--t, 100%); background: linear-gradient(90deg, #ff9ec7, #b99cff); border-radius: 99px; }
#jobStage { position: relative; height: 340px; }
.job-intro { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 0 20px; }
.job-intro p { margin: 0; font-weight: 800; font-size: 16px; line-height: 1.4; }
.job-intro h3 { margin: 0; font-size: 26px; font-weight: 900; }
.job-intro .big { font-size: 40px; font-weight: 900; }
.job-intro .pay { opacity: .7; display: flex; align-items: center; gap: 8px; }
.job-intro .go { margin-top: 10px; border: 0; border-radius: 999px; padding: 14px 34px; background: var(--ink-strong); color: #fff; font: 900 17px var(--font); cursor: pointer; }

/* Shelves */
.shelves { display: flex; gap: 10px; height: 190px; }
.shelf {
  flex: 1; border: 0; border-radius: 18px; cursor: pointer; padding: 14px 10px; display: flex; flex-direction: column; justify-content: space-around;
  background: color-mix(in srgb, var(--c) 30%, #fff); box-shadow: inset 0 -6px 0 color-mix(in srgb, var(--c) 60%, #fff);
}
.shelf i { display: block; height: 8px; border-radius: 4px; background: var(--c); }
.shelf.good { animation: good .35s; }
.shelf.bad { animation: shake .3s; }
.crate-slot { height: 150px; display: grid; place-items: center; }
.crate { width: 86px; height: 70px; border-radius: 12px; background: var(--c); box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), 0 10px 24px rgba(40,20,90,.2); position: relative; }
.crate::before, .crate::after { content: ""; position: absolute; left: 12px; right: 12px; height: 6px; top: 18px; background: rgba(255,255,255,.55); border-radius: 3px; }
.crate::after { top: 32px; left: 26px; right: 26px; }
.crate.pop { animation: pop2 .25s cubic-bezier(.3,1.7,.5,1); }
@keyframes good { 50% { transform: scale(1.06); filter: brightness(1.1); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop2 { from { transform: scale(.4); opacity: 0; } }

/* Watering */
.beds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; height: 100%; }
.plant {
  position: relative; border: 0; border-radius: 18px; background: var(--jelly-2); cursor: pointer; overflow: hidden;
  box-shadow: inset 0 -5px 0 #e2d4ba;
}
.plant .pot { position: absolute; left: 50%; bottom: 18px; width: 44px; height: 30px; transform: translateX(-50%); background: #ff9e7a; border-radius: 4px 4px 12px 12px; }
.plant .stem { position: absolute; left: 50%; bottom: 46px; width: 4px; height: 26px; transform: translateX(-50%); background: #5fbf7f; transition: transform .3s; transform-origin: bottom; }
.plant .leaf { position: absolute; bottom: 62px; width: 22px; height: 12px; background: #6fd08a; border-radius: 50%; transition: transform .3s; }
.plant .l1 { left: calc(50% - 22px); transform: rotate(-25deg); transform-origin: right; }
.plant .l2 { left: 50%; transform: rotate(25deg); transform-origin: left; }
.plant .bar { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); }
.plant .bar b { display: block; height: 100%; width: var(--w); background: #6fb8ff; border-radius: 3px; }
.plant.thirsty { background: #ffe6c8; }
.plant.thirsty .bar b { background: #ff9e5a; }
.plant.thirsty .l1 { transform: rotate(-60deg); }
.plant.thirsty .l2 { transform: rotate(60deg); }
.plant.wilted { background: #e8e0d4; }
.plant.wilted .stem { transform: translateX(-50%) rotate(50deg); background: #a8a07a; }
.plant.wilted .leaf { background: #b8a878; }
.plant.splash { animation: good .35s; }

/* Cheats */
#cheats { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(20, 12, 50, 0.45); animation: fadeIn .2s; }
#cheats.hidden { display: none; }
.cheats-card { width: min(520px, 100%); max-height: 88vh; overflow: auto; padding: 18px 20px 20px; }
.cheats-card header { display: flex; align-items: center; }
.cheats-card h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 900; }
.cheats-card h3 { margin: 14px 0 8px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #8a6fe0; }
.cheat-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cheat-row button { border: 0; border-radius: 999px; padding: 10px 14px; background: var(--jelly-2); color: var(--ink); font: 800 14px var(--font); cursor: pointer; }
.cheat-row button:active { transform: scale(.96); }
.cheat-row button.danger { background: #ffe0ea; color: #c0305a; }
.cheat-row button.on { background: #8a6fe0; color: #fff; }
.cheats-card h3 { display: flex; align-items: center; gap: 7px; }
.ch-ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ch-mundo { margin: 10px 0 4px; font: 900 14px var(--font); color: var(--ink); }
.ch-mundo:first-child { margin-top: 0; }
.ch-piso { margin: 8px 0 5px; font: 800 12px var(--font); color: var(--soft); }
.cheat-row button.sub { padding: 7px 11px; font-size: 13px; }

/* Errands */
#tasks {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 12, 50, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s;
}
#tasks.hidden { display: none; }
.tasks-card {
  width: min(460px, 100%); padding: 20px 22px;
  background-image: repeating-linear-gradient(0deg, transparent 0 33px, rgba(138,111,224,.08) 33px 34px);
}
.tasks-card header { display: flex; align-items: center; margin-bottom: 12px; }
.tasks-card h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 900; }
#taskList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#taskList li { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 2px 0 var(--rim); }
#taskList li > div { flex: 1; }
#taskList b { display: block; font-weight: 900; font-size: 15px; margin-bottom: 6px; }
#taskList i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #7fe0a8 var(--p), var(--jelly-2) var(--p)); }
#taskList em { font-style: normal; font-weight: 900; color: #8a6fe0; font-size: 14px; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #d8ccf0; flex: 0 0 auto; }
#taskList li.done .tick { background: #7fe0a8; border-color: #7fe0a8; box-shadow: inset 0 0 0 3px #fff; }
#taskList li.done b { text-decoration: line-through; opacity: .5; }
#taskNote { margin: 14px 2px 0; font-weight: 700; opacity: .6; }

/* Florece */
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; height: 100%; }
.card { position: relative; border: 0; padding: 0; border-radius: 14px; background: none; cursor: pointer; perspective: 600px; }
.card span { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; transition: transform .35s; display: grid; place-items: center; }
.card .back { background: repeating-linear-gradient(45deg, #7fe0a8 0 10px, #9ff0bc 10px 20px); box-shadow: inset 0 -5px 0 rgba(0,0,0,.08); }
.card .front { background: #fff6fa; transform: rotateY(180deg); box-shadow: inset 0 -5px 0 #f0e0ea; }
.card .front svg { width: 64%; height: 64%; }
.card.up .back { transform: rotateY(180deg); }
.card.up .front { transform: rotateY(360deg); }
.card.done .front { background: #e8fff0; }

/* Apila Bloquis */
.stack { position: relative; height: 100%; border-radius: 18px; overflow: hidden; background: linear-gradient(#cfe0ff, #f4f0ff); cursor: pointer; }
.tower { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transition: transform .3s; }
.block { position: absolute; height: 24px; border-radius: 6px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.12); }
.block i { position: absolute; top: 7px; width: 5px; height: 7px; border-radius: 2px; background: var(--ink-strong); }
.block i:first-child { left: calc(50% - 10px); }
.block i:last-child { left: calc(50% + 5px); }
.block.fall { transition: transform .7s ease-in, opacity .7s; transform: translateY(260px) rotate(25deg); opacity: 0; }
.stack-note { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-weight: 900; font-size: 20px; color: #2a1d4a; pointer-events: none; }

/* Lluvia de chispas */
.rain { width: 100%; height: 100%; border-radius: 18px; display: block; cursor: none; touch-action: none; }

/* Profile */
#pack {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 12, 50, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s;
}
#pack.hidden { display: none; }
.world-group + .world-group { margin-top: 18px; }
.world-group h2 {
  margin: 0 0 8px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  opacity: .5; border-bottom: 2px solid var(--rim); padding-bottom: 6px;
}
.skin-row { display: grid; grid-template-columns: 90px repeat(3, 1fr); gap: 10px; align-items: stretch; margin-bottom: 10px; }
.skin-row h3 { margin: 0; align-self: center; font-size: 15px; font-weight: 900; }
.skin {
  position: relative; border: 0; border-radius: 18px; background: #fff; padding: 8px 6px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: 800 13px var(--font); color: var(--ink);
  box-shadow: 0 2px 0 var(--rim), 0 4px 14px rgba(80, 50, 140, 0.08);
}
.skin img { width: 78px; height: 78px; }
.skin span { font-size: 11px; opacity: .55; }
.skin em { font-style: normal; font-size: 11px; color: #8a6fe0; margin-top: 2px; text-align: center; line-height: 1.2; }
.skin em.buy { display: inline-flex; gap: 5px; align-items: center; background: var(--ink-strong); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.skin.locked img { filter: brightness(0) opacity(.18); }
.skin.on { box-shadow: 0 0 0 3px #2a1d4a; }
.skin.r-rara { background: linear-gradient(#fff, #f3ecff); }
.skin.r-muyrara { background: linear-gradient(#fff, #fff4d8); }
.skin.r-muyrara:not(.locked)::after { content: ""; position: absolute; top: 8px; right: 10px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 10px var(--gold); border-radius: 2px; }
@media (max-width: 520px) { .skin-row { grid-template-columns: repeat(3, 1fr); } .skin-row h3 { grid-column: 1 / -1; } }

/* Estela: siempre disponible, encabeza el perfil */

/* Surprise pack */
.pack-card {
  position: relative; width: min(360px, 100%); text-align: center; color: #fff; padding: 28px 22px 22px; border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #7f5fe0, #2a1d4a); box-shadow: 0 30px 80px rgba(20, 10, 60, 0.5);
  animation: packIn .6s cubic-bezier(.3,1.6,.5,1);
}
#pack.r-muyrara .pack-card { background: radial-gradient(circle at 50% 35%, #ffcf5a, #b0508a 70%, #2a1d4a); }
.pack-glow { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.25), transparent 30%, rgba(255,255,255,.2), transparent 60%); animation: spin 6s linear infinite; }
#packFace { position: relative; width: 170px; height: 170px; animation: bump 1s .3s; }
.pack-card h2 { position: relative; margin: 6px 0 4px; font-size: 24px; font-weight: 900; }
.pack-card p { position: relative; margin: 0 0 16px; font-weight: 700; opacity: .85; }
.pack-buttons { position: relative; display: flex; gap: 8px; justify-content: center; }
.pack-buttons button { border: 0; border-radius: 999px; padding: 12px 20px; font: 900 15px var(--font); cursor: pointer; background: #fff; color: var(--ink); }
.pack-buttons button#packClose { background: rgba(255,255,255,.18); color: #fff; }
@keyframes packIn { from { transform: scale(.3) rotate(-12deg); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Difficulty tags */
.job-intro .level { padding: 5px 14px; border-radius: 999px; font-size: 14px; }
.job-intro .level.l0 { background: #e0fff0; color: #2e9c68; }
.job-intro .level.l1 { background: #fff3d8; color: #c07a10; }
.job-intro .level.l2 { background: #ffe0ea; color: #d0306a; }
.job-intro .record { color: #d0306a; font-weight: 900; }

/* ═════════ HUD: src/ui/. La gelatina de Blopsi: blanca lechosa y translúcida, filo un tono más oscuro.
   src/ui/acento.js cambia --jelly, --panel, --rim, --rim-2, --soft, --ink-ui y --glow según el traje ═════════ */
:root {
  --jelly: #F4F1F8; --panel: color-mix(in srgb, #F4F1F8 78%, transparent);
  --rim: #DCD4E8; --rim-2: #C2B8D4; --text: #2B2A33; --soft: #7F7591; --ink-ui: #8C7FB0; --glow: transparent;
  --jelly-2: color-mix(in srgb, var(--rim) 45%, var(--jelly)); --ink-strong: color-mix(in srgb, var(--ink-ui) 60%, #1d1630);
  --tint: #C9634C; --tint-2: #F2B84B; --night: #2E3A4A; --mint: #4E8C6B; --neon: #7FB8C4;
  --gut: max(16px, env(safe-area-inset-left));
  --gut-r: max(16px, env(safe-area-inset-right));
  --gut-t: max(14px, env(safe-area-inset-top));
  --gut-b: max(14px, env(safe-area-inset-bottom));
  --me: 132px; --map: 140px;
}
svg .fill { fill: currentColor; }
svg .fill2 { fill: currentColor; opacity: .55; }
svg .hole { fill: var(--panel); }
svg .hole-line { stroke: var(--panel); stroke-width: 1.8; stroke-linecap: round; fill: none; }
svg .line, svg .strap { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.plate, .round, .money {
  border: 3px solid var(--rim); background: var(--panel); color: var(--text);
  box-shadow: 0 4px 0 var(--rim-2), 0 10px 22px rgba(30, 24, 40, 0.18);
  font: 900 16px var(--font); cursor: pointer; pointer-events: auto;
  transition: transform .12s, box-shadow .12s;
}
.plate:active, .round:active, button.money:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--rim-2), 0 4px 10px rgba(30, 24, 40, 0.18); }
.round { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; padding: 0; flex: none; }
.round svg { width: 28px; height: 28px; color: var(--tint); }
.round.small { width: 40px; height: 40px; font-size: 22px; line-height: 1; color: var(--text); }
.round.hidden { display: none; }

#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--gut-t) var(--gut-r) 0 var(--gut); pointer-events: none;
}
.hud-tl { position: relative; display: flex; gap: 10px; align-items: center; }
.plate.title {
  height: 56px; padding: 0 22px 0 18px; border-radius: 20px; display: flex; align-items: center; gap: 10px; cursor: default;
  font-size: 26px; letter-spacing: .01em; color: var(--night);
}
.plate.title:active { transform: none; box-shadow: 0 4px 0 var(--rim-2), 0 10px 22px rgba(30, 24, 40, 0.18); }
.plate.title i {
  width: 26px; height: 26px; flex: none; background: var(--tint-2);
  clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%);
}
.plate.icon { width: 56px; height: 56px; border-radius: 20px; padding: 0; display: grid; place-items: center; }
.plate.icon svg { width: 30px; height: 30px; color: var(--soft); }
.plate.icon[aria-expanded="true"] svg { color: var(--tint); transform: rotate(30deg); }
.plate.icon svg { transition: transform .3s, color .2s; }

/* Ajustes, dentro del menú compartido */
.set-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-weight: 900; font-size: 15px; }
.set-row > span:nth-child(2) { width: 64px; flex: none; }
.set-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--tint); height: 26px; }
.ico { width: 30px; height: 30px; border-radius: 10px; background: var(--jelly-2); flex: none; position: relative; }
.ico::after { content: ""; position: absolute; inset: 7px; background: var(--tint); }
.ico-music::after { clip-path: path('M5 0h11v4H8v10.5a3.5 3.5 0 1 1-3-3.4z'); inset: 7px 6px 5px 7px; }
.ico-sfx::after { clip-path: polygon(0 30%, 30% 30%, 62% 0, 62% 100%, 30% 70%, 0 70%); background: var(--mint); }
.ico-mute::after { border-radius: 50%; inset: 9px; background: var(--tint-2); }
.ico-eye::after { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; inset: 9px 6px; background: var(--neon); }
.toggle { margin-left: auto; width: 62px; height: 34px; border-radius: 999px; border: 3px solid var(--rim); background: var(--mint); position: relative; cursor: pointer; padding: 0; }
.toggle i { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: right .18s; }
.toggle.off { background: #D9CFC0; }
.toggle.off i { right: 31px; }
.set-tab .seg { margin-left: auto; background: var(--jelly-2); flex-wrap: nowrap; }
.set-tab .seg button { padding: 7px 9px; font-size: 13px; color: var(--soft); }
.set-tab .seg button.on { color: var(--text); }
.set-list { display: flex; flex-direction: column; margin-top: 6px; border-top: 2px dashed var(--rim); padding-top: 6px; }
.set-list button { border: 0; background: none; text-align: left; padding: 10px 8px; border-radius: 12px; font: 800 14px var(--font); color: var(--text); cursor: pointer; }
.set-list button:hover { background: var(--jelly-2); }
.set-list #openCheats { color: var(--tint); }

/* Tienda y monedas, arriba a la derecha */
.hud-tr { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.shop-btn { height: 70px; min-width: 116px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px 0 12px; font-size: 18px; background: var(--tint); border-color: #A94D39; color: #fff; box-shadow: 0 4px 0 #8C3E2E, 0 10px 22px rgba(30, 24, 40, 0.2); }
.shop-btn:active { box-shadow: 0 1px 0 #8C3E2E, 0 4px 10px rgba(30, 24, 40, 0.2); }
.shop-btn svg { width: 36px; height: 36px; color: #FFE7B0; }
.shop-btn svg .hole { fill: var(--tint); }
.shop-btn svg .strap { stroke: #FFE7B0; stroke-width: 2.6; }
.money {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 116px; padding: 0 14px 0 5px; border-radius: 999px;
  font-size: 18px; font-variant-numeric: tabular-nums; justify-content: flex-start; cursor: default;
}
button.money { cursor: pointer; }
.money span { margin-left: auto; }
.money.bump, #coins.bump { animation: bump 0.35s cubic-bezier(.3,1.8,.5,1); }
.spark-ico, .gem-ico { width: 28px; height: 28px; border-radius: 50%; flex: none; position: relative; display: inline-block; }
.spark-ico { background: #FFF1C9; }
.spark-ico::after { content: ""; position: absolute; inset: 6px; background: var(--tint-2); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.gem-ico { background: #E2F1F6; }
.gem-ico::after { content: ""; position: absolute; inset: 6px 5px 5px; background: linear-gradient(180deg, #9BE0F0 0 38%, #3FA9C9 38%); clip-path: polygon(22% 0, 78% 0, 100% 34%, 50% 100%, 0 34%); }
.wallet .gem-ico, .wallet .spark-ico { width: 22px; height: 22px; }

/* Perfil, abajo a la izquierda: el modelo de verdad en un círculo */
#meWrap { position: fixed; left: var(--gut); bottom: var(--gut-b); width: var(--me); height: var(--me); z-index: 3; }
#me {
  position: absolute; inset: 0; border-radius: 50%; padding: 0; cursor: pointer; overflow: hidden;
  border: 4px solid var(--rim); background: radial-gradient(circle at 50% 38%, #FFFFFF, var(--me-bg, #EFE6D6) 72%);
  box-shadow: 0 5px 0 var(--rim-2), 0 14px 30px rgba(30, 24, 40, 0.22);
  transition: transform .15s;
  -webkit-touch-callout: none;
}
#me:active { transform: scale(.97); }
#me img, #me canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#me img { object-fit: cover; transform: scale(1.05) translateY(4%); }
#me canvas { opacity: 0; transition: opacity .3s; }
#me.live canvas { opacity: 1; }
#me.live img { visibility: hidden; }
#favs { position: absolute; inset: 0; pointer-events: none; }
.fav {
  position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; padding: 0;
  border: 3px solid var(--rim); background: var(--panel); cursor: pointer; overflow: hidden;
  box-shadow: 0 3px 0 var(--rim-2), 0 8px 16px rgba(30, 24, 40, 0.2);
  transform: translate(0, 0) scale(.3); opacity: 0; pointer-events: none;
  transition: transform .28s cubic-bezier(.3,1.6,.5,1), opacity .18s;
}
.fav img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08) translateY(5%); }
.fav.on { border-color: var(--tint); }
.fav.empty { display: grid; place-items: center; background: var(--jelly-2); border-style: dashed; }
.fav.empty i { width: 22px; height: 22px; background: var(--tint-2); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
#meWrap.open #favs { pointer-events: auto; }
#meWrap.open .fav { opacity: 1; pointer-events: auto; transform: translate(var(--fx), var(--fy)) scale(1); }
.fav:hover { filter: brightness(1.05); }
#meWrap.open .fav:hover { transform: translate(var(--fx), var(--fy)) scale(1.12); }

/* Barra para escribir, abajo en el centro */
#chatbar {
  position: fixed; bottom: var(--gut-b); left: 50%; transform: translateX(-50%); z-index: 3;
  width: min(640px, calc(100vw - var(--me) - var(--map) - 120px));
  display: flex; align-items: center; gap: 10px;
}
#chatForm {
  flex: 1; min-width: 0; height: 56px; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 14px;
  border: 3px solid var(--rim); background: var(--panel); border-radius: 999px;
  box-shadow: 0 4px 0 var(--rim-2), 0 10px 22px rgba(30, 24, 40, 0.18); transition: box-shadow .15s, border-color .15s;
}
#chatForm:focus-within { border-color: var(--tint-2); }
.chat-ico { width: 24px; height: 22px; flex: none; background: var(--rim-2); border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%; position: relative; }
.chat-ico::after { content: ""; position: absolute; left: 3px; bottom: -4px; width: 9px; height: 9px; background: inherit; clip-path: polygon(0 100%, 30% 0, 100% 0); }
#chatInput { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font: 800 17px var(--font); color: var(--text); }
#chatInput::placeholder { color: #B9AC97; }
#chatSend {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--tint); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0;
  transform: scale(0); width: 0; margin-left: -6px; transition: transform .2s cubic-bezier(.3,1.6,.5,1), width .15s, margin .15s;
}
#chatSend svg { width: 22px; height: 22px; margin-left: 2px; }
#chatForm.typing #chatSend { transform: scale(1); width: 42px; margin-left: 0; }
#onlineBtn { position: relative; }
#onlineBtn svg { color: var(--soft); }
#onlineBtn .led { position: absolute; right: 4px; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: #CFC4B2; border: 2px solid var(--panel); transition: background .2s; }
#onlineBtn.on .led { background: #5BD18B; box-shadow: 0 0 8px #5BD18B; }
#onlineBtn.on svg { color: var(--mint); }
#friendsBtn svg { color: var(--mint); }
#missionsBtn svg { color: var(--tint); }
#itemsBtn svg { color: var(--tint-2); }
#itemsBtn svg .fill { color: #D99A2B; }

/* Mapa y misiones, abajo a la derecha */
#mapWrap { position: fixed; right: var(--gut-r); bottom: var(--gut-b); z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
#mapRow { display: flex; align-items: flex-end; gap: 10px; }
#zoomBtns { display: flex; flex-direction: column; gap: 8px; }
#zoomBtns.hidden, #zoomIn.hidden, #zoomOut.hidden { display: none; }
#missionsCount { font-size: 12px; background: var(--night); color: #fff; border-radius: 999px; padding: 2px 7px; margin-left: 2px; }
#missionsCount:empty { display: none; }
#mapBtn {
  position: relative; width: var(--map); height: var(--map); border-radius: 50%; padding: 0; cursor: pointer; overflow: visible;
  border: 4px solid var(--rim); background: #CFE3D6; box-shadow: 0 5px 0 var(--rim-2), 0 14px 30px rgba(30, 24, 40, 0.22);
}
#mapBtn:active { transform: scale(.97); }
#miniMap { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; display: block; }
#where {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%); white-space: nowrap;
  display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--night); color: #fff; font: 900 12px var(--font); box-shadow: 0 3px 0 #1C2430;
}
#placeName { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
#clock { font-variant-numeric: tabular-nums; opacity: .75; }
#phase { display: none; }

/* Sitio para el botón de usar y para Decorar, encima de la barra */
#action { bottom: calc(var(--gut-b) + 76px); z-index: 4; }
#decorBtn {
  left: calc(var(--gut) + var(--me) + 18px); bottom: calc(var(--gut-b) + 76px); z-index: 4;
  background: var(--panel); color: var(--text); border: 3px solid var(--rim); box-shadow: 0 4px 0 var(--rim-2); backdrop-filter: none;
}
body.decorating #chatbar, body.decorating #meWrap, body.decorating #mapWrap { display: none; }
body:has(#talk:not(.hidden)) #chatbar { visibility: hidden; }
#talk { z-index: 4; }

/* Bocadillo de lo que escribes: cambia un poco con la raza que llevas */
.bubble.say { max-width: min(260px, 70vw); font-size: 16px; font-weight: 800; padding: 10px 16px 11px; border: 3px solid #E3DED6; }
.bubble.say::after { border: 3px solid #E3DED6; border-top: 0; border-left: 0; bottom: -9px; width: 14px; height: 14px; }
.bubble.say .deco { position: absolute; pointer-events: none; }
.bubble.say-estela { background: #FFFFFF; color: #3A3A48; border-radius: 22px; }
.bubble.say-sabueso { background: #FFF3E4; color: #5A2E1E; border-color: #E2A47E; border-radius: 16px 16px 16px 6px; }
.bubble.say-sabueso::after { background: #FFF3E4; border-color: #E2A47E; }
.bubble.say-sabueso .deco { right: -8px; top: -10px; width: 22px; height: 20px; background: #C9634C;
  clip-path: path('M11 9c4 0 7 4 7 7s-3 4-7 4-7-1-7-4 3-7 7-7zM3.5 4.5a2.5 3 0 1 1 0 6 2.5 3 0 1 1 0-6zM18.5 4.5a2.5 3 0 1 1 0 6 2.5 3 0 1 1 0-6zM8 0a2.4 3 0 1 1 0 6A2.4 3 0 1 1 8 0zM14 0a2.4 3 0 1 1 0 6 2.4 3 0 1 1 0-6z'); }
.bubble.say-brote { background: #F1FBEA; color: #24502F; border-color: #9CCB8B; border-radius: 26px 26px 26px 26px / 22px 22px 30px 30px; }
.bubble.say-brote::after { background: #F1FBEA; border-color: #9CCB8B; border-radius: 0 0 10px 0; }
.bubble.say-brote .deco { left: -10px; top: -12px; width: 26px; height: 18px; background: #6FBF5A; border-radius: 0 100% 0 100%; transform: rotate(-20deg); }
.bubble.say-androide { background: #1E2836; color: #9FF5FF; border-color: #3E8FA3; border-radius: 6px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 0 2px #1E2836, 0 0 18px rgba(127, 232, 255, 0.35), 0 10px 30px rgba(20, 20, 40, 0.3); }
.bubble.say-androide::after { background: #1E2836; border-color: #3E8FA3; border-radius: 0; }
.bubble.say-androide .deco { right: 8px; top: -9px; width: 26px; height: 8px; background: radial-gradient(circle, #FF5E7A 0 2.5px, transparent 3px) 0 0 / 9px 8px; }
.bubble.say-consteliano { background: #2B2350; color: #FFF1C9; border-color: #8A6FE0; border-radius: 22px; }
.bubble.say-consteliano::after { background: #2B2350; border-color: #8A6FE0; }
.bubble.say-consteliano .deco { right: -10px; top: -12px; width: 24px; height: 24px; background: #F2B84B; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); filter: drop-shadow(0 0 4px #F2B84B); }
.bubble.say-bufon { background: #F7EEFF; color: #4A2A6E; border-color: #B28CE6; border-radius: 18px; }
.bubble.say-bufon::after { background: #F7EEFF; border-color: #B28CE6; }
.bubble.say-bufon .deco { right: -7px; top: -9px; width: 16px; height: 20px; background: #8A4FD8; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.bubble.say-vaporista { background: #FFF1E2; color: #5B3415; border-color: #D08A4A; border-radius: 14px; }
.bubble.say-vaporista::after { background: #FFF1E2; border-color: #D08A4A; }
.bubble.say-vaporista .deco { right: -6px; top: -14px; width: 26px; height: 16px; background: radial-gradient(circle at 30% 60%, #fff 0 5px, transparent 5.5px), radial-gradient(circle at 70% 40%, #fff 0 7px, transparent 7.5px); filter: drop-shadow(0 0 1.5px #D08A4A); }
.bubble.say-colorista { background: #FFFFFF; color: #2B2A33; border-color: #FF7FB0; border-radius: 24px 18px 26px 16px; }
.bubble.say-colorista::after { background: #fff; border-color: #FF7FB0; }
.bubble.say-colorista .deco { left: -8px; bottom: -6px; width: 20px; height: 20px; border-radius: 50% 40% 55% 45%; background: #59C8F0; box-shadow: 14px -6px 0 -5px #FFD34E; }
.bubble.say-heraldo { background: #FFF7E0; color: #7A1E28; border-color: #E0473F; border-radius: 18px; }
.bubble.say-heraldo::after { background: #FFF7E0; border-color: #E0473F; }
.bubble.say-heraldo .deco { right: -10px; top: -10px; width: 22px; height: 18px; background: #F2B84B; clip-path: polygon(0 35%, 45% 35%, 100% 0, 100% 100%, 45% 65%, 0 65%); }

/* Paneles nuevos */
.overlay {
  position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px;
  background: rgba(30, 26, 44, 0.45); animation: fadeIn .2s;
}
.overlay.hidden, .hidden.cards, #friendGrid.hidden, #skinGrid.hidden { display: none; }
.panel {
  width: min(560px, 100%); max-height: min(88vh, 780px); overflow: auto; overscroll-behavior: contain;
  padding: 18px 20px 20px;
}
.panel.wide { width: min(760px, 100%); }
.panel header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel header > div:first-child, .panel header > div:nth-child(2):not(.wallet) { flex: 1; min-width: 0; }
.panel h2 { margin: 0; font-size: 26px; font-weight: 900; }
.panel header p { margin: 2px 0 0; font-weight: 700; color: var(--soft); font-size: 14px; }
.panel .close { width: 46px; height: 46px; background: var(--jelly-2); color: var(--text); flex: none; }
.panel .wallet { background: var(--night); padding: 7px 14px 7px 8px; }
.ptabs { display: flex; gap: 8px; margin-bottom: 14px; background: var(--jelly-2); padding: 5px; border-radius: 999px; }
.ptabs button {
  flex: 1; border: 0; background: none; padding: 11px 10px; border-radius: 999px; font: 900 16px var(--font); color: var(--soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.ptabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 2px 0 var(--rim-2); }
.ti { width: 22px; height: 22px; display: inline-block; flex: none; position: relative; }
.ti-suit { background: var(--tint); clip-path: polygon(30% 0, 70% 0, 100% 22%, 88% 42%, 80% 36%, 80% 100%, 20% 100%, 20% 36%, 12% 42%, 0 22%); }
.ti-heart { background: #FF6F9A; clip-path: path('M11 20C11 20 0 13 0 6C0 2.7 2.6 0 5.8 0C8 0 9.9 1.3 11 3.2C12.1 1.3 14 0 16.2 0C19.4 0 22 2.7 22 6C22 13 11 20 11 20Z'); }
.ti-globe { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9BE0F0, #3FA9C9); }
.ti-sofa { background: var(--tint-2); clip-path: polygon(10% 20%, 90% 20%, 90% 45%, 100% 45%, 100% 85%, 90% 85%, 90% 100%, 80% 100%, 80% 85%, 20% 85%, 20% 100%, 10% 100%, 10% 85%, 0 85%, 0 45%, 10% 45%); }
.ti-bow { background: #FF7FB0; clip-path: polygon(0 10%, 45% 40%, 55% 40%, 100% 10%, 100% 90%, 55% 60%, 45% 60%, 0 90%); }
.ptabs .gem-ico { width: 24px; height: 24px; }

/* Perfil */
.world-group h2 { opacity: 1; color: var(--soft); border-bottom-color: var(--rim); }
.skin { background: #fff; box-shadow: 0 3px 0 var(--rim), 0 4px 14px rgba(60, 40, 20, 0.06); }
.skin.on { box-shadow: 0 0 0 3px var(--tint), 0 3px 0 var(--rim); }
.star {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; z-index: 1;
  display: grid; place-items: center;
}
.star i { width: 22px; height: 22px; background: #E3D8C6; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); transition: transform .2s, background .2s; }
.star.on i { background: var(--tint-2); transform: scale(1.12); filter: drop-shadow(0 0 3px rgba(242, 184, 75, .8)); }
.star:active i { transform: scale(.8); }
.skin.r-muyrara:not(.locked)::after { right: auto; left: 10px; }
.fav-note { margin: -4px 2px 12px; font-weight: 800; font-size: 13px; color: var(--soft); display: flex; align-items: center; gap: 6px; }
.fav-note b { color: var(--text); }
.fav-note i { width: 16px; height: 16px; background: var(--tint-2); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }

/* Amigos y corazones */
.pal-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pal { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 8px 10px; box-shadow: 0 3px 0 var(--rim); }
.pal img { width: 56px; height: 56px; border-radius: 14px; background: var(--jelly-2); flex: none; }
.pal.unmet img { filter: brightness(0) opacity(.2); background: none; }
.pal.unmet b { color: var(--soft); }
.pal b { display: block; font-size: 15px; font-weight: 900; line-height: 1.15; }
.pal span { display: block; font-size: 12px; font-weight: 800; color: var(--soft); margin: 1px 0 4px; }
.pal .hearts { display: flex; gap: 2px; }
.pal .heart { width: 15px; height: 13px; clip-path: path('M7.5 13 C7.5 13 0 8.2 0 3.9 C0 1.6 1.8 0 3.9 0 C5.4 0 6.8 .8 7.5 2.1 C8.2 .8 9.6 0 11.1 0 C13.2 0 15 1.6 15 3.9 C15 8.2 7.5 13 7.5 13 Z'); }
.pal.special { box-shadow: 0 0 0 2px var(--tint-2), 0 3px 0 var(--rim); }
.online-slot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 3px dashed var(--rim); color: var(--soft); font-weight: 800; }
.online-slot i { width: 40px; height: 40px; border-radius: 50%; background: var(--jelly-2); flex: none; }
.soon { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--night); color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .03em; }

/* Tienda de gemas y mundos */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.card-o {
  position: relative; background: #fff; border-radius: 22px; padding: 14px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 3px 0 var(--rim), 0 6px 16px rgba(60, 40, 20, 0.06); text-align: center;
}
.card-o b { font-size: 20px; font-weight: 900; }
.card-o small { font-size: 13px; font-weight: 800; color: var(--soft); line-height: 1.25; }
.card-o .soon { position: absolute; top: 10px; right: 10px; }
.card-o button { border: 0; border-radius: 999px; padding: 9px 18px; font: 900 14px var(--font); background: var(--jelly-2); color: #A99C88; cursor: default; }
.card-o button.go { background: var(--mint); color: #fff; cursor: pointer; }
.pile { position: relative; width: 96px; height: 80px; }
.pile i { position: absolute; width: 40px; height: 40px; background: linear-gradient(180deg, #B9ECF7 0 38%, #3FA9C9 38%); clip-path: polygon(22% 0, 78% 0, 100% 34%, 50% 100%, 0 34%); }
.planet { width: 86px; height: 86px; border-radius: 50%; position: relative; box-shadow: inset -10px -12px 0 rgba(0,0,0,.12), 0 6px 0 rgba(0,0,0,.06); }
.planet::after { content: ""; position: absolute; left: -10px; right: -10px; top: 46%; height: 10px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); transform: rotate(-14deg); }
.card-o.lockd .planet { filter: saturate(.75); }

/* Mapa grande */
.map-panel.panel { width: min(900px, 100%); }
.map-body { display: flex; gap: 16px; align-items: flex-start; }
.map-stage { position: relative; flex: 1 1 auto; min-width: 0; max-width: calc(100vh - 190px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: #CFE3D6; border: 3px solid var(--rim); }
#bigMap { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#mapLabels { position: absolute; inset: 0; pointer-events: none; }
.map-tag { position: absolute; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; background: var(--panel); color: var(--text); border: 2px solid var(--rim); border-radius: 999px; padding: 2px 9px; font: 900 12px var(--font); }
.map-tag.you { background: var(--tint); border-color: #A94D39; color: #fff; }
.map-tag.special { background: #FFF1C9; border-color: var(--tint-2); }
.map-tag.portal { background: #E6F5FF; border-color: #7FB8E6; }
#mapLegend { list-style: none; margin: 0; padding: 0; width: 190px; flex: none; display: flex; flex-direction: column; gap: 8px; }
#mapLegend li { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 15px; background: #fff; border-radius: 16px; padding: 9px 12px; box-shadow: 0 3px 0 var(--rim); }
#mapLegend li em { margin-left: auto; font-style: normal; color: var(--soft); font-size: 13px; }
.dot-l { width: 18px; height: 18px; border-radius: 50%; flex: none; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.12); }

/* Misiones */
#missionList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mission { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 22px; padding: 12px 14px; box-shadow: 0 3px 0 var(--rim); position: relative; }
.mission .badge { width: 58px; height: 58px; border-radius: 18px; flex: none; display: grid; place-items: center; background: var(--c); box-shadow: inset 0 -5px 0 rgba(0,0,0,.14); }
.mission .badge img { width: 64px; height: 64px; margin-top: 4px; }
.mission > div { flex: 1; min-width: 0; }
.mission b { display: block; font-size: 17px; font-weight: 900; line-height: 1.2; }
.mission span { display: block; font-size: 13px; font-weight: 800; color: var(--soft); margin-top: 2px; }
.mission .st { flex: none; font-size: 12px; font-weight: 900; padding: 5px 10px; border-radius: 999px; background: var(--jelly-2); color: #8A7F70; }
.mission .st.curso { background: #FFF1C9; color: #A56A00; }
.mission .st.hecha { background: #DDF3E3; color: #2E7A4A; }
.mission.final { background: linear-gradient(#FFFDF6, #FFF4D6); box-shadow: 0 0 0 2px var(--tint-2), 0 3px 0 var(--rim); margin-top: 6px; }
.mission.final .badge { background: var(--night); }
.mission.final .badge i { width: 34px; height: 34px; background: var(--tint-2); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.mission.locked { filter: saturate(.3); opacity: .8; }
.mission.locked .badge i { background: #8A8FA0; clip-path: path('M10 15v-4a7 7 0 0 1 14 0v4h2v15H8V15zM13.5 15h7v-4a3.5 3.5 0 0 0-7 0z'); width: 34px; height: 34px; }
.progress4 { display: flex; gap: 4px; margin-top: 6px; }
.progress4 i { width: 22px; height: 6px; border-radius: 3px; background: var(--jelly-2); }
.progress4 i.on { background: var(--tint-2); }

/* Amigos online y objetos */
.add-friend { display: flex; gap: 8px; margin-bottom: 12px; }
.add-friend input { flex: 1; min-width: 0; height: 50px; border-radius: 999px; border: 3px solid var(--rim); background: #fff; padding: 0 16px; font: 800 16px var(--font); color: var(--text); outline: none; }
.add-friend input:focus { border-color: var(--tint-2); }
.add-friend button { border: 0; border-radius: 999px; padding: 0 20px; background: var(--mint); color: #fff; font: 900 16px var(--font); cursor: pointer; box-shadow: 0 3px 0 #356049; }
.friend-split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; }
.online-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dm { display: flex; flex-direction: column; gap: 8px; background: var(--jelly-2); border-radius: 20px; padding: 10px; min-height: 200px; }
.dm-log { flex: 1; display: grid; place-items: center; border-radius: 14px; background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(0,0,0,.035) 26px 28px); }
.dm-input { display: flex; gap: 6px; }
.dm-input input { flex: 1; min-width: 0; height: 42px; border-radius: 999px; border: 2px solid var(--rim); background: #fff; padding: 0 12px; font: 800 14px var(--font); }
.dm-input button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #D9CFC0; color: #fff; display: grid; place-items: center; }
.dm-input svg { width: 20px; height: 20px; }
.cards.items { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.item-o { position: relative; background: #fff; border-radius: 20px; padding: 8px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 var(--rim); font: 800 13px var(--font); text-align: center; }
.item-o img { width: 84px; height: 84px; object-fit: contain; }
.item-o b { position: absolute; top: 6px; right: 8px; background: var(--night); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.item-o em { font-style: normal; font-size: 11px; color: var(--mint); font-weight: 900; }
.cards .empty-o { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 10px; color: var(--soft); font-weight: 800; }
.cards .empty-o i { width: 64px; height: 64px; border-radius: 22px; background: var(--jelly-2); }

/* Móvil */
@media (max-width: 700px) {
  :root { --me: 88px; --map: 92px; }
  .plate.title { height: 46px; font-size: 20px; padding: 0 14px 0 12px; border-radius: 16px; }
  .plate.title i { width: 20px; height: 20px; }
  .plate.icon { width: 46px; height: 46px; border-radius: 16px; }
  .plate.icon svg { width: 26px; height: 26px; }
  .shop-btn { height: 52px; min-width: 0; font-size: 15px; border-radius: 18px; padding: 0 12px 0 8px; }
  .shop-btn svg { width: 28px; height: 28px; }
  .money { height: 34px; min-width: 92px; font-size: 15px; padding-right: 11px; }
  .spark-ico, .gem-ico { width: 24px; height: 24px; }
  .hud-tr { gap: 8px; }
  #chatbar { width: auto; left: calc(var(--gut) + var(--me) + 8px); right: calc(var(--gut-r) + var(--map) + 8px); transform: none; gap: 6px; bottom: var(--gut-b); }
  #chatbar .round { width: 42px; height: 42px; }
  #chatbar .round svg { width: 23px; height: 23px; }
  #onlineBtn .led { width: 11px; height: 11px; right: 2px; top: 2px; }
  #chatForm { height: 46px; padding: 0 4px 0 10px; }
  #chatInput { font-size: 16px; }
  #chatbar .chat-ico { display: none; }
  /* Al escribir, la barra se estira de lado a lado */
  #chatbar.wide { left: var(--gut); right: var(--gut-r); bottom: calc(var(--gut-b) + var(--me) + 14px); z-index: 7; }
  #chatbar.wide .round { display: none; }
  #chatbar.wide #chatForm { height: 54px; }
  #chatbar.wide .chat-ico { display: block; }
  /* Dos pisos entre los círculos: los tres botones arriba y la barra debajo */
  #chatbar { flex-wrap: wrap; justify-content: space-between; row-gap: 6px; }
  #chatForm { order: 3; flex: 1 1 100%; }
  #meWrap .fav { width: 48px; height: 48px; margin: -24px; }
  #mapWrap { gap: 18px; }
  #zoomBtns { position: fixed; right: var(--gut-r); bottom: calc(var(--gut-b) + var(--map) + 70px); }
  .round.small { width: 38px; height: 38px; }
  #where { font-size: 11px; top: -12px; padding: 2px 8px; }
  #placeName { max-width: 72px; }
  #clock { display: none; }
  #action { bottom: calc(var(--gut-b) + var(--me) + 18px); }
  #decorBtn { left: var(--gut); bottom: calc(var(--gut-b) + var(--me) + 18px); }
  .panel { padding: 14px 14px 16px; border-radius: 24px; }
  .panel h2 { font-size: 22px; }
  .ptabs button { font-size: 15px; padding: 10px 6px; }
  .map-body { flex-direction: column; }
  #mapLegend { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .friend-split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards.items { grid-template-columns: repeat(3, 1fr); }
  .item-o img { width: 66px; height: 66px; }
}
@media (max-width: 380px) { .plate.title { font-size: 17px; } }
.panel .world-group h2 { font-size: 13px; letter-spacing: .08em; margin: 0 0 10px; }
.panel .world-group + .world-group { margin-top: 20px; }
@media (max-width: 700px) {
  .map-stage { flex: none; width: 100%; max-width: none; }
}
@media (max-width: 700px) { .map-tag { font-size: 10px; padding: 1px 6px; } }
/* Capas: el HUD (3) queda por debajo de cualquier panel */
#decor { z-index: 4; }
#shop, #worldgate, #job, #tasks, #pack { z-index: 6; }
#cheats { z-index: 7; }
#toast { z-index: 8; }
#fade { z-index: 9; }

/* Sesión 14: sin botones de zoom (rueda y pellizco siguen) y Misiones más discreta, sin contador */
#zoomBtns { display: none !important; }
#missionsCount { display: none !important; }


.mission-empty { list-style: none; text-align: center; padding: 28px 12px; font-weight: 800; color: var(--soft); }

/* ───────── Minijuegos de plataforma (src/minijuegos/) ───────── */
.mg-entry {
  position: fixed; inset: 0; z-index: 7; display: grid; place-items: center; pointer-events: none;
  padding: var(--gut-t) var(--gut-r) var(--gut-b) var(--gut);
}
.mg-entry .mg-card { pointer-events: auto; }
.mg-entry.hidden, .mg-play-screen.hidden, .mg-result.hidden, .mg-record.hidden, .mg-reward.hidden { display: none; }
.mg-card {
  position: relative; width: min(330px, 100%); padding: 22px 22px 18px; text-align: center;
  animation: mgPop .32s cubic-bezier(.3, 1.5, .5, 1);
}
@keyframes mgPop { from { transform: translateY(14px) scale(.94); opacity: 0; } }
.mg-card p { margin: 0; }
.mg-x { position: absolute; top: 12px; right: 12px; }
.mg-game { font-size: 15px; font-weight: 900; color: var(--soft); letter-spacing: .02em; }
.mg-portrait {
  position: relative; width: 136px; height: 136px; margin: 12px auto 8px; border-radius: 50%;
  background: var(--jelly-2); border: 3px solid var(--rim); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.05);
}
.mg-portrait img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mg-portrait.small { width: 84px; height: 84px; margin-top: 0; }
.mg-tier {
  position: absolute; right: -4px; bottom: 4px; min-width: 44px; padding: 4px 9px; border-radius: 999px;
  font-size: 14px; font-weight: 900; color: #fff; border: 3px solid var(--panel);
}
.mg-tier.t0 { background: #A39A8C; }
.mg-tier.t1 { background: #3F8FD8; }
.mg-tier.t2 { background: #F2B84B; color: #5a3a00; box-shadow: 0 0 16px rgba(242, 184, 75, 0.9); }
.mg-who { font-size: 16px; font-weight: 900; }
.mg-next { margin-top: 12px !important; font-size: 13px; font-weight: 900; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
.mg-level { font-size: 46px; font-weight: 900; line-height: 1.05; color: var(--night); }
.mg-card .mg-play {
  margin-top: 14px; width: 100%; height: 60px; border: 3px solid #A84E3A; border-radius: 999px;
  background: var(--tint); color: #fff; font: 900 23px var(--font); letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 5px 0 #8E3F2E; transition: transform .1s, box-shadow .1s;
}
.mg-card .mg-play:active { transform: translateY(4px); box-shadow: 0 1px 0 #8E3F2E; }
.mg-best { margin-top: 10px !important; font-size: 13px; font-weight: 800; color: var(--soft); min-height: 1em; }

.mg-play-screen { position: fixed; inset: 0; z-index: 8; background: #120c26; opacity: 0; transition: opacity .25s; }
.mg-play-screen.open { opacity: 1; }
.mg-host, .mg-host canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.mg-hud {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: var(--gut-t) var(--gut-r) 0 var(--gut); pointer-events: none;
}
.mg-hud > * { pointer-events: auto; }
.mg-chip {
  height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 5px; border-radius: 999px; flex: none;
  background: var(--panel); color: var(--text); border: 3px solid var(--rim); box-shadow: 0 4px 0 var(--rim-2); font-weight: 900; font-size: 16px;
}
.mg-chip img { width: 34px; height: 34px; border-radius: 50%; background: var(--jelly-2); }
.mg-score { padding-left: 12px; }
.mg-bar {
  position: relative; flex: 1; max-width: 440px; margin: 0 auto; height: 34px; border-radius: 999px; overflow: hidden;
  background: var(--panel); border: 3px solid var(--rim); box-shadow: 0 4px 0 var(--rim-2);
}
.mg-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--tint-2); transition: width .2s; }
.mg-bar span { position: relative; display: block; text-align: center; line-height: 28px; font-weight: 900; font-size: 15px; color: var(--text); }
.mg-bar[data-icon="drop"] span::before { content: ""; display: inline-block; width: 12px; height: 10px; margin-right: 6px; background: var(--night); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.mg-ico { width: 18px; height: 18px; flex: none; background: var(--tint); }
.mg-ico.pts { clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); background: var(--tint-2); }
.mg-ico.bone { height: 10px; border-radius: 6px; background: var(--tint-2); box-shadow: -6px -3px 0 -2px var(--tint-2), -6px 3px 0 -2px var(--tint-2), 6px -3px 0 -2px var(--tint-2), 6px 3px 0 -2px var(--tint-2); width: 16px; }
.mg-ico.moves { border-radius: 4px 4px 9px 9px; background: var(--mint); clip-path: polygon(30% 0, 70% 0, 70% 30%, 100% 70%, 100% 100%, 0 100%, 0 70%, 30% 30%); }
.mg-result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(24, 16, 44, 0.45); padding: 16px; }
.mg-result h3 { margin: 4px 0 0; font-size: 22px; font-weight: 900; color: var(--night); }
.mg-big { font-size: 48px; font-weight: 900; line-height: 1.1; }
.mg-reward { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; font-size: 18px; color: var(--soft); }
.mg-record { color: var(--tint); font-weight: 900; margin-top: 4px !important; }
.mg-card.win h3 { color: var(--mint); }
@media (max-width: 520px) {
  .mg-chip { height: 40px; font-size: 14px; }
  .mg-chip img { width: 28px; height: 28px; }
  .mg-level { font-size: 40px; }
}

/* ═════════ UI blandita (src/ui/squish.js): cada placa es un SVG con el borde vivo ═════════ */
.sq { isolation: isolate; background: none !important; border-color: transparent !important; box-shadow: none !important; }
.sq-back, .sq-front { position: absolute; overflow: visible; pointer-events: none; }
.sq-back { z-index: -1; filter: drop-shadow(0 8px 12px rgba(30, 24, 40, 0.16)); }
.sq-front { z-index: 2; }
.shop-btn { --sq-fill: var(--tint); --sq-rim: #A94D39; --sq-shadow: #8C3E2E; }
#where { --sq-fill: var(--night); --sq-rim: var(--night); --sq-shadow: #1C2430; --sq-drop: 3; z-index: 3; }
#where .sq-back { filter: none; }
#me, #mapBtn { overflow: visible; --sq-drop: 5; }
#me { --sq-fill: var(--me-bg, #EFE6D6); }
#me img, #me canvas { border-radius: 50%; background: radial-gradient(circle at 50% 38%, #FFFFFF, var(--me-bg, #EFE6D6) 72%); }
#mapBtn { --sq-fill: #CFE3D6; }

/* ═════════ Menú compartido (src/ui/hub.js): los tomos a la izquierda, el libro abierto a la derecha ═════════
   Cada sección es un tomo cuyo lomo asoma por debajo del panel; el elegido sale un poco y se funde con él.
   Las pestañas de la sección van dentro del panel, siempre arriba. */
.hub {
  --hub-w: min(1040px, calc(100vw - 280px)); --hub-h: min(640px, calc(100vh - 70px));
  position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center;
  padding: 24px var(--gut-r) 24px var(--gut); color: var(--text);
  background: rgba(30, 26, 44, 0); visibility: hidden; pointer-events: none; transition: background .25s;
}
.hub.open { visibility: visible; pointer-events: auto; background: rgba(30, 26, 44, 0.42); }
.hub.closing { visibility: visible; }

/* Los tomos: todos iguales y en fila, cada uno con su color; el lomo se mete bajo el panel */
.hub-nav { position: relative; z-index: 1; width: 210px; margin-right: -34px; flex: none; display: flex; flex-direction: column; gap: 10px; }
.hub-b {
  --tomo: #A39CB0; --sq-r: 22px; --sq-drop: 4;
  --sq-fill: color-mix(in srgb, var(--tomo) 34%, var(--jelly)); --sq-rim: color-mix(in srgb, var(--tomo) 55%, var(--jelly)); --sq-shadow: color-mix(in srgb, var(--tomo) 60%, var(--rim-2));
  position: relative; height: 66px; border: 3px solid transparent; border-radius: 22px; padding: 0 46px 0 24px; cursor: pointer;
  display: flex; align-items: center; gap: 12px; font: 900 17px var(--font); color: var(--ink-strong); text-align: left;
  transform: translateX(14px); transition: transform .3s cubic-bezier(.3,1.6,.5,1), color .2s;
}
/* las cintas del lomo */
.hub-b::before { content: ""; position: absolute; left: 10px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--tomo) 60%, #fff); }
.hub-b svg { width: 28px; height: 28px; flex: none; color: color-mix(in srgb, var(--tomo) 75%, #000); }
.hub-b svg .hole { fill: var(--sq-fill); }
.hub-b svg .hole-line { stroke: var(--sq-fill); }
.hub-b img { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--jelly-2); }
.hub-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-b:hover { transform: translateX(4px); }
.hub-b.on { --sq-fill: var(--jelly); --sq-rim: var(--rim); --sq-shadow: var(--rim-2); color: var(--text); transform: translateX(-12px); }
.b-me { --tomo: #9C8CD0; }
.b-chars { --tomo: #E77FA0; }
.b-friends { --tomo: #6FB7D8; }
.b-items { --tomo: #E2A55A; }
.b-missions { --tomo: #7FBF7A; }
.b-settings { --tomo: #A39CB0; }
.b-shop { --tomo: var(--tint); cursor: default; }
.b-wallet { --tomo: #5FC8E8; cursor: default; font-size: 20px; }
.hub-b.b-wallet:hover, .hub-b.b-shop:hover { transform: translateX(14px); }
.hub-b.b-shop.on:hover { transform: translateX(-12px); }

/* El panel: siempre del mismo tamaño; las pestañas, dentro y arriba */
.hub-main { position: relative; z-index: 2; width: var(--hub-w); height: var(--hub-h); flex: none; }
.hub-panel {
  --sq-r: 48px; --sq-drop: 6;
  position: absolute; inset: 0; border: 4px solid var(--rim); border-radius: 48px; background: var(--panel);
  display: flex; flex-direction: column; padding: 22px 28px 24px;
  backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25);
}
.hub-panel > .sq-back { filter: drop-shadow(0 0 22px var(--glow)) drop-shadow(0 26px 50px rgba(20, 16, 40, 0.35)); }
.hub-tabs { position: relative; z-index: 2; display: flex; gap: 10px; margin: 0 60px 16px 0; flex: none; }
.hub-t {
  --sq-fill: var(--jelly-2); --sq-rim: var(--jelly-2); --sq-shadow: var(--rim-2); --sq-drop: 3;
  height: 48px; padding: 0 26px; border: 3px solid transparent; border-radius: 24px; cursor: pointer;
  font: 900 17px var(--font); color: var(--soft); transition: color .2s, transform .3s cubic-bezier(.3,1.6,.5,1);
}
.hub-t:hover { transform: translateY(-2px); }
.hub-t.on { --sq-fill: #fff; --sq-rim: var(--rim); color: var(--text); }
.hub-x {
  --sq-fill: var(--jelly-2); --sq-rim: var(--jelly-2); --sq-drop: 0;
  position: absolute; z-index: 3; top: 22px; right: 24px; width: 46px; height: 46px; border: 3px solid transparent; border-radius: 50%;
  font: 900 24px var(--font); line-height: 1; color: var(--soft); cursor: pointer; padding: 0;
}
.hub-x .sq-back { filter: none; }
.hub-sec { display: none; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 6px 6px; scrollbar-width: thin; scrollbar-color: var(--rim) transparent; }
.hub-sec.on { display: block; }
.hub-tab { display: none; }
.hub-tab.on { display: block; }
.hub-tab.enter { animation: tabSwap .32s cubic-bezier(.3,1.3,.5,1); }
.me-head { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.me-head img { width: 66px; height: 66px; border-radius: 22px; background: var(--jelly-2); flex: none; }
.me-head h2 { margin: 0; font-size: 22px; font-weight: 900; }
.me-head p { margin: 2px 0 0; font-weight: 700; color: var(--soft); font-size: 14px; }
.hub-sec .world-group h2 { font-size: 13px; letter-spacing: .08em; margin: 0 0 10px; color: var(--soft); border-bottom-color: var(--rim); opacity: 1; }
.hub-sec .world-group + .world-group { margin-top: 20px; }
.skin-row.solo .skin { grid-column: 2; }
.set-tab { max-width: 520px; margin: 0 auto; }
.set-tab .set-list { border-top: 0; margin-top: 0; padding-top: 0; }
.set-tab .set-list button { font-size: 16px; padding: 14px 12px; }
.set-tab .set-partida { border-top: 2px dashed var(--rim); margin-top: 10px; padding-top: 6px; }
.hub-sec .empty-o { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 10px; color: var(--soft); font-weight: 800; }
.hub-sec .empty-o i { width: 64px; height: 64px; border-radius: 22px; background: var(--jelly-2); }

/* Abrir: el libro hace "blop" y los tomos salen de debajo. Cerrar: se recoge y no vuelve a aparecer */
.hub.open .hub-main { animation: libro .42s cubic-bezier(.3, 1.4, .5, 1); }
.hub.open .hub-b { animation: tomo .45s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: calc(.08s + var(--i) * 40ms); }
.hub.closing .hub-main, .hub.closing .hub-nav { animation: recoge .2s ease-in forwards; }
@keyframes libro { 0% { opacity: 0; transform: scale(.94, .9); } 60% { opacity: 1; transform: scale(1.01, .995); } }
@keyframes tomo { from { opacity: 0; transform: translateX(90px); } }
@keyframes recoge { to { opacity: 0; transform: scale(.96); } }
@keyframes tabSwap { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .hub.open .hub-main, .hub.open .hub-b, .hub.closing .hub-main, .hub.closing .hub-nav, .hub-tab.enter { animation-duration: .01s; }
}

/* Pantallas bajas: los tomos encogen */
@media (max-height: 640px) {
  .hub-b { height: 54px; font-size: 15px; }
  .hub-nav { gap: 6px; }
}
@media (max-width: 700px) {
  #chatbar .round { width: 35px; height: 35px; }
  #chatbar { column-gap: 4px; }
  #chatbar .round svg { width: 20px; height: 20px; }
}

/* ═════════ personajes (src/ui/personajes_ui.js): Personajes, inventario, gestos, compañía y la mesa de mezcla ═════════ */
.gl { width: 26px; height: 26px; flex: none; }
.gl.big { width: 44px; height: 44px; }
.gl.s { width: 16px; height: 16px; }
.gl-mini { width: 14px; height: 14px; flex: none; }
img.gl.face { border-radius: 8px; background: var(--jelly-2); }
.ing { width: 30px; height: 30px; flex: none; }
.ing.big { width: 58px; height: 58px; }
.ing.s { width: 18px; height: 18px; }
.obj { width: 34px; height: 34px; flex: none; }
.obj.big { width: 64px; height: 64px; }
.obj.s { width: 22px; height: 22px; }

/* El corazón del perfil: solo aparece cuando un especial llega al nivel 1 */
.me-heart { display: none; align-items: center; gap: 6px; margin-left: auto; margin-right: 52px; font: 900 18px var(--font); color: #e0527f; }
.me-heart.on { display: inline-flex; }
.me-heart .heart { width: 26px; height: 23px; clip-path: path('M13 23 C13 23 0 14.6 0 7 C0 3 3.2 0 6.9 0 C9.4 0 11.8 1.4 13 3.6 C14.2 1.4 16.6 0 19.1 0 C22.8 0 26 3 26 7 C26 14.6 13 23 13 23 Z'); }
.me-heart.pop { animation: heartPop .9s cubic-bezier(.3,1.7,.5,1); }
.me-heart.hud { position: absolute; z-index: 4; right: -6px; top: -6px; margin: 0; padding: 4px 9px 4px 7px; border-radius: 999px; background: var(--panel); border: 3px solid var(--rim); box-shadow: 0 3px 0 var(--rim-2); font-size: 15px; pointer-events: none; }
.me-heart.hud .heart { width: 18px; height: 16px; clip-path: path('M9 16 C9 16 0 10 0 4.8 C0 2 2.2 0 4.8 0 C6.6 0 8.2 1 9 2.6 C9.8 1 11.4 0 13.2 0 C15.8 0 18 2 18 4.8 C18 10 9 16 9 16 Z'); }
@keyframes heartPop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.35) rotate(6deg); } }
body.decorating .me-heart.hud { display: none; }

/* Personajes: la lista */
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 6px 2px; }
.pj-card { --sq-fill: #fff; --sq-rim: var(--rim); --sq-shadow: var(--rim); --sq-drop: 4; border: 3px solid transparent; border-radius: 30px; padding: 14px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: 900 17px var(--font); color: var(--text); }
.pj-card img { width: 116px; height: 116px; border-radius: 24px; background: var(--jelly-2); }
.pj-card.unmet img { filter: brightness(0) opacity(.2); background: none; }
.pj-card.unmet b { color: var(--soft); }
.pj-card em { font-style: normal; font-size: 13px; color: var(--soft); min-height: 16px; }
.pj-hearts { display: inline-flex; gap: 3px; }
.pj-hearts .heart { width: 18px; height: 16px; }
.h3 { width: 22px; height: 22px; object-fit: contain; flex: none; vertical-align: middle; }
.h3.vacio { filter: grayscale(1) brightness(.85) opacity(.4); }
.pj-hearts .h3 { width: 20px; height: 20px; margin: 0 -1px; }
.cas .pr .gl.h3 { width: 28px; height: 28px; }

/* Personajes: la tarjeta */
.pj-top { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.pj-back { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--jelly-2); color: var(--soft); font: 900 26px var(--font); cursor: pointer; line-height: 1; padding: 0 0 4px; flex: none; }
.pj-portrait { width: 104px; height: 104px; flex: none; border-radius: 28px; background: var(--jelly-2); display: grid; place-items: end center; overflow: visible; }
.pj-portrait img { width: 100px; height: 100px; transform-origin: 50% 92%; display: block; will-change: transform; }
.pj-portrait.unmet img { filter: brightness(0) opacity(.2); }
.pj-info { flex: 1; min-width: 180px; }
.pj-info h2 { margin: 0 0 4px; font-size: 22px; font-weight: 900; }
.pj-lvl { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 15px; color: var(--soft); }
.pj-lvl .heart { width: 20px; height: 18px; clip-path: path('M10 18 C10 18 0 11.2 0 5.4 C0 2.4 2.4 0 5.4 0 C7.4 0 9.2 1.1 10 2.9 C10.8 1.1 12.6 0 14.6 0 C17.6 0 20 2.4 20 5.4 C20 11.2 10 18 10 18 Z'); }
.pj-bar { height: 12px; border-radius: 99px; background: #EFE4CF; margin-top: 8px; overflow: hidden; max-width: 320px; }
.pj-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(#ff8fb0, #ff6f9a); transition: width .5s; }
.dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #E6DAC4; }
.dot.on { background: #ff6f9a; }
.pj-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; padding: 12px; margin-bottom: 12px; background: var(--jelly-2); border-radius: 24px; animation: tabSwap .25s; }
.pj-tray .it { position: relative; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--rim); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 800 12px var(--font); color: var(--text); cursor: pointer; text-align: center; }
.pj-tray .it:hover { transform: translateY(-2px); }
.pj-tray .it b { position: absolute; top: 4px; right: 6px; background: var(--night); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 11px; }
.pj-tray .it .obj { width: 46px; height: 46px; }
.pj-gustos { display: flex; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.gusto { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 99px; padding: 6px 14px 6px 8px; box-shadow: 0 3px 0 var(--rim); }
.gusto.nuevo { opacity: .65; }
.gusto .obj { width: 30px; height: 30px; }
.gusto .pips { display: flex; gap: 4px; align-items: center; min-width: 38px; }
.gusto .pips b { color: var(--soft); font-size: 16px; padding: 0 12px; }
.pip { width: 11px; height: 10px; background: #E6DAC4; clip-path: path('M5.5 10 C5.5 10 0 6.2 0 3 C0 1.2 1.3 0 3 0 C4.1 0 5 .6 5.5 1.5 C6 .6 6.9 0 8 0 C9.7 0 11 1.2 11 3 C11 6.2 5.5 10 5.5 10 Z'); }
.pip.on { background: #ff6f9a; }
.pj-camino { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.cas { position: relative; border: 3px solid transparent; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--rim); padding: 18px 2px 6px; min-height: 76px; cursor: pointer; font: inherit; color: var(--text); }
.cas > i { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font: 900 11px var(--font); font-style: normal; color: var(--soft); }
.cas .prs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; }
.cas .pr { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.cas .pr .gl { width: 28px; height: 28px; }
.cas .pr.bloqueado .gl { filter: grayscale(1) opacity(.45); }
.cas .pr.pendiente .gl { animation: bob 1.4s ease-in-out infinite; }
.cas.entregada { background: #F1F8EC; }
.cas.entregada::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.cas.pendiente { box-shadow: 0 0 0 3px var(--tint-2), 0 3px 0 var(--rim); }
.cas.bloqueada { background: #F6EFE2; box-shadow: none; }
.cas.sel { border-color: var(--night); }
.cas .q, .q-big { font: 900 24px var(--font); color: #b9ab94; font-style: normal; }
.cas .q { display: block; margin-top: 4px; }
.cas.oculta.entregada .q { color: var(--mint); }
.req { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 4px; border-radius: 99px; background: #ECE4FA; color: #8a6fe0; font: 900 11px var(--font); }
.req.ok { background: #DDF3E3; color: #2E7A4A; }
.req.big { font-size: 15px; padding: 4px 12px 4px 8px; }
.pj-cap { display: flex; gap: 14px; align-items: center; min-height: 64px; margin-top: 12px; background: var(--jelly-2); border-radius: 24px; padding: 10px 16px; }
.pj-cap:empty { display: none; }
.cap-n { width: 38px; height: 38px; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; font: 900 16px var(--font); flex: none; }
.cls { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 800; font-size: 15px; }
.cl .gl { width: 30px; height: 30px; }
.cl.bloqueado, .cl.pendiente { color: var(--soft); }
.cl q { flex: 1 1 100%; font-weight: 800; font-size: 15px; line-height: 1.35; quotes: none; color: var(--text); background: #fff; border-radius: 16px; padding: 8px 14px; }
.cl small { color: var(--soft); font-weight: 800; }
.mini { border: 0; border-radius: 99px; padding: 6px 14px; background: var(--night); color: #fff; font: 900 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.mini.gem { background: #3FA9C9; }
.empty-o.small { padding: 18px 10px; }
.empty-o.small i { width: 40px; height: 40px; border-radius: 16px; background: var(--jelly-2); }
@keyframes bob { 50% { transform: translateY(-3px); } }
@media (max-width: 700px) { .pj-camino { grid-template-columns: repeat(5, 1fr); } .me-heart { margin-right: 44px; } }

/* Inventario, gestos y compañía */
#invGrid .cards.items, #gestGrid .cards.items, #cmpGrid .cards.items { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.item-o .ing.big, .item-o .obj.big { margin: 8px 0 2px; }
.item-o.ges, .item-o.cmp { border: 3px solid transparent; cursor: pointer; padding-top: 12px; }
.item-o.cmp.on { border-color: var(--night); }
.item-o.cmp em { font-style: normal; font-size: 11px; font-weight: 900; color: var(--mint); }
.item-o.lock { min-height: 108px; justify-content: center; cursor: default; background: #F6EFE2; box-shadow: none; }
.item-o .q { font: 900 28px var(--font); color: #b9ab94; font-style: normal; }
.item-o.ges:hover, .item-o.cmp:hover { transform: translateY(-2px); }

/* Misiones: Historia y tablón */
.mission-empty.vacio { padding: 12px; }
.mission-empty.vacio i { display: block; margin: 0 auto; width: 46px; height: 46px; border-radius: 16px; background: var(--jelly-2); }
.tab-lock { display: grid; place-items: center; padding: 18px; }
.tab-lock i { width: 72px; height: 72px; border-radius: 24px; background: var(--jelly-2); display: grid; place-items: center; }
.tablon { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.sec { position: relative; background: #fff; border-radius: 24px; padding: 14px 14px 14px; box-shadow: 0 3px 0 var(--rim); display: flex; flex-direction: column; gap: 10px; }
.sec.vacia { min-height: 110px; background: #F6EFE2; box-shadow: none; }
.sec .pide { display: flex; align-items: center; gap: 12px; }
.sec .pide b { display: block; font-size: 15px; font-weight: 900; line-height: 1.2; }
.sec .pide .n { display: block; font: 900 13px var(--font); color: var(--soft); margin-top: 2px; }
.sec .flecha { height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #E6DAC4 0 8px, transparent 8px 14px); }
.sec .premio { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--jelly-2); border-radius: 99px; padding: 3px 10px 3px 7px; font: 900 13px var(--font); }
.sec .quien { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #5FB878; box-shadow: 0 0 0 3px #CFEBD7; font-style: normal; }
.sec .quien .gl { width: 18px; height: 18px; }
.sec.hecha { opacity: .6; }
.sec.hecha .quien { background: var(--mint); box-shadow: none; }
.sec.lista { box-shadow: 0 0 0 3px #5FB878, 0 3px 0 var(--rim); }

/* La mesa de mezcla */
#mesa { position: fixed; inset: 0; z-index: 7; display: grid; place-items: center; padding: 14px; background: rgba(20, 12, 50, 0.45); animation: fadeIn .2s; }
#mesa.hidden { display: none; }
.mesa-card { width: min(860px, 100%); max-height: 94vh; overflow: auto; padding: 18px 26px 22px; }
.mesa-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mesa-card h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 900; }
.mesa-body { display: flex; gap: 22px; align-items: flex-start; }
.mesa-main { flex: 1 1 auto; min-width: 0; }
.mesa-reg { width: 250px; flex: none; background: var(--jelly-2); border-radius: 28px; padding: 12px 12px 14px; align-self: stretch; }
.mesa-reg h3 { margin: 0 0 8px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
#mesaLog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow: auto; }
#mesaLog li { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: #fff; border-radius: 16px; padding: 5px 8px; cursor: pointer; box-shadow: 0 2px 0 var(--rim); }
#mesaLog li.mal { opacity: .6; }
#mesaLog li.vacio { height: 42px; background: transparent; box-shadow: none; cursor: default; }
#mesaLog .ings { display: inline-flex; gap: 1px; flex-wrap: wrap; }
#mesaLog .to { display: inline-flex; align-items: center; gap: 4px; font: 800 11px var(--font); text-align: right; }
#mesaLog .to em { font-style: normal; max-width: 84px; line-height: 1.1; }
#mesaSlots { display: flex; gap: 10px; justify-content: center; margin: 6px 0 12px; }
.slot { width: 62px; height: 62px; border-radius: 22px; border: 3px dashed var(--rim-2); background: var(--jelly-2); display: grid; place-items: center; padding: 0; }
.slot.need { border-color: #C9BA9C; }
.slot.full { border: 3px solid var(--rim); background: #fff; box-shadow: 0 3px 0 var(--rim); cursor: pointer; animation: slotIn .3s cubic-bezier(.3,1.7,.5,1); }
.slot .ing { width: 38px; height: 38px; }
@keyframes slotIn { from { transform: scale(.4); } }
.mesa-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; }
.mesa-actions button { --sq-fill: var(--tint); --sq-rim: #A94D39; --sq-shadow: #8C3E2E; --sq-drop: 4; border: 3px solid transparent; border-radius: 26px; padding: 12px 30px; color: #fff; font: 900 18px var(--font); cursor: pointer; }
.mesa-actions button:disabled { --sq-fill: #D9CDB6; --sq-rim: #D9CDB6; --sq-shadow: #C4B79C; color: #fff; cursor: default; }
.mesa-actions button.locked { --sq-fill: #8A8FA0; --sq-rim: #8A8FA0; --sq-shadow: #6a6f80; }
#mesaClear { padding: 12px 18px; --sq-fill: var(--jelly-2); --sq-rim: var(--jelly-2); --sq-shadow: var(--rim-2); color: var(--soft); }
#mesaClear:disabled { --sq-fill: var(--jelly-2); --sq-rim: var(--jelly-2); color: #C4B79C; }
#mesaResult { display: flex; justify-content: center; min-height: 104px; margin-bottom: 10px; }
.res { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 28px; padding: 10px 24px; box-shadow: 0 3px 0 var(--rim); font-size: 18px; font-weight: 900; align-self: center; position: relative; }
.res.vacio { width: 84px; height: 84px; padding: 0; background: var(--jelly-2); box-shadow: none; border-radius: 28px; }
.res.fallo { background: #F1ECE2; color: #7a6d58; }
.res em { position: absolute; top: -9px; right: -6px; font-style: normal; background: var(--tint-2); color: #5a3d00; padding: 2px 10px; border-radius: 99px; font-size: 12px; }
#mesaInv { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.ig { position: relative; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--rim); padding: 6px 8px; font: 800 12px var(--font); color: var(--text); cursor: pointer; text-align: left; line-height: 1.1; }
.ig:hover { transform: translateY(-2px); }
.ig span { flex: 1; min-width: 0; }
.ig b { flex: none; background: var(--night); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 12px; }
.ig.off { opacity: .4; }
@media (max-width: 700px) { .mesa-body { flex-direction: column; } .mesa-reg { width: 100%; } #mesaLog { max-height: 150px; } .slot { width: 52px; height: 52px; } }

/* ═════════ personajes en el mundo (src/personajes_mundo.js): chips de recolección y entrega de secundarias ═════════ */
.pj-pop {
  position: fixed; z-index: 7; pointer-events: none; display: flex; align-items: center; gap: 4px;
  transform: translate(-50%, -50%); padding: 3px 11px 3px 6px; border-radius: 999px;
  background: var(--panel); border: 2px solid var(--rim); box-shadow: 0 3px 0 var(--rim-2), 0 6px 14px rgba(40, 30, 70, .22);
  color: var(--text); font-weight: 800; font-size: 15px; animation: pjPop 1.3s cubic-bezier(.2, .8, .3, 1) forwards;
}
.pj-pop .ing { width: 24px; height: 24px; }
@keyframes pjPop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, -80%) scale(1.12); }
  32% { transform: translate(-50%, -90%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -230%) scale(1); }
}
.pj-entrega { position: fixed; z-index: 9; left: 50%; bottom: 112px; transform: translateX(-50%); pointer-events: none; }
.pj-ent-box { pointer-events: auto; --sq-fill: var(--panel); --sq-rim: var(--rim); --sq-shadow: var(--rim-2); --sq-drop: 5; display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-radius: 34px; color: var(--text); font: 900 18px var(--font); }
.pj-ent-pide { display: flex; align-items: center; gap: 8px; }
.pj-ent-pide b.falta { color: #c0533d; }
.pj-ent-premios { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; border-left: 3px solid #EFE4CF; padding-left: 14px; }
.pj-ent-pr { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--soft); }
.pj-ent-btns { display: flex; align-items: center; gap: 10px; }
.pj-ent-dar { --sq-fill: #3fb36a; --sq-rim: #2e8a50; --sq-shadow: #236a3d; --sq-drop: 4; border: 3px solid transparent; border-radius: 26px; width: 66px; height: 52px; display: grid; place-items: center; color: #fff; cursor: pointer; }
.pj-ent-dar .gl { width: 30px; height: 30px; }
.pj-ent-dar.off { --sq-fill: #bdb3a2; --sq-rim: #a79d8c; --sq-shadow: #8f8576; }
.pj-ent-luego { border: 0; background: var(--jelly-2); color: var(--soft); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font: 900 22px var(--font); }
.pj-ent-luego i::before { content: '\00d7'; font-style: normal; }
.pj-ent-luego .gl { display: none; }

/* ───── Hotel: el ascensor (src/hotel/ascensor_ui.js) ───── */
#ascensor { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 6;
  background: rgba(20, 12, 50, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .2s; }
#ascensor.hidden, #ascensor .hidden { display: none !important; }
.asc-card { width: min(560px, 100%); }
.asc-dial { width: 46px; height: 46px; border-radius: 50%; background: #F4E9D3; box-shadow: 0 0 0 4px #E3B65C, 0 4px 12px rgba(80,50,20,.2); position: relative; flex: 0 0 auto; }
.asc-dial i { position: absolute; left: 50%; bottom: 50%; width: 3px; height: 17px; margin-left: -1.5px; background: #2E2A38; border-radius: 2px; transform-origin: 50% 100%; animation: ascNeedle 3.2s ease-in-out infinite; }
@keyframes ascNeedle { 0%, 100% { transform: rotate(-60deg); } 50% { transform: rotate(60deg); } }
.asc-tabs b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #E3B65C; color: #2a1d4a; font-size: 12px; }
.asc-tabs b:empty { display: none; }
.asc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: min(46vh, 380px); overflow: auto; }
.asc-row { display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #fff; cursor: pointer;
  box-shadow: 0 2px 0 #f2e4cf, 0 4px 14px rgba(80, 50, 20, 0.07); color: var(--ink); }
.asc-row:hover { background: #fffdf8; transform: translateY(-1px); }
.asc-row.live { background: #F3FBF4; box-shadow: 0 0 0 2px #7FC98F, 0 4px 14px rgba(40, 120, 60, 0.12); }
.asc-row.here { box-shadow: 0 0 0 2px #E3B65C, 0 4px 14px rgba(80, 50, 20, 0.12); }
.asc-live { width: 12px; height: 12px; border-radius: 50%; background: #d8cdbd; }
.asc-row.live .asc-live { background: #3FAF5A; box-shadow: 0 0 0 0 rgba(63,175,90,.6); animation: ascPulse 1.6s infinite; }
@keyframes ascPulse { 70% { box-shadow: 0 0 0 8px rgba(63,175,90,0); } 100% { box-shadow: 0 0 0 0 rgba(63,175,90,0); } }
.asc-main { display: flex; flex-direction: column; min-width: 0; }
.asc-main b { font-weight: 900; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asc-main small { font-weight: 800; font-size: 12px; opacity: .55; }
.asc-size-tag { font-weight: 900; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: #F4E9D3; color: #8A5A3B; }
.asc-count { font-weight: 900; font-size: 13px; color: var(--soft); min-width: 82px; text-align: right; }
.asc-row.live .asc-count { color: #2F8A47; }
.asc-empty { padding: 22px 8px; text-align: center; font-weight: 800; opacity: .55; color: var(--ink); }
.asc-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.asc-foot button:not(.buy) { border: 0; border-radius: 999px; padding: 9px 18px; background: var(--jelly-2); color: var(--ink); font: 900 15px var(--font); cursor: pointer; }
.asc-crear { color: var(--ink); }
.asc-name { display: flex; align-items: center; gap: 12px; font-weight: 900; margin-bottom: 12px; }
.asc-name input { flex: 1; min-width: 0; border: 0; border-radius: 14px; padding: 10px 14px; background: #fff; font: 800 16px var(--font); color: var(--ink); box-shadow: inset 0 0 0 2px #EADBC0; user-select: text; -webkit-user-select: text; }
.asc-presets { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.asc-presets button { border: 0; border-radius: 14px; padding: 8px 14px; background: #fff; font: 900 14px var(--font); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; box-shadow: 0 2px 0 #f2e4cf; }
.asc-presets button small { font-weight: 800; opacity: .55; font-size: 11px; }
.asc-presets button.on { background: var(--ink-strong); color: #fff; }
.asc-gridwrap { display: flex; align-items: flex-end; gap: 16px; }
.asc-grid { --n: 14; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; width: min(300px, 70vw); aspect-ratio: 1; touch-action: none; cursor: crosshair;
  padding: 6px; border-radius: 14px; background: #EADBC0; }
.asc-grid i { border-radius: 3px; background: #fffaf2; }
.asc-grid i.min { background: #f6ecdc; }
.asc-grid i.on { background: #dca58a; }
.asc-grid i.on.hov { background: #E8BFA6; }
.asc-size { font-weight: 900; font-size: 28px; color: var(--ink); white-space: nowrap; }

/* Hotel: el editor de sala (pestaña Sala de decor.js) */
.sala-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--ink); font-weight: 900; flex-wrap: wrap; }
.sala-row > span:first-child { min-width: 70px; }
.sala-row input { border: 0; border-radius: 12px; padding: 7px 12px; background: #fff; font: 800 14px var(--font); color: var(--ink); box-shadow: inset 0 0 0 2px #EADBC0; user-select: text; -webkit-user-select: text; }
.sala-doors { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.sala-door { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 14px; padding: 6px 8px; font-weight: 800; font-size: 13px; }
.sala-door > span { flex: 1; }
.sala-door button, .sala-row > button, .sala-door select { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--jelly-2); color: var(--ink); font: 900 13px var(--font); cursor: pointer; }

/* Misión final: mientras alguien sigue a Blopsi, el selector de traje se apaga */
#skinGrid.bloqueado { opacity: .45; filter: saturate(.4); pointer-events: none; }

/* ───────── Corazones 3D del HUD (src/ui/corazones_hud.js) y color por traje ───────── */
#heartsCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }
#friendsBtn.llega { animation: friendsLlega .6s ease-out; }
@keyframes friendsLlega { 40% { transform: scale(1.3); } }

/* Los iconos siguen al traje (src/ui/acento.js) */
.round svg { color: var(--ink-ui); }
#action kbd { color: var(--ink-ui); }
.dlg-sig { border-top-color: var(--ink-ui); }

/* ═════════ La gelatina (docs/UI_AUDITORIA.md §5): un solo marco para todos los paneles ═════════ */
.shop-card, .decor-panel, #talk, .job-card, .tasks-card, .cheats-card, .panel, .mg-card, .mesa-card, .regalo-card {
  background: var(--panel); color: var(--text); border: 4px solid var(--rim); border-radius: 40px;
  box-shadow: 0 6px 0 var(--rim-2), 0 0 32px var(--glow), 0 30px 70px rgba(20, 16, 40, 0.35);
  backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25);
  animation: gelatina .5s cubic-bezier(.3, 1.45, .5, 1);
}
.shop-card .close, .job-card .close, .tasks-card .close, .cheats-card .close, .mesa-card .close { background: var(--jelly-2); color: var(--soft); }
.offer, .card-o, .item-o, .skin, .mission, .pal, .inv, .sec, .ig { background: rgba(255, 255, 255, 0.92); }
.decor-panel { max-height: 36vh; overflow: auto; overscroll-behavior: contain; }
/* Lo que se puede pulsar en el HUD también es gelatina: el corazón del perfil abre Personajes */
#meWrap .me-heart.on { cursor: pointer; pointer-events: auto; }

@keyframes gelatina { 0% { opacity: 0; transform: scale(.7, .5); } 55% { opacity: 1; transform: scale(1.03, .97); } 80% { transform: scale(.99, 1.01); } }

/* Lo que escribe Blopsi (sus notas de Misiones): aparece trazo a trazo */
.escrito { display: inline-block; font-style: normal; animation: escribe .9s steps(24, end) backwards; animation-delay: calc(.15s + var(--n, 0) * .25s); }
@keyframes escribe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .escrito,
  .shop-card, .decor-panel, #talk, .job-card, .tasks-card, .cheats-card, .panel, .mg-card, .mesa-card, .regalo-card { animation-duration: .01s; }
}
.skin em.como { display: inline-flex; align-items: center; gap: 3px; color: var(--soft); font-weight: 900; }
.buy .spark-ico { width: 20px; height: 20px; }
.buy .spark-ico::after { inset: 4px; }
.buy .candado { width: 14px; height: 16px; flex: none; background: currentColor; clip-path: path('M3 7V5a4 4 0 0 1 8 0v2h1.5a1.5 1.5 0 0 1 1.5 1.5v6a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 0 14.5v-6A1.5 1.5 0 0 1 1.5 7zM5 7h4V5a2 2 0 0 0-4 0z'); }

/* Misiones: fijar una arriba (panels.js, #misionFijada) */
.mission .pin { flex: none; width: 34px; height: 34px; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--jelly-2); color: #B4A994; cursor: pointer; }
.mission .pin .gl { width: 18px; height: 18px; }
.mission .pin.on { background: var(--c); color: #fff; }
.mission.fijada { box-shadow: 0 0 0 3px var(--c), 0 3px 0 var(--rim); }
#misionFijada { position: fixed; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translate(-50%, -8px); opacity: 0; pointer-events: none; z-index: 7;
  display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 150px)); padding: 6px 16px 6px 6px; border-radius: 16px;
  background: rgba(30, 20, 70, 0.62); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .4s ease, transform .4s ease; }
#misionFijada.on { opacity: 1; transform: translate(-50%, 0); }
#misionFijada img { width: 40px; height: 40px; border-radius: 12px; background: var(--c); flex: none; object-fit: cover; }
#misionFijada b { display: block; font-size: 12px; font-weight: 900; opacity: .75; }
#misionFijada span { display: block; font-size: 14px; font-weight: 800; line-height: 1.3; }
body.con-fijada #misionAviso { top: calc(max(12px, env(safe-area-inset-top)) + 62px); }
#misionFijada.pulso { animation: fijadaPulso .7s ease; }
@keyframes fijadaPulso { 0% { transform: translate(-50%, 0) scale(1); } 35% { transform: translate(-50%, 0) scale(1.06); } 100% { transform: translate(-50%, 0) scale(1); } }

/* ═════════ Lugares: Recetario, tablón de favores y misiones de lugar (src/ui/recetario.js, tablon.js, panels.js) ═════════ */
#recetarioBtn svg { color: #E2825A; }
.b-recetario { --tomo: #E88F6B; }
.rec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rec-head h2 { margin: 0; flex: 1; font-size: 20px; font-weight: 900; }
.rec-raza { width: 56px; height: 56px; border-radius: 18px; flex: none; display: grid; place-items: center; background: var(--c); box-shadow: inset 0 -5px 0 rgba(0,0,0,.14); }
.rec-raza img { width: 62px; height: 62px; margin-top: 4px; }
.rec-cuenta { font: 900 15px var(--font); background: var(--jelly-2); border-radius: 999px; padding: 4px 12px; color: var(--soft); }
.rec-cuenta b { color: var(--text); }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rec-card { position: relative; background: #fff; border: 0; border-radius: 20px; padding: 10px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 3px 0 var(--rim), inset 0 4px 0 color-mix(in srgb, var(--c) 55%, #fff); font: 800 13px var(--font); text-align: center; cursor: pointer; color: var(--text); }
.rec-card b { font-weight: 900; line-height: 1.15; }
.rec-obj { position: relative; width: 64px; height: 64px; }
.rec-obj svg { width: 100%; height: 100%; }
.rec-ings { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.ri { display: inline-flex; align-items: center; gap: 2px; background: var(--jelly-2); border-radius: 99px; padding: 2px 7px 2px 3px; font: 900 11px var(--font); }
.ri i { font-style: normal; }
.ri.ok { background: #DDF3E3; color: #2E7A4A; }
.ri.no { color: #A0524A; }
.rec-n { position: absolute; top: 8px; right: 8px; background: var(--night); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-style: normal; font-weight: 900; }
.rec-card.oculta { background: #F6EFE2; box-shadow: none; cursor: default; min-height: 118px; justify-content: flex-start; }
.rec-obj.sil svg { filter: brightness(0) opacity(.16); }
.rec-obj.sil .q { position: absolute; inset: 0; display: grid; place-items: center; font: 900 30px var(--font); color: #B9AB94; font-style: normal; }
.rec-card.oculta q { font: 700 11px/1.3 var(--font); color: var(--soft); quotes: none; }
.rec-card.oculta q::before { content: "“"; } .rec-card.oculta q::after { content: "”"; }

#tablonPanel { position: fixed; inset: 0; z-index: 7; display: grid; place-items: center; padding: 14px; background: rgba(20, 12, 50, 0.45); animation: fadeIn .2s; }
#tablonPanel.hidden { display: none; }
.tb-card { width: min(780px, 100%); max-height: 94vh; overflow: auto; padding: 18px 22px 22px; }
.tb-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tb-card h2 { margin: 0; flex: 1; }
.tb-ico .gl { color: var(--tint); }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.sec.favor { display: grid; grid-template-columns: 58px 1fr; gap: 8px 12px; align-items: center; padding-right: 58px; }
.sec.favor .fv-cara { grid-row: 1 / 4; width: 58px; height: 58px; border-radius: 18px; background: var(--c); padding-top: 4px; object-fit: contain; box-shadow: inset 0 -5px 0 rgba(0,0,0,.14); align-self: start; }
.sec.favor.raro { box-shadow: 0 0 0 3px var(--tint-2), 0 3px 0 var(--rim); }
.sec.favor .chip.raro { background: #FFE9A8; color: #A56A00; }
.sec.favor.curso.lista { box-shadow: 0 0 0 3px #5FB878, 0 3px 0 var(--rim); }
.sec.favor.curso .quien { background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, #fff); }
.fv-coger { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #5FB878; color: #fff; cursor: pointer; padding: 0; --sq-fill: #5FB878; --sq-rim: #4A9C62; --sq-shadow: #3D8250; }
.fv-coger .gl { width: 24px; height: 24px; }
.mission .badge.lugar { color: #fff; }
.mission .badge.lugar .gl { width: 34px; height: 34px; }
#misionFijada .lugar { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; }
#misionFijada .lugar .gl { width: 28px; height: 28px; }

/* ═════════ Trato con los especiales (src/trato.js): inventario de regalos y corazones sobre su cabeza ═════════ */
#regalo { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(40, 30, 70, .18); }
#regalo.hidden { display: none; }
.regalo-card { width: min(520px, calc(100vw - 24px)); max-height: 78vh; overflow: auto; overscroll-behavior: contain; padding: 14px 16px 16px; }
.regalo-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 10px; }
.regalo-head img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 3px 0 var(--rim); }
.regalo-head .dots { display: flex; gap: 6px; }
.regalo-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--jelly-2); color: var(--soft); font: 900 24px/1 var(--font); cursor: pointer; }
.regalo-grid { margin-bottom: 0; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.regalo-grid .it .obj { width: 56px; height: 56px; }
.regalo-nada { display: grid; place-items: center; padding: 26px 0 30px; background: var(--jelly-2); border-radius: 24px; }
.regalo-vacio { width: 120px; height: 100px; animation: bob 2.4s ease-in-out infinite; }
.bubble.regalo-bub { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 26px; z-index: 5; }
.bubble.regalo-bub .heart { transform: scale(1.8); margin: 0 5px; animation: heartPop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes heartPop { 0% { transform: scale(0); } 60% { transform: scale(2.3); } 100% { transform: scale(1.8); } }

/* Online: la lista de amigos (src/ui/panels.js, createFriends) */
.amigo-o { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: #fff; border: 3px solid var(--rim); color: var(--text); }
.amigo-o > i { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); opacity: .55; }
.amigo-o.on > i { opacity: 1; }
.amigo-o > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.amigo-o b { font: 900 16px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amigo-o span { font: 700 13px var(--font); color: var(--soft); }
.amigo-o button { border: 0; border-radius: 999px; padding: 8px 14px; background: var(--mint); color: #fff; font: 900 14px var(--font); cursor: pointer; box-shadow: 0 3px 0 #356049; }
.amigo-o button.x { background: none; box-shadow: none; color: var(--soft); font-size: 20px; padding: 4px 6px; }
.amigo-o { cursor: pointer; }
.amigo-o.sel { border-color: var(--tint-2, #8a6fe0); }
.bloq-tit { list-style: none; padding: 8px 12px 2px; font: 900 14px var(--font); color: var(--soft); cursor: pointer; user-select: none; }
.bloq-tit::after { content: "▸"; display: inline-block; margin-left: 6px; transition: transform .15s; }
.bloq-tit.abierto::after { transform: rotate(90deg); }
.amigo-o.bloq { cursor: default; }
.amigo-o.bloq button { background: var(--jelly-2); color: var(--text); box-shadow: 0 3px 0 var(--rim); }
.dm-log.con { display: flex; flex-direction: column; gap: 6px; place-items: initial; padding: 8px; overflow-y: auto; max-height: 240px; }
.dm-log p { margin: 0; align-self: flex-start; max-width: 85%; padding: 6px 10px; border-radius: 14px; background: #fff; font: 700 14px var(--font); color: var(--text); overflow-wrap: anywhere; }
.dm-log p.mio { align-self: flex-end; background: var(--mint); color: #fff; }
.dm-vacio { font: 800 13px var(--font); color: var(--soft); }
.dm-input button:not(:disabled) { background: var(--mint); cursor: pointer; }
