* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfeaff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #2b2a33;
  user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }

#brand { position: absolute; top: 12px; left: 12px; display: flex; gap: 10px; align-items: center;
  background: #ffffffd9; padding: 8px 14px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 4px 14px #0002; pointer-events: none; }
#brand b { letter-spacing: .5px; color: #e8553d; }

#objective { position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  max-width: min(92vw, 520px); text-align: center; background: #2b2a33e6; color: #fff;
  padding: 9px 16px; border-radius: 14px; font-size: 14px; line-height: 1.35;
  box-shadow: 0 4px 14px #0003; pointer-events: none; }

#action { position: absolute; right: 18px; bottom: 34px; border: 0; border-radius: 999px;
  padding: 16px 22px; font-size: 16px; font-weight: 700; color: #fff; background: #e8553d;
  box-shadow: 0 6px 0 #a93a28, 0 10px 20px #0004; cursor: pointer; }
#action:active { transform: translateY(4px); box-shadow: 0 2px 0 #a93a28; }

#joy { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  background: #ffffff55; border: 2px solid #ffffffaa; pointer-events: none !important; }
#knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: #fffffff0; box-shadow: 0 3px 10px #0004; }

#dialog { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%);
  width: min(92vw, 480px); background: #fffdf8; border-radius: 18px; padding: 16px 18px;
  box-shadow: 0 10px 30px #0005; border: 3px solid #2b2a33; }
#dlgName { font-weight: 800; color: #e8553d; margin-bottom: 6px; }
#dlgText { font-size: 15px; line-height: 1.45; }
#dlgBtns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
#dlgBtns button { border: 0; border-radius: 12px; padding: 10px 16px; font-size: 15px; font-weight: 700; cursor: pointer; }
#dlgCancel { background: #e9e4da; color: #2b2a33; }
#dlgOk { background: #2f9e6e; color: #fff; }

#start { position: fixed; inset: 0; display: grid; place-items: center;
  background: linear-gradient(160deg, #ffd9a8cc, #9fd3ffcc); backdrop-filter: blur(6px); }
.card { background: #fffdf8; border: 3px solid #2b2a33; border-radius: 24px; padding: 28px 30px;
  width: min(90vw, 380px); text-align: center; box-shadow: 0 14px 0 #2b2a3322; }
.card h1 { margin: 0; font-size: 54px; letter-spacing: 2px; color: #e8553d; }
.sub { margin: 4px 0 16px; font-weight: 600; }
#help { font-size: 14px; line-height: 1.5; color: #55535f; min-height: 3em; }
#enter { margin-top: 10px; border: 0; border-radius: 999px; padding: 14px 40px; font-size: 18px;
  font-weight: 800; color: #fff; background: #e8553d; box-shadow: 0 6px 0 #a93a28; cursor: pointer; }
#enter:active { transform: translateY(4px); box-shadow: 0 2px 0 #a93a28; }

#jump { position: absolute; right: 22px; bottom: 104px; width: 58px; height: 58px; border: 0; border-radius: 50%;
  font-size: 26px; font-weight: 800; color: #fff; background: #2f9e8f; box-shadow: 0 5px 0 #1f6e63, 0 8px 16px #0004; cursor: pointer; }
#jump:active { transform: translateY(4px); box-shadow: 0 1px 0 #1f6e63; }
#heroes { display: flex; gap: 10px; justify-content: center; margin: 4px 0 12px; }
.hero { flex: 1; border: 3px solid #d9d2c4; background: #fff; border-radius: 16px; padding: 10px 6px; cursor: pointer; font: inherit; color: #2b2a33; }
.hero b { display: block; font-size: 18px; } .hero span { font-size: 12px; color: #77747f; }
.hero.on { border-color: #e8553d; background: #fff1ec; box-shadow: 0 4px 0 #e8553d55; }
#start { background: linear-gradient(160deg, #ffd9a855, #9fd3ff55); backdrop-filter: none; align-items: end; padding-bottom: 4vh; }
.card { padding: 18px 22px; }
.card h1 { font-size: 40px; }

/* ---- comercio ---- */
#topbtns { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
#topbtns button { border: 0; border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 700; background: #ffffffe6; color: #2b2a33; box-shadow: 0 4px 14px #0002; cursor: pointer; }
#btnCart.full { background: #e8553d; color: #fff; }
#objective { top: 62px; }
#toast { position: absolute; left: 50%; top: 112px; transform: translateX(-50%); background: #fffdf8; border: 2px solid #2b2a33; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px #0003; pointer-events: none; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
#panel { position: absolute; inset: 0; background: #2b2a3366; display: flex; align-items: flex-end; justify-content: center; user-select: text; -webkit-user-select: text; }
#panelBox { width: min(100%, 520px); max-height: 86%; background: #fffdf8; border-radius: 22px 22px 0 0; border: 3px solid #2b2a33; border-bottom: 0; display: flex; flex-direction: column; box-shadow: 0 -10px 40px #0005; }
@media (min-width: 700px) { #panel { align-items: center; } #panelBox { border-radius: 22px; border-bottom: 3px solid #2b2a33; max-height: 82%; } }
#panelHead { display: flex; align-items: center; padding: 14px 16px 10px; gap: 10px; }
#panelHead b { flex: 1; font-size: 19px; color: #e8553d; }
#panelClose { border: 0; background: #e9e4da; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; }
#panelBody { overflow-y: auto; padding: 0 16px 14px; -webkit-overflow-scrolling: touch; }
#panelFoot { padding: 10px 16px 16px; border-top: 2px solid #eee6d6; display: flex; gap: 8px; }
#panel button, #panel .wa { border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; background: #e9e4da; color: #2b2a33; text-decoration: none; text-align: center; }
#panel button.primary { background: #e8553d; color: #fff; flex: 1; padding: 13px; font-size: 16px; }
#panel button.ghost { background: none; border: 2px solid #ddd5c5; }
#panel .wa { display: block; background: #25a55a; color: #fff; margin: 10px 0; }
#panel button:disabled { opacity: .6; }
.psub, .note, .empty { color: #6b6877; font-size: 13px; margin: 0 0 12px; line-height: 1.45; }
.empty { padding: 24px 0; text-align: center; font-size: 15px; }
.note.warn { color: #9a3a22; font-weight: 700; }
.prod { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #eee6d6; }
.pimg { width: 84px; height: 84px; border-radius: 14px; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; font-size: 38px; font-weight: 900; }
.pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pinfo small { color: #6b6877; font-size: 13px; }
.prow { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.prow strong { font-size: 17px; } .prow em { color: #9a3a22; font-style: normal; font-weight: 700; }
#panel .prow button { background: #2f9e6e; color: #fff; }
#panelBody h4 { margin: 14px 0 4px; font-size: 15px; }
.line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #eee6d6; }
.line > span { flex: 1; min-width: 0; } .line small { display: block; color: #6b6877; }
.qty { display: flex; align-items: center; gap: 8px; } #panel .qty button { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 18px; }
.total { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 6px; border-top: 2px solid #2b2a33; margin-top: 8px; font-size: 16px; }
.total strong { font-size: 20px; color: #e8553d; }
#orderForm label { display: block; font-size: 12px; font-weight: 700; color: #6b6877; margin-bottom: 10px; }
#orderForm input, #orderForm select { display: block; width: 100%; margin-top: 4px; padding: 11px; border: 2px solid #ddd5c5; border-radius: 10px; font: inherit; font-size: 16px; background: #fff; color: #2b2a33; }
#orderForm .primary { width: 100%; }
.drow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eee6d6; }
.drow i { width: 14px; height: 38px; border-radius: 6px; flex: none; } .drow span { flex: 1; min-width: 0; } .drow small { display: block; color: #6b6877; font-size: 12px; }
.rentbox { margin-top: 14px; background: #e2f6f3; border: 2px solid #2f9e8f; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
#panel .rentbox button { background: #2f9e8f; color: #fff; align-self: flex-start; }
.perks { padding-left: 20px; line-height: 1.6; margin: 8px 0; }
.done { background: #f1ead9; border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.done code { background: #fff; padding: 2px 6px; border-radius: 6px; font-weight: 700; }

/* ---- multijugador ---- */
#emotes { position: absolute; right: 22px; bottom: 172px; display: flex; align-items: center; gap: 8px; }
#emotes button { width: 46px; height: 46px; border: 0; border-radius: 50%; font-size: 21px; font-weight: 800; background: #fffffff0; color: #2b2a33; box-shadow: 0 4px 12px #0003; cursor: pointer; }
#emoRow { display: flex; gap: 8px; background: #2b2a33cc; padding: 6px; border-radius: 999px; }
#emoRow button[data-emo="1"] { color: #e8557d; } #emoRow button[data-emo="2"] { color: #2f9e8f; } #emoRow button[data-emo="3"] { color: #e8553d; }
#nick { width: 100%; padding: 11px 12px; border: 3px solid #d9d2c4; border-radius: 14px; font: inherit; font-size: 16px; text-align: center; margin-bottom: 8px; background: #fff; color: #2b2a33; user-select: text; -webkit-user-select: text; }
#online { color: #2f9e8f; font-weight: 700; }

#pets { display: flex; gap: 6px; margin-bottom: 8px; }
#pets button { flex: 1; border: 2px solid #d9d2c4; background: #fff; border-radius: 999px; padding: 7px 4px; font: inherit; font-size: 13px; font-weight: 700; color: #2b2a33; cursor: pointer; }
#pets button.on { border-color: #2f9e8f; background: #e2f6f3; }
