* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #FFF3D6;
  overscroll-behavior: none;
}
body {
  color: #1A211C;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
#stage {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: block;
  padding: 0;
}
#game {
  display: block;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: #FFF3D6;
  touch-action: none;
}
#share-sheet {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: rgba(26, 33, 28, 0.45);
  touch-action: auto;
}
#share-sheet[hidden] { display: none; }
.share-card {
  width: min(100%, 420px);
  background: #FFF9E8;
  color: #1A211C;
  border: 2px solid #C9B48A;
  border-radius: 18px;
  padding: 20px 18px 16px;
}
.share-kicker {
  font-size: 18px;
  font-weight: 800;
  color: #087A4E;
  text-align: center;
}
#share-status {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}
#share-link {
  margin-top: 12px;
  padding: 12px;
  background: #FFFFFF;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.45;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
#share-close {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: #0C8F5E;
  color: #FFFFFF;
  font: 800 22px/1 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
}
#nick-input {
  position: fixed;
  z-index: 6;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(86vw, 360px);
  height: 56px;
  padding: 0 16px;
  border: 2px solid #0C8F5E;
  border-radius: 14px;
  background: #FFFFFF;
  color: #1A211C;
  font: 700 22px/1 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
#nick-input[hidden] { display: none; }
#safe-probe {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
@media (min-width: 520px) {
  html, body { background: #c4b18a; }
  #stage {
    display: grid;
    place-items: center;
    padding: 24px;
  }
  #game {
    width: 390px;
    height: min(844px, calc(100dvh - 48px));
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(63, 43, 19, 0.28);
  }
}
