* {
  box-sizing: border-box;
}

:root {
  --game-viewport-width: 100vw;
  --game-viewport-height: 100dvh;
}

html,
body {
  margin: 0;
  width: var(--game-viewport-width);
  min-height: 100%;
  background: #0b0d10;
  color: #f6f7fb;
  font-family: "Pretendard Variable", Pretendard, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  touch-action: none;
}

body {
  height: var(--game-viewport-height);
  display: grid;
  place-items: center;
}

#game-shell {
  position: relative;
  width: min(var(--game-viewport-width), calc(var(--game-viewport-height) * 0.5625));
  height: min(var(--game-viewport-height), calc(var(--game-viewport-width) * 1.7777778));
  max-width: 540px;
  max-height: 960px;
  background: #101418;
  overflow: hidden;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.7);
}

#game-root,
#game-root canvas {
  width: 100%;
  height: 100%;
}

#game-root canvas {
  display: block;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d7e7ec;
  font-size: 14px;
  font-weight: 800;
  background: radial-gradient(circle at 50% 35%, #263f46 0, #101418 48%, #090b0f 100%);
}

noscript {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  padding: 12px 14px;
  border-radius: 8px;
  background: #201319;
  color: #ffd6dc;
  font-size: 14px;
  text-align: center;
}

.school-zombie-rank-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(70px, 14%, 128px) 18px 18px;
  background: rgba(2, 4, 6, 0.18);
  pointer-events: auto;
}

.school-zombie-rank-dialog {
  width: min(100%, 424px);
  margin: 0;
  padding: 22px 22px 20px;
  border: 2px solid rgba(255, 107, 104, 0.78);
  border-radius: 8px;
  background: rgba(8, 13, 17, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
  color: #f8fbff;
  text-align: center;
  backdrop-filter: blur(3px);
}

.school-zombie-rank-kicker {
  margin-bottom: 4px;
  color: #8deeff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.school-zombie-rank-title {
  color: #ff7470;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.12;
  text-shadow: 0 3px 0 #050607;
}

.school-zombie-rank-score {
  margin: 10px 0 16px;
  color: #ffd86b;
  font-size: 15px;
  font-weight: 900;
}

.school-zombie-rank-input {
  width: 100%;
  height: 48px;
  border: 2px solid rgba(141, 238, 255, 0.72);
  border-radius: 6px;
  outline: none;
  background: rgba(2, 5, 8, 0.9);
  color: #ffffff;
  font: 900 20px "Pretendard Variable", Pretendard, "Segoe UI", Arial, sans-serif;
  text-align: center;
}

.school-zombie-rank-input:focus {
  border-color: #ffd86b;
  box-shadow: 0 0 0 3px rgba(255, 216, 107, 0.22);
}

.school-zombie-rank-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.62fr);
  gap: 12px;
  margin-top: 16px;
}

.school-zombie-rank-actions button {
  height: 48px;
  border: 0;
  border-radius: 6px;
  color: #081016;
  font: 900 16px "Pretendard Variable", Pretendard, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.26);
}

.school-zombie-rank-actions button:disabled {
  cursor: default;
  filter: grayscale(0.45);
  opacity: 0.7;
}

.school-zombie-rank-submit {
  background: linear-gradient(180deg, #8deeff 0%, #3aa9ff 100%);
}

.school-zombie-rank-skip {
  background: linear-gradient(180deg, #ffe083 0%, #c8892f 100%);
}

@media (max-width: 720px) {
  #game-shell {
    box-shadow: none;
  }
}
