.hk-pringao-trigger {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hk-pringao-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 999998;
  transform: translateX(-50%) translateY(14px);
  padding: 9px 13px;
  border: 2px solid #06131f;
  background: #83f3dd;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 #06131f;
  transition: opacity 120ms linear, transform 120ms linear;
}

.hk-pringao-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hk-pringao-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(6, 19, 31, 0.94);
}

.hk-pringao-modal.is-open {
  display: flex;
}

.hk-pringao-shell {
  width: min(1100px, 100%);
  max-height: calc(100dvh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 4px solid #06131f;
  background: #f8fbff;
  box-shadow: 10px 10px 0 #000000;
}

.hk-pringao-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-bottom: 4px solid #06131f;
  background: #dff9ff;
  color: #06131f;
}

.hk-pringao-kicker {
  margin: 0 0 5px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hk-pringao-title {
  margin: 0;
  color: #06131f;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(30px, 7vw, 56px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.hk-pringao-subtitle {
  margin: 8px 0 0;
  max-width: 660px;
  color: #102839;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.hk-pringao-close {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 3px solid #06131f;
  background: #ffffff;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 3px 3px 0 #06131f;
}

.hk-pringao-game {
  position: relative;
  min-height: 0;
  padding: 12px;
  background: #eef8fb;
}

.hk-pringao-canvas {
  width: 100%;
  height: min(62dvh, 560px);
  min-height: 360px;
  display: block;
  border: 4px solid #06131f;
  background: #cdefff;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: manipulation;
}

.hk-pringao-overlay {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}

.hk-pringao-card {
  width: min(470px, calc(100% - 18px));
  max-height: calc(100% - 18px);
  overflow: auto;
  padding: 20px;
  border: 4px solid #06131f;
  background: #ffffff;
  text-align: center;
  box-shadow: 8px 8px 0 #06131f;
  pointer-events: auto;
}

.hk-pringao-card[hidden] {
  display: none;
}

.hk-pringao-card h3 {
  margin: 0;
  color: #06131f;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(27px, 8vw, 42px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.hk-pringao-card.is-special {
  width: min(560px, calc(100% - 18px));
  background: #fffdf5;
}

.hk-pringao-card.is-special h3 {
  font-size: clamp(30px, 8vw, 50px);
}

.hk-pringao-card p {
  margin: 12px 0 0;
  color: #28465a;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
}

.hk-pringao-card.is-special p {
  color: #102839;
  font-size: 15px;
}

.hk-pringao-scoreline {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hk-pringao-scoreline[hidden] {
  display: none;
}

.hk-pringao-scoreline span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 3px solid #06131f;
  background: #ffef92;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hk-pringao-extra {
  margin-top: 14px;
}

.hk-pringao-special-quote {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border: 3px solid #06131f;
  background: #ffef92;
  color: #06131f;
  box-shadow: 4px 4px 0 #06131f;
}

.hk-pringao-special-quote strong {
  display: block;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(24px, 7vw, 42px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.hk-pringao-special-quote span {
  display: block;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
  text-transform: uppercase;
}

.hk-pringao-record {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.hk-pringao-record label,
.hk-pringao-player-summary,
.hk-pringao-leaderboard-title,
.hk-pringao-leaderboard-empty {
  margin: 0;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
  text-transform: uppercase;
}

.hk-pringao-leaderboard-title {
  font-size: 26px;
  letter-spacing: 2px;
  text-align: center;
  margin: 6px 0 10px;
}

.hk-pringao-player-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 3px solid #06131f;
  background: #ffef92;
  color: #06131f;
  font-size: 13px;
  letter-spacing: 0.4px;
  box-shadow: 4px 4px 0 #06131f;
  text-transform: none;
}

.hk-pringao-player-summary strong {
  color: #0f6f73;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hk-pringao-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.hk-pringao-record input {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 3px solid #06131f;
  background: #ffffff;
  color: #06131f;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.hk-pringao-record button {
  min-height: 40px;
  padding: 8px 11px;
  border: 3px solid #06131f;
  background: #83f3dd;
  color: #06131f;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 3px 3px 0 #06131f;
}

.hk-pringao-record button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hk-pringao-leaderboard {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.hk-pringao-leaderboard li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 2px solid #06131f;
  background: #f8fbff;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.hk-pringao-leaderboard li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-pringao-leaderboard li strong {
  color: #0f6f73;
}

.hk-pringao-cheaters-title {
  margin: 22px 0 0;
  color: #c30000;
  font-family: "Courier New", monospace;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

.hk-pringao-cheaters {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.hk-pringao-cheaters li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 2px solid #c30000;
  background: #ffecec;
  color: #c30000;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.hk-pringao-cheaters li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-pringao-cheaters li span::before {
  content: "🤥 ";
}

.hk-pringao-cheaters li strong {
  color: #c30000;
  text-decoration: line-through;
}

.hk-pringao-cheaters-foot {
  margin: 8px 0 0;
  color: #c30000;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.hk-pringao-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.hk-pringao-button,
.hk-pringao-jump {
  min-height: 44px;
  padding: 12px 18px;
  border: 3px solid #06131f;
  background: #42cdeb;
  color: #00131f;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 #06131f;
}

.hk-pringao-button:disabled,
.hk-pringao-jump:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hk-pringao-button:active,
.hk-pringao-jump:active,
.hk-pringao-close:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #06131f;
}

.hk-pringao-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 4px solid #06131f;
  background: #ffffff;
}

.hk-pringao-hint {
  margin: 0;
  color: #35506b;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 900;
}

.hk-pringao-jump {
  min-width: 142px;
  background: #83f3dd;
}

.hk-pringao-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

body.hk-pringao-lock {
  overflow: hidden;
}

.hk-pringao-world-select {
  margin-top: 16px;
}

.hk-pringao-world-toggle {
  display: inline-block;
  padding: 6px 12px;
  border: 3px solid #06131f;
  background: #ffffff;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #06131f;
}

.hk-pringao-world-toggle:hover {
  background: #ffef92;
}

.hk-pringao-world-list {
  margin-top: 12px;
  padding: 12px;
  border: 3px solid #06131f;
  background: #f8fbff;
  box-shadow: 4px 4px 0 #06131f;
  text-align: left;
}

.hk-pringao-world-list[hidden] {
  display: none;
}

.hk-pringao-world-hint {
  margin: 0 0 10px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 900;
  text-transform: uppercase;
  color: #28465a;
}

.hk-pringao-world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

.hk-pringao-world-pick {
  padding: 8px 10px;
  border: 2px solid #06131f;
  background: #ffffff;
  color: #06131f;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-align: left;
}

.hk-pringao-world-pick:hover {
  background: #83f3dd;
}

.hk-pringao-death-cta {
  margin: 0 0 14px;
  text-align: center;
}

.hk-pringao-death-cta-link {
  display: inline-block;
  padding: 10px 18px;
  border: 3px solid #06131f;
  background: #ef5f78;
  color: #ffffff;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 4px 4px 0 #06131f;
}

.hk-pringao-death-cta-link:hover {
  background: #ffef92;
  color: #06131f;
}

@media (max-width: 640px) {
  .hk-pringao-modal {
    align-items: stretch;
    padding: 0;
  }

  .hk-pringao-shell {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    box-shadow: none;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .hk-pringao-head {
    padding: max(14px, env(safe-area-inset-top)) 12px 10px;
    border-bottom-width: 3px;
  }

  .hk-pringao-kicker {
    display: none;
  }

  .hk-pringao-title {
    font-size: 28px;
  }

  .hk-pringao-subtitle {
    display: none;
  }

  .hk-pringao-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
    box-shadow: 2px 2px 0 #06131f;
  }

  .hk-pringao-game {
    padding: 4px;
  }

  .hk-pringao-canvas {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-width: 3px;
  }

  .hk-pringao-overlay {
    inset: 4px;
    padding: 8px;
  }

  .hk-pringao-card {
    padding: 16px;
    box-shadow: 4px 4px 0 #06131f;
  }

  .hk-pringao-record-row {
    grid-template-columns: 1fr;
  }

  .hk-pringao-leaderboard li {
    font-size: 11px;
  }

  .hk-pringao-footer {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px max(10px, env(safe-area-inset-bottom));
    border-top-width: 3px;
  }

  .hk-pringao-hint {
    flex: 1;
    font-size: 11px;
    text-align: left;
  }

  .hk-pringao-jump {
    flex: 0 0 auto;
    min-width: 110px;
    min-height: 52px;
    font-size: 14px;
  }

  .hk-pringao-player-summary {
    box-shadow: 3px 3px 0 #06131f;
    font-size: 12px;
    padding: 8px 10px;
  }
}

@media (max-width: 640px) and (orientation: landscape) {
  .hk-pringao-head {
    padding: max(6px, env(safe-area-inset-top)) 8px 6px;
  }

  .hk-pringao-title {
    font-size: 20px;
  }

  .hk-pringao-footer {
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
  }

  .hk-pringao-jump {
    min-height: 44px;
    min-width: 96px;
  }
}
