/* ================= Ansem Hotel ================= */

:root {
  --bg: #0c0915;
  --bg2: #16102a;
  --panel: rgba(26, 20, 42, .82);
  --panel-solid: #1a142a;
  --stroke: rgba(255, 255, 255, .10);
  --stroke-hi: rgba(255, 255, 255, .22);
  --text: #f0ebfa;
  --dim: #a99fc9;
  --acc: #e0389c;
  --acc2: #2fd3e8;
  --gold: #e8bd4a;
  --lime: #9fe23a;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Grotesk', ui-monospace, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font-family: inherit; }
h1, h2, h3 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, .08);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: .9em;
}

/* ---------------- botoes ---------------- */

.btn {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, .11); border-color: var(--stroke-hi); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(135deg, var(--acc), #a12ec6);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(224, 56, 156, .34);
}
.btn--primary:hover { filter: brightness(1.09); background: linear-gradient(135deg, var(--acc), #a12ec6); }
.btn--x {
  background: #f4f2f7;
  color: #12101a;
  border-color: transparent;
  font-weight: 600;
}
.btn--x:hover { background: #fff; }
.btn--big { width: 100%; padding: 14px 18px; font-size: 15px; border-radius: 13px; }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn--ghost { background: rgba(255, 255, 255, .04); }

/* ================= LOGIN ================= */

.login {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 24px 16px 0;
  overflow: auto;
}
.login__bg { position: fixed; inset: 0; z-index: 0; }
.login__bg canvas { width: 100%; height: 100%; display: block; }

.login__card {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 0;
  background: linear-gradient(160deg, rgba(34, 25, 56, .88), rgba(16, 12, 28, .92));
  border: 1px solid var(--stroke);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
  margin: auto 0;
}

.login__left {
  padding: 34px 30px;
  border-right: 1px solid var(--stroke);
  background:
    radial-gradient(600px 300px at 10% 0%, rgba(224, 56, 156, .20), transparent 65%),
    radial-gradient(500px 320px at 90% 100%, rgba(47, 211, 232, .16), transparent 60%);
  display: flex;
  flex-direction: column;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand__mark { color: var(--gold); filter: drop-shadow(0 4px 14px rgba(232, 189, 74, .4)); }
.brand h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1;
  display: flex;
  flex-direction: column;
}
.brand h1 span {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .42em;
  color: var(--acc2);
  margin-top: 3px;
}
.brand__tag {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.55;
  margin: 16px 0 6px;
  max-width: 42ch;
}

.preview {
  position: relative;
  flex: 1;
  min-height: 300px;
  display: grid;
  place-items: center;
  margin-top: 4px;
}
.preview canvas { position: relative; z-index: 1; }
.preview__floor {
  position: absolute;
  bottom: 34px;
  width: 190px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(224, 56, 156, .32), transparent 68%);
  filter: blur(3px);
}
.preview__spin { position: absolute; right: 0; bottom: 8px; font-size: 12px; padding: 6px 11px; }
.preview__actions { display: flex; gap: 10px; }
.preview__actions .btn { flex: 1; }

.login__right { padding: 34px 30px; display: flex; flex-direction: column; gap: 20px; }
.login__panel h2 { font-size: 21px; font-weight: 600; margin-bottom: 16px; }

.field { display: block; margin-bottom: 6px; }
.field span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--dim);
  margin-bottom: 7px;
  font-weight: 500;
}
.field input {
  width: 100%;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
  padding: 13px 15px;
  font-size: 16px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(224, 56, 156, .18);
}
.hint { color: var(--dim); font-size: 12px; margin: 0 0 16px; }
.hint--center { text-align: center; margin-top: 10px; }

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.or::before, .or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--stroke);
}

.login__err {
  margin-top: 14px;
  background: rgba(226, 58, 78, .14);
  border: 1px solid rgba(226, 58, 78, .4);
  color: #ffb9c2;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 13px;
}

.login__rooms { border-top: 1px solid var(--stroke); padding-top: 18px; margin-top: auto; }
.login__rooms h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--dim);
  margin-bottom: 12px;
  font-weight: 500;
}
.login__rooms li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--stroke);
  margin-bottom: 7px;
  font-size: 13.5px;
}
.login__rooms b { font-weight: 500; }
.login__rooms em {
  font-style: normal;
  color: var(--acc2);
  font-family: var(--mono);
  font-size: 12px;
}

.login__foot {
  position: relative;
  z-index: 1;
  color: rgba(169, 159, 201, .6);
  font-size: 11.5px;
  padding: 18px 0 16px;
  letter-spacing: .04em;
}

/* ================= JOGO ================= */

.game {
  position: fixed;
  inset: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* an auto column would be sized by content and overflow narrow screens */
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 56px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(30, 22, 50, .95), rgba(18, 13, 32, .92));
  border-bottom: 1px solid var(--stroke);
  z-index: 5;
}
.topbar__left { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 0 1 auto; }
.topbar__logo { color: var(--gold); display: flex; }
.topbar__room { display: flex; flex-direction: column; min-width: 0; }
.topbar__room strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 26ch;
}
.topbar__room span {
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34ch;
}

.nav {
  display: flex;
  gap: 6px;
  margin: 0 auto;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: center;
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button { flex: 0 0 auto; }
.nav button {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .04);
  color: var(--dim);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all .16s ease;
}
.nav button:hover { color: var(--text); background: rgba(255, 255, 255, .1); }
.nav button.is-active {
  color: #0b0714;
  background: linear-gradient(135deg, var(--acc2), #66e6ff);
  border-color: transparent;
  font-weight: 600;
}
.nav button i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  opacity: .75;
  background: rgba(0, 0, 0, .25);
  border-radius: 999px;
  padding: 1px 6px;
}
.nav button.is-active i { background: rgba(0, 0, 0, .18); opacity: .9; }

.topbar__right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--dim);
  padding-right: 4px;
}
.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
.status.is-off i { background: #e23a4e; box-shadow: 0 0 10px #e23a4e; }

/* ---------------- palco ---------------- */

.stage { position: relative; overflow: hidden; min-width: 0; }
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  touch-action: none;
}

.panel {
  position: absolute;
  bottom: 14px;
  width: 258px;
  max-height: min(46vh, 340px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 3;
}
.panel--left { left: 14px; }
.panel--right { right: 14px; width: 208px; }
.panel.is-collapsed { max-height: 38px; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--dim);
  border-bottom: 1px solid var(--stroke);
  flex: 0 0 auto;
}
.panel__head b { color: var(--acc2); font-weight: 600; }
.panel__toggle {
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.panel__toggle:hover { color: var(--text); }

.log { overflow-y: auto; padding: 10px 13px; display: flex; flex-direction: column; gap: 7px; }
.log__line { font-size: 13.2px; line-height: 1.45; word-break: break-word; }
.log__line b { font-weight: 600; }
.log__line--sys { color: var(--acc2); font-size: 12.4px; font-style: italic; }
.log__line--me i { color: #c7b7f0; font-style: italic; }
.log__line--shout b, .log__line--shout { color: var(--gold); }

.people { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.people li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 13.2px;
  cursor: default;
}
.people li:hover { background: rgba(255, 255, 255, .06); }
.people li.is-me { background: rgba(47, 211, 232, .12); }
.people canvas { border-radius: 7px; flex: 0 0 auto; }
.people .tagx {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: #f4f2f7;
  color: #12101a;
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: auto;
}

.toast {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 10, 24, .92);
  border: 1px solid var(--stroke-hi);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  z-index: 6;
  box-shadow: var(--shadow);
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ---------------- dock ---------------- */

.dock {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: linear-gradient(0deg, rgba(28, 20, 46, .96), rgba(18, 13, 32, .9));
  border-top: 1px solid var(--stroke);
  z-index: 5;
}
.emotes { display: flex; gap: 5px; flex-wrap: wrap; }
.emotes button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .045);
  font-size: 17px;
  cursor: pointer;
  transition: transform .12s, background .16s;
  line-height: 1;
}
.emotes button:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }
.emotes button.is-on {
  background: linear-gradient(135deg, var(--acc), #a12ec6);
  border-color: transparent;
}

.say { flex: 1; display: flex; gap: 9px; }
.say input {
  flex: 1;
  background: rgba(0, 0, 0, .34);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
  padding: 11px 15px;
  font-size: 14.5px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.say input:focus { border-color: var(--acc2); box-shadow: 0 0 0 3px rgba(47, 211, 232, .16); }

/* ================= MODAL / EDITOR ================= */

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 4, 12, .72); backdrop-filter: blur(5px); }
.modal__box {
  position: relative;
  width: min(760px, 100%);
  max-height: min(90vh, 660px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(36, 27, 58, .97), rgba(19, 14, 32, .98));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--stroke);
}
.modal__head h2 { font-size: 18px; font-weight: 600; }
.modal__close {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--text); }
.modal__body { display: grid; grid-template-columns: 250px 1fr; gap: 0; overflow: hidden; flex: 1; }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--stroke);
}

.editor__preview {
  padding: 16px;
  border-right: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: radial-gradient(300px 260px at 50% 40%, rgba(224, 56, 156, .14), transparent 70%);
}
.editor__preview canvas { flex: 1; min-height: 0; }
.editor__dirs { display: flex; align-items: center; gap: 12px; }
.editor__dirs button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
}
.editor__dirs button:hover { background: rgba(255, 255, 255, .12); }
.editor__dirs span {
  font-size: 11.5px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .12em;
  min-width: 74px;
  text-align: center;
}

.editor__controls { display: flex; flex-direction: column; overflow: hidden; }
.tabs {
  display: flex;
  gap: 5px;
  padding: 14px 16px 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--stroke);
}
.tabs button {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .04);
  color: var(--dim);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .16s;
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active {
  background: rgba(255, 255, 255, .14);
  color: var(--text);
  border-color: var(--stroke-hi);
  font-weight: 500;
}

.swatches {
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 9px;
  align-content: start;
}
.swatch {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  padding: 9px 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-size: 11.5px;
  transition: all .15s;
  text-align: center;
}
.swatch:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.swatch.is-on {
  border-color: var(--acc2);
  background: rgba(47, 211, 232, .14);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(47, 211, 232, .35);
}
.swatch .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .35);
}
.swatch .chip {
  width: 34px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .07);
  display: grid;
  place-items: center;
  font-size: 15px;
}

/* ================= responsivo ================= */

/* ================= TOUCH CONTROLS ================= */

.btn--icon { display: none; padding: 7px 10px; font-size: 15px; line-height: 1; }

.soonchip {
  display: inline-block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2a1f06;
  background: linear-gradient(135deg, var(--gold), #f7d98a);
  border-radius: 999px;
  padding: 3px 10px;
}

.pad {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 132px;
  height: 132px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  z-index: 3;
  touch-action: none;
}
.pad__btn {
  border: 1px solid var(--stroke-hi);
  background: rgba(20, 15, 34, .72);
  color: var(--text);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-user-select: none;
  user-select: none;
}
.pad__btn:active { background: var(--acc); border-color: transparent; }
.pad__up { grid-area: 1 / 2; }
.pad__left { grid-area: 2 / 1; }
.pad__right { grid-area: 2 / 3; }
.pad__down { grid-area: 3 / 2; }

.pad__fire {
  position: absolute;
  right: 18px;
  bottom: 34px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--acc), #a12ec6);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 8px 24px rgba(224, 56, 156, .4);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.pad__fire:active { filter: brightness(1.15); }

/* ================= RESPONSIVE ================= */

@media (max-width: 1150px) {
  .stats__xp { display: none; }
}

@media (max-width: 900px) {
  .topbar__logo { display: none; }
  .status span { display: none; }
  .status { padding-right: 0; }
  .topbar__room strong { max-width: 14ch; }
  .topbar .btn--sm { padding: 7px 9px; font-size: 12px; }

  .login__card { grid-template-columns: 1fr; }
  .login__left { border-right: none; border-bottom: 1px solid var(--stroke); padding: 24px 20px; }
  .login__right { padding: 24px 20px; }
  .preview { min-height: 250px; }

  .modal__body { grid-template-columns: 1fr; }
  .editor__preview { border-right: none; border-bottom: 1px solid var(--stroke); flex-direction: row; }
  .editor__preview canvas { width: 128px; height: 160px; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); padding: 12px; }

  .topbar { flex-wrap: wrap; padding: 8px 10px; row-gap: 8px; gap: 10px; }
  .topbar__left { flex: 1; min-width: 0; }
  .topbar__right { margin-left: auto; }
  .topbar__room span { display: none; }
  .btn--icon { display: inline-flex; }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { padding: 8px 14px; }

  /* both panels stay reachable, folded down to their title bar by default */
  .panel { width: calc(50% - 20px); max-height: 30vh; bottom: 10px; }
  .panel--left { left: 10px; }
  .panel--right { right: 10px; width: calc(50% - 20px); display: flex; }
  .panel.is-collapsed { max-height: 36px; }
  .panel__head { padding: 9px 11px; font-size: 11px; }
  .panel__toggle { font-size: 20px; padding: 0 6px; }

  .dock { flex-wrap: wrap; gap: 8px; padding: 9px 10px; }
  .say { order: -1; width: 100%; }
  .say input { font-size: 16px; }
  .emotes { width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .emotes::-webkit-scrollbar { display: none; }
  .emotes button { width: 42px; height: 42px; font-size: 19px; flex: 0 0 auto; }

  .modal { padding: 10px; }
  .modal__box--game { width: 100%; max-height: 94dvh; }
  .modal__head { padding: 13px 16px; }
  .arena {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .arena canvas { width: 100%; max-height: 46dvh; }
  /* the pads sit under the screen on a phone instead of covering it */
  .arena canvas { order: 0; }
  .arena__result { position: static; transform: none; order: 1; }
  .pad { position: static; order: 2; width: 126px; height: 126px; }
  .pad__fire { position: static; order: 3; width: 108px; height: 62px; border-radius: 16px; }
  .arena__foot { flex-direction: column; align-items: stretch; gap: 9px; }
  .arena__actions { display: flex; }
  .arena__actions .btn { flex: 1; padding: 13px 16px; }
  .arena__hint { text-align: center; }
  .arena__result { bottom: 14px; padding: 8px 14px; }
}

@media (max-width: 560px) {
  .topbar { gap: 8px; }
  .stats__bar { display: none; }
  .topbar__room strong { max-width: 10ch; }
  .nav button { font-size: 12.5px; }
  .stats { padding: 4px 9px 4px 8px; gap: 6px; }
  .stats__bar { width: 34px; }
  .panel { max-height: 26vh; }
  .log__line { font-size: 12.6px; }
  .people li { font-size: 12.6px; }
  .pad { width: 116px; height: 116px; left: 12px; bottom: 12px; }
  .pad__fire { width: 74px; height: 74px; right: 12px; bottom: 26px; font-size: 11px; }
}

/* landscape phones: the room needs every pixel of height it can get */
@media (max-height: 520px) and (orientation: landscape) {
  .panel { max-height: 44vh; }
  .arena canvas { max-height: 58dvh; }
  .emotes button { width: 36px; height: 36px; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .22); }

/* ================= LEVEL / COINS ================= */

.stats {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  font-size: 12px;
  white-space: nowrap;
}
.stats__lv {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--dim);
}
.stats__lv b { color: var(--gold); font-size: 13px; margin-left: 2px; }
.stats__bar {
  width: 62px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
  flex: 0 0 auto;
}
.stats__bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--acc2), var(--lime));
  transition: width .45s ease;
}
.stats__xp { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.stats__coins { color: var(--gold); font-family: var(--mono); font-size: 12px; }
.stats__coins b { color: var(--text); margin-left: 2px; }
.stats.is-gain { animation: statPop .5s ease; }
@keyframes statPop {
  40% { transform: scale(1.06); border-color: var(--gold); }
}

.people li .lv {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(232, 189, 74, .9);
  color: #2a1f06;
  border-radius: 5px;
  padding: 1px 4px;
  flex: 0 0 auto;
}

/* ================= MINIGAMES ================= */

.modal__box--game { width: min(620px, 100%); }
.gamehead h2 { font-size: 18px; font-weight: 600; }
.gamehead p { margin: 3px 0 0; font-size: 12.5px; color: var(--dim); }

.arena {
  position: relative;
  padding: 16px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(420px 260px at 50% 40%, rgba(224, 56, 156, .12), transparent 70%),
    rgba(0, 0, 0, .3);
}
.arena canvas {
  width: min(100%, 520px);
  aspect-ratio: 3 / 2;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #0b0916;
  touch-action: none;
  cursor: crosshair;
  image-rendering: pixelated;
}
.arena__result {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(10, 8, 20, .92);
  border: 1px solid rgba(232, 189, 74, .5);
  border-radius: 12px;
  padding: 9px 20px;
  box-shadow: var(--shadow);
  animation: toastIn .3s ease;
}
.arena__result strong { font-size: 14px; }
.arena__result span { font-family: var(--mono); font-size: 12.5px; color: var(--gold); }

.arena__foot { justify-content: space-between; align-items: center; gap: 12px; }
.arena__hint { font-size: 12px; color: var(--dim); font-family: var(--mono); }
.arena__actions { display: flex; gap: 10px; }

@media (max-width: 900px) {
  .stats__xp { display: none; }
}
@media (max-width: 700px) {
  .stats__bar { width: 40px; }
  .arena { padding: 10px; }
  .arena__foot { flex-direction: column; align-items: stretch; }
  .arena__actions .btn { flex: 1; }
}


/* ================= CONTRACT ADDRESS ================= */

.ca {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  padding: 7px 9px 7px 7px;
  border: 1px solid rgba(232, 189, 74, .38);
  border-radius: 999px;
  background: rgba(232, 189, 74, .09);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: background .16s ease, border-color .16s ease, transform .12s ease;
  align-self: flex-start;
  max-width: 100%;
}
.ca:hover { background: rgba(232, 189, 74, .16); border-color: rgba(232, 189, 74, .6); }
.ca:active { transform: translateY(1px); }
.ca__label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #2a1f06;
  background: var(--gold);
  border-radius: 999px;
  padding: 3px 8px;
  flex: 0 0 auto;
}
.ca code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: none;
  padding: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca__copy {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  flex: 0 0 auto;
}
.ca.is-copied { border-color: var(--lime); background: rgba(159, 226, 58, .14); }
.ca.is-copied .ca__copy { color: var(--lime); }

.ca--mini { margin: 0; padding: 4px 10px 4px 4px; }
.ca--mini code { font-size: 11.5px; }

@media (max-width: 1250px) { .ca--mini { display: none; } }
