#splash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(96px, 16vh, 150px) 16px 32px;
  box-sizing: border-box;
  background: url("assets/fg_flag.svg") 72% 100% / cover no-repeat, url("assets/bg.svg") center bottom / cover no-repeat, #7FCBFA;
  box-shadow: inset 0 0 0 100vmax rgba(20, 20, 20, .28);
  color: #141414;
  font-family: Nunito, 'ZCOOL KuaiLe', 'Trebuchet MS', sans-serif;
  transition: opacity .35s ease, transform .35s ease;
}
#splash.out { opacity: 0; transform: scale(1.04); }
#splash[hidden] { display: none; }
#splash .sp-card {
  position: relative;
  margin: auto;
  width: min(1040px, 100%);
  box-sizing: border-box;
  padding: clamp(84px, 13vw, 132px) clamp(16px, 4vw, 52px) clamp(24px, 4vw, 48px);
  background: #F3E9D2;
  border: 6px solid #141414;
  border-radius: clamp(22px, 3vw, 36px);
  box-shadow: 0 14px 0 #141414;
  text-align: center;
}
#splash .sp-head {
  position: absolute;
  left: 50%;
  top: calc(clamp(150px, 24vw, 250px) * -0.5);
  width: clamp(150px, 24vw, 250px);
  height: auto;
  transform: translateX(-50%);
  animation: sp-bob 2.6s ease-in-out infinite alternate;
}
@keyframes sp-bob { from { transform: translateX(-50%) translateY(0); } to { transform: translateX(-50%) translateY(-10px); } }
#splash .sp-title {
  margin: 0;
  font-family: 'Luckiest Guy', cursive;
  font-weight: 400;
  font-size: clamp(30px, 10.5vw, 128px);
  white-space: nowrap;
  line-height: .9;
  letter-spacing: 2px;
  color: #ffffff;
  -webkit-text-stroke: clamp(6px, 1vw, 11px) #141414;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #141414, 0 8px 0 #141414, 0 12px 0 #141414;
}
#splash .sp-title span { color: #F7B924; }
#splash .sp-tag {
  display: inline-block;
  margin-top: clamp(16px, 2.4vw, 26px);
  padding: 9px 16px 7px;
  background: #141414;
  color: #F7B924;
  border-radius: 10px;
  font-family: 'Black Ops One', sans-serif;
  font-size: clamp(13px, 1.6vw, 18px);
  letter-spacing: 3px;
  transform: rotate(-2deg);
}
#splash .sp-choose {
  margin: clamp(18px, 3vw, 30px) 0 0;
  font-family: 'Black Ops One', sans-serif;
  font-size: clamp(24px, 4.4vw, 46px);
  letter-spacing: 2px;
  color: #4F5A2A;
}
#splash .sp-sub {
  margin: 8px 0 0;
  font-size: clamp(13px, 1.7vw, 17px);
  font-weight: 800;
  color: #5A4A36;
}
#splash .sp-grid {
  margin-top: clamp(18px, 3vw, 32px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
}
#splash .sp-grid button {
  min-height: clamp(120px, 17vw, 184px);
  padding: 16px 6px 12px;
  background: #ffffff;
  color: #141414;
  border: 5px solid #141414;
  border-radius: 20px;
  box-shadow: 0 8px 0 #141414;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}@media (hover: hover) and (pointer: fine){#splash .sp-grid button:hover{ transform: translateY(3px); box-shadow: 0 5px 0 #141414; background: #FFF4CF; }}
#splash .sp-grid button:active { transform: translateY(8px); box-shadow: 0 0 0 #141414; }
#splash .sp-grid button:focus-visible { outline: 4px dashed #141414; outline-offset: 4px; }
#splash .sp-grid button.on { background: #F7B924; }
#splash .sp-grid img, #splash .sp-grid span { pointer-events: none; }
#splash .sp-grid img { -webkit-user-drag: none; width: clamp(64px, 9vw, 104px); height: auto; }
#splash .sp-name { font-family: 'Luckiest Guy', 'ZCOOL KuaiLe', cursive; font-size: clamp(20px, 2.6vw, 30px); line-height: 1; padding-top: 3px; }
#splash .sp-zh { font-family: 'ZCOOL KuaiLe', cursive; padding-top: 0; }
#splash .sp-code { font-family: 'Black Ops One', sans-serif; font-size: 12px; letter-spacing: 2px; color: #4F5A2A; }

@media (max-width: 760px) {
  #splash .sp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #splash .sp-grid button { grid-column: span 2; }
  #splash .sp-grid button:nth-child(4) { grid-column: 2 / span 2; }
}
@media (max-width: 420px) {
  #splash { padding-left: 10px; padding-right: 10px; }
  #splash .sp-card { padding-left: 12px; padding-right: 12px; }
  #splash .sp-grid { gap: 8px; }
  #splash .sp-grid button { min-height: 92px; gap: 6px; padding: 10px 2px 8px; border-width: 4px; border-radius: 16px; }
  #splash .sp-grid img { width: 50px; }
  #splash .sp-name { font-size: clamp(12px, 4.3vw, 16px); letter-spacing: 0; }
  #splash .sp-code { font-size: 9px; letter-spacing: 1px; }
}
@media (max-height: 780px) and (orientation: portrait) {
  #splash { padding-top: 76px; }
  #splash .sp-card { padding-top: 64px; }
  #splash .sp-head { width: 124px; top: -62px; }
  #splash .sp-title { font-size: clamp(30px, 10vw, 60px); }
  #splash .sp-sub { display: none; }
  #splash .sp-tag { margin-top: 12px; font-size: 12px; }
  #splash .sp-choose { font-size: 21px; margin-top: 12px; }
  #splash .sp-grid { margin-top: 14px; }
  #splash .sp-grid button { min-height: 86px; }
}
@media (max-height: 620px) and (orientation: portrait) {
  #splash { padding-top: 62px; }
  #splash .sp-card { padding-top: 52px; padding-bottom: 16px; }
  #splash .sp-head { width: 100px; top: -50px; }
  #splash .sp-tag { display: none; }
  #splash .sp-grid button { min-height: 80px; }
  #splash .sp-grid img { width: 44px; }
}
@media (max-height: 900px) and (min-height: 521px) and (orientation: landscape) {
  #splash { padding-top: 84px; }
  #splash .sp-card { padding-top: 76px; padding-bottom: 32px; }
  #splash .sp-head { width: 150px; top: -75px; }
  #splash .sp-title { font-size: clamp(40px, 7vw, 88px); }
  #splash .sp-tag { margin-top: 14px; }
  #splash .sp-choose { font-size: clamp(22px, 3vw, 34px); margin-top: 16px; }
  #splash .sp-grid { margin-top: 18px; }
  #splash .sp-grid button { min-height: clamp(104px, 15vh, 140px); }
  #splash .sp-grid img { width: clamp(56px, 7vw, 84px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  #splash { padding: 58px 16px 12px; align-items: flex-start; }
  #splash .sp-card { padding: 50px 20px 18px; width: min(900px, 100%); border-width: 5px; }
  #splash .sp-head { width: 96px; top: -52px; }
  #splash .sp-title { font-size: 40px; -webkit-text-stroke-width: 6px; text-shadow: 0 3px 0 #141414, 0 6px 0 #141414; }
  #splash .sp-tag, #splash .sp-sub { display: none; }
  #splash .sp-choose { font-size: 22px; margin-top: 10px; }
  #splash .sp-grid { margin-top: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #splash .sp-grid button, #splash .sp-grid button:nth-child(4), #splash .sp-grid button:first-child { grid-column: auto; min-height: 84px; gap: 4px; padding: 8px 4px 6px; }
  #splash .sp-grid img { width: 44px; }
  #splash .sp-name { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { #splash .sp-head { animation: none; } #splash { transition: none; } }
