#menu {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: linear-gradient(#bfe3efcc, #f2b63288);
}
#menu .card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 24px;
  width: min(420px, 100%);
  box-shadow: 0 8px 0 #0003;
}
#menu h1 {
  margin: 0 0 4px;
  font-size: 34px;
  line-height: 1.1;
}
#menu p {
  margin: 0 0 16px;
  color: #6b665c;
}
#menu input {
  font: inherit;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #d8cfbb;
  margin: 6px 0 14px;
}
#colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 18px;
}
#looks {
  display: flex;
  gap: 8px;
  margin: 6px 0 14px;
}
#looks button {
  flex: 1;
  border: 3px solid transparent;
}
#looks button.sel {
  border-color: var(--ink);
}
#skins {
  display: flex;
  gap: 8px;
  margin: 6px 0 14px;
}
#colors button,
#skins button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  border: 3px solid transparent;
}
#colors button.sel,
#skins button.sel {
  border-color: var(--ink);
}
#play {
  width: 100%;
  padding: 14px;
  font-size: 18px;
}
#acct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  color: #6b665c;
}
#acct:empty {
  display: none;
}
#acct a.btn {
  background: #5865f2;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 0 #0003;
}
#acct button {
  padding: 4px 10px;
  font-size: 13px;
}
:is(#myworlds, #offworlds) {
  margin: 0 0 14px;
}
:is(#myworlds, #offworlds):empty {
  display: none;
}
:is(#myworlds, #offworlds) .hd {
  font-size: 13px;
  color: #6b665c;
  margin-bottom: 4px;
}
:is(#myworlds, #offworlds) .rows {
  max-height: 150px;
  overflow-y: auto;
}
:is(#myworlds, #offworlds) .w {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-top: 1px solid #0001;
}
:is(#myworlds, #offworlds) .w button:first-child {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 14px;
  border: 2px solid #d8cfbb;
}
:is(#myworlds, #offworlds) small {
  display: inline;
  margin: 0;
  font-size: 12px;
}
:is(#myworlds, #offworlds) .x {
  padding: 2px 8px;
  font-size: 12px;
  background: none;
  box-shadow: none;
  color: #8a8478;
}
#menu .card {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
/* Until main.js has the texts and the world list (#264), the card shows bricks stacking and rotating messages instead
   of empty fields; they fade in only after 150 ms, so a fast load never flashes them. */
.booting #menu .card > :not(.row, #loader),
html:not(.booting) #loader,
html:lang(es) #loader [lang='en'],
html:not(:lang(es)) #loader [lang='es'] {
  display: none;
}
.booting #menu .lang {
  visibility: hidden; /* its value is set by main.js */
}
#loader {
  text-align: center;
  padding: 18px 0 6px;
  opacity: 0;
  animation: fadein 0.3s 0.15s forwards;
}
@keyframes fadein {
  to {
    opacity: 1;
  }
}
#loader .bricks {
  position: relative;
  width: 60px;
  height: 36px;
  margin: 0 auto 14px;
}
#loader .bricks i {
  position: absolute;
  width: 28px;
  height: 11px;
  border-radius: 3px;
  background: #c8643c;
  box-shadow: inset 0 -3px #0002;
  animation: brick 2.4s infinite both;
}
#loader .bricks i:nth-child(1) {
  left: 1px;
  bottom: 0;
}
#loader .bricks i:nth-child(2) {
  left: 31px;
  bottom: 0;
  animation-delay: 0.3s;
}
#loader .bricks i:nth-child(3) {
  left: 16px;
  bottom: 12px;
  animation-delay: 0.6s;
}
@keyframes brick {
  0% {
    transform: translateY(-30px);
    opacity: 0;
  }
  15%,
  80% {
    transform: none;
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
#loader .msgs {
  display: grid;
  margin: 0;
}
#loader .msgs span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: msg 7.5s infinite;
}
#loader .msgs span:nth-child(3n + 2) {
  animation-delay: 2.5s;
}
#loader .msgs span:nth-child(3n) {
  animation-delay: 5s;
}
@keyframes msg {
  3%,
  30% {
    opacity: 1;
  }
  34% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #loader .bricks i {
    animation: none;
  }
}
#menu small {
  display: block;
  margin-top: 12px;
  color: #8a8478;
}
