@font-face { font-family: 'Messenger Letter Hand'; src: url('./fonts/letter-hand.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root { --messenger-font: 'Messenger Letter Hand', 'Microsoft YaHei', 'PingFang SC', sans-serif; }
body, button { font-family: var(--messenger-font); }

.webgl-unsupported {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 2rem;
  color: #203734;
  background: #b2ddcf;
  font: 500 clamp(1rem, 3vw, 1.35rem)/1.65 var(--messenger-font);
  text-align: center;
}

/* Stay readable even if the WebGL module or one of its resources is unavailable. */
#planet-load-error:not([open]) { display: none; }
#planet-load-error[open] {
  box-sizing: border-box;
  position: fixed;
  z-index: 12;
  inset: 0;
  width: min(392px, calc(100% - 32px));
  height: fit-content;
  margin: auto;
  padding: 22px 24px;
  color: #233935;
  background: #fff8e7;
  border: 2px solid #3b5852;
  border-radius: 12px 9px 10px 8px;
  box-shadow: 4px 5px 0 #31574e6b;
  font: 500 21px/1.5 var(--messenger-font);
  text-align: center;
}
#planet-load-error::backdrop { background: #b2ddcf; }
#planet-load-error p { margin: 0 0 14px; }
#planet-load-error button {
  min-height: 44px;
  padding: 5px 16px;
  color: inherit;
  border: 2px solid #3b5852;
  border-radius: 6px 5px 4px 5px;
  background: #f4d581;
  font: 600 18px/1.25 var(--messenger-font);
  cursor: pointer;
}
#planet-load-error button:focus-visible {
  outline: 3px solid #275f7e;
  outline-offset: 3px;
}
