.hk-challenge-panel {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 24px));
  max-height: min(680px, calc(100dvh - 120px));
  margin: 0;
  inset: auto 12px 96px auto;
  padding: 14px;
  overflow: auto;
  color: #27352e;
  background: #f5e9ce;
  border: 1px solid #aa9a79;
  border-radius: 14px;
  box-shadow: 0 12px 42px #14271f66;
  font: 500 13px/1.45 system-ui, sans-serif;
}
.hk-challenge-panel:popover-open { display: grid; gap: 10px; }
.hk-challenge-panel::backdrop { background: #15281e38; }
.hk-challenge-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hk-challenge-head h2 { margin: 0; font: 700 15px/1.3 system-ui, sans-serif; }
.hk-challenge-panel button { min-height: 44px; color: inherit; font: inherit; cursor: pointer; border: 1px solid #b3a587; border-radius: 8px; background: #ecdfc1; }
.hk-challenge-close { min-width: 44px; font-size: 22px !important; }
.hk-challenge-status, .hk-challenge-results { margin: 0; }
.hk-challenge-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hk-challenge-choice { display: grid; gap: 3px; padding: 9px; text-align: left; }
.hk-challenge-choice small { font-size: 11px; font-weight: 500; }
.hk-challenge-choice[aria-pressed="true"] { background: #226954; color: #fff5df; border-color: #226954; }
.hk-challenge-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hk-challenge-actions button { flex: 1; padding: 5px 8px; }
.hk-challenge-actions .hk-challenge-start { flex-basis: 100%; }
.hk-challenge-panel button:focus-visible { outline: 3px solid #9c5534; outline-offset: 2px; }
.hk-challenge-panel button:disabled { opacity: .5; cursor: default; }
.hk-challenge-panel [hidden], .hk-challenge-hud[hidden] { display: none !important; }
.hk-challenge-results { border-top: 1px solid #b3a587; padding-top: 9px; font-weight: 700; }
.hk-challenge-hud {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: calc(var(--street-radar-top, 80px) + 180px);
  box-sizing: border-box;
  width: min(390px, calc(100vw - 24px));
  padding: 8px 10px;
  background: #173c32ee;
  color: #fff3d7;
  border: 1px solid #d7c398;
  border-radius: 9px;
  font: 650 12px/1.4 system-ui, sans-serif;
  pointer-events: none;
  z-index: 16;
}
.hk-challenge-readout { margin: 0 0 5px; }
.hk-challenge-progress { display: block; width: 100%; height: 6px; accent-color: #f0c36c; }
.hk-challenge-live { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) {
  .hk-challenge-panel { inset: auto 12px 112px; }
  .hk-challenge-hud { top: auto; bottom: calc(210px + env(safe-area-inset-bottom)); }
}
@media (max-height: 480px) {
  .hk-challenge-panel { inset: auto 12px 70px auto; max-height: calc(100dvh - 92px); }
  .hk-challenge-hud { top: 78px; bottom: auto; left: 210px; width: min(360px, calc(100vw - 420px)); }
}
