.sky-high-game {
  --sh-ink: #1a2a3a;
  --sh-ink-soft: #4a5a6a;
  --sh-paper: #ffffff;
  --sh-sky: #7ec8ff;
  --sh-accent: #ff8a5a;
  --sh-accent-2: #5fd0e6;
  --sh-shadow: 0 10px 30px rgba(20, 40, 70, 0.18);
  --sh-safe-top: env(safe-area-inset-top, 0px);
  --sh-safe-bottom: env(safe-area-inset-bottom, 0px);
  --sh-safe-left: env(safe-area-inset-left, 0px);
  --sh-safe-right: env(safe-area-inset-right, 0px);

  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--sh-sky);
  color: var(--sh-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.sky-high-game,
.sky-high-game * {
  box-sizing: border-box;
}

.sky-high-game .sh-game-root {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

.sky-high-game .sh-game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.sky-high-game .sh-hidden {
  display: none !important;
}

.sky-high-game .sh-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding:
    calc(var(--sh-safe-top) + 14px)
    calc(var(--sh-safe-right) + 16px)
    calc(var(--sh-safe-bottom) + 14px)
    calc(var(--sh-safe-left) + 16px);
}

.sky-high-game .sh-hud-top {
  position: absolute;
  top: calc(var(--sh-safe-top) + 14px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.sky-high-game .sh-score {
  font-size: clamp(34px, 8vw, 64px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 3px 10px rgba(20, 40, 70, 0.35), 0 1px 2px rgba(20, 40, 70, 0.5);
  line-height: 1;
}

.sky-high-game .sh-stars-hud {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(18px, 4.5vw, 26px);
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 3px rgba(20, 40, 70, 0.4);
}

.sky-high-game .sh-star-icon {
  color: #ffd84d;
}

.sky-high-game .sh-hud-buttons {
  position: absolute;
  top: calc(var(--sh-safe-top) + 12px);
  right: calc(var(--sh-safe-right) + 14px);
  display: flex;
  gap: 10px;
}

.sky-high-game .sh-icon-btn {
  pointer-events: auto;
  width: clamp(48px, 11vw, 60px);
  height: clamp(48px, 11vw, 60px);
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--sh-ink);
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--sh-shadow);
  transition: transform 0.12s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sky-high-game .sh-icon-btn:active {
  transform: scale(0.92);
  background: #fff;
}

.sky-high-game .sh-power-indicator {
  position: absolute;
  bottom: calc(var(--sh-safe-bottom) + 26px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(20, 40, 70, 0.55);
  color: #fff;
  font-weight: 700;
  font-size: clamp(14px, 3.6vw, 18px);
  padding: 8px 16px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.sky-high-game .sh-toast {
  position: absolute;
  z-index: 12;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -10px);
  background: rgba(20, 40, 70, 0.78);
  color: #fff;
  font-weight: 800;
  font-size: clamp(20px, 5vw, 30px);
  padding: 12px 24px;
  border-radius: 16px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--sh-shadow);
}

.sky-high-game .sh-toast.sh-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sky-high-game .sh-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding:
    calc(var(--sh-safe-top) + 20px)
    calc(var(--sh-safe-right) + 20px)
    calc(var(--sh-safe-bottom) + 20px)
    calc(var(--sh-safe-left) + 20px);
}

.sky-high-game .sh-overlay.sh-active {
  pointer-events: auto;
}

.sky-high-game .sh-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  max-width: 470px;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--sh-shadow);
  backdrop-filter: blur(8px);
}

.sky-high-game .sh-panel-bare {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.sky-high-game .sh-ready-panel {
  pointer-events: none;
}

.sky-high-game .sh-title {
  margin: 0;
  font-size: clamp(44px, 12vw, 84px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(135deg, #5fd0e6 0%, #3a8fd0 50%, #ff8a5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 18px rgba(60, 120, 200, 0.18);
}

.sky-high-game .sh-subtitle {
  margin: 0;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--sh-ink);
}

.sky-high-game .sh-tagline {
  margin: 0;
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 600;
  color: var(--sh-ink-soft);
}

.sky-high-game .sh-start-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.sky-high-game .sh-best {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 700;
  color: var(--sh-ink);
  background: #eaf6ff;
  padding: 8px 16px;
  border-radius: 999px;
}

.sky-high-game .sh-hint {
  margin: 4px 0 0;
  font-size: clamp(14px, 3.6vw, 18px);
  color: var(--sh-ink-soft);
}

.sky-high-game .sh-footer {
  margin: 6px 0 0;
  font-size: clamp(12px, 3vw, 14px);
  color: var(--sh-ink-soft);
  opacity: 0.7;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sky-high-game .sh-ready-hint {
  margin: 0;
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 3px 12px rgba(20, 40, 70, 0.5);
  animation: sky-high-bob 1.2s ease-in-out infinite;
}

.sky-high-game .sh-ready-sub {
  margin: 6px 0 0;
  font-size: clamp(13px, 3.4vw, 16px);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 6px rgba(20, 40, 70, 0.5);
}

@keyframes sky-high-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.sky-high-game .sh-message {
  margin: 0;
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 700;
  color: var(--sh-ink-soft);
}

.sky-high-game .sh-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.sky-high-game .sh-score-block {
  background: #eaf6ff;
  border-radius: 18px;
  padding: 12px 18px;
  min-width: 88px;
}

.sky-high-game .sh-score-label {
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sh-ink-soft);
}

.sky-high-game .sh-score-value {
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 900;
  color: var(--sh-ink);
  line-height: 1.1;
}

.sky-high-game .sh-milestone {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff8a5a, #ff6a3a);
  padding: 8px 18px;
  border-radius: 999px;
}

.sky-high-game .sh-total-stars {
  margin: -4px 0 2px;
  color: var(--sh-ink-soft);
  font-weight: 700;
}

.sky-high-game .sh-btn {
  pointer-events: auto;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(18px, 4.6vw, 22px);
  letter-spacing: 1px;
  padding: 16px 30px;
  min-height: 60px;
  min-width: 180px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: var(--sh-shadow);
  color: #fff;
}

.sky-high-game .sh-btn:active {
  transform: scale(0.95);
}

.sky-high-game .sh-btn-primary {
  background: linear-gradient(135deg, #5fd0e6, #3a8fd0);
  color: #fff;
}

.sky-high-game .sh-btn-secondary {
  background: #e7eef5;
  color: var(--sh-ink);
}

.sky-high-game .sh-btn:focus-visible,
.sky-high-game .sh-icon-btn:focus-visible,
.sky-high-game .sh-sound-pill:focus-visible {
  outline: 3px solid #ff8a5a;
  outline-offset: 3px;
}

.sky-high-game .sh-sound-pill {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #eef5fb;
  color: var(--sh-ink-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 480px) and (orientation: portrait) {
  .sky-high-game .sh-btn {
    min-width: 160px;
  }

  .sky-high-game .sh-panel {
    gap: 11px;
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sky-high-game .sh-ready-hint {
    animation: none;
  }

  .sky-high-game .sh-btn,
  .sky-high-game .sh-icon-btn {
    transition: none;
  }
}
