/* Hokkaido / Tohoku: align the three game panels with the 88 + 12 + 88px navigation. */
body.hkt-game{ --hkt-panel-width:var(--sgq-left-panel-width,188px); }
body.hkt-game.hkt-page-1 .side,
body.hkt-game.hkt-page-4 .side,
body.hkt-game.hkt-page-3 .side,
body.hkt-game .floatingInfo{
  position:fixed;
  left:calc(14px + var(--safeL, 0px));
  top:calc(60px + var(--safeT, 0px));
  width:var(--hkt-panel-width) !important;
  min-width:0;
  --floatInfoW:var(--hkt-panel-width);
}
body.hkt-game .questInfo,
body.hkt-game.hkt-page-1 .side .card,
body.hkt-game.hkt-page-4 .side .card,
body.hkt-game.hkt-page-3 .side .card,
body.hkt-game .questTitle,
body.hkt-game .questStatus,
body.hkt-game .floatTitleBar,
body.hkt-game .floatStatus,
body.hkt-game .bBox,
body.hkt-game .promptBox,
body.hkt-game .panelActions{
  box-sizing:border-box;
  width:var(--hkt-panel-width) !important;
  min-width:0 !important;
  max-width:100% !important;
}
body.hkt-game .questInfo{gap:7px;}
body.sgq-left-aligned.hkt-game .questInfo{margin-left:0 !important;margin-right:0 !important;}
body.sgq-left-aligned.hkt-page-1 .side,
body.sgq-left-aligned.hkt-page-4 .side,
body.sgq-left-aligned.hkt-page-3 .side,
body.sgq-left-aligned .floatingInfo{
  max-width:188px !important;box-sizing:border-box;
  padding-left:0 !important;padding-right:0 !important;
}
body.sgq-left-aligned.hkt-page-1 .side .card,
body.sgq-left-aligned.hkt-page-4 .side .card,
body.sgq-left-aligned.hkt-page-3 .side .card{border:0;padding-left:0;padding-right:0;}
body.hkt-game .questTitle,
body.hkt-game .floatTitleBar{
  font-size:18px !important;
  font-weight:600;
  line-height:1.15;
  letter-spacing:0 !important;
  padding:7px 8px !important;
  text-shadow:none;
}
html[lang="en"] body.hkt-game .questTitle,
html[lang="en"] body.hkt-game .floatTitleBar{
  font-size:14px !important;
  white-space:normal;
}
body.hkt-game .questStatus,
body.hkt-game .floatStatus{
  font-size:16px !important;
  font-weight:600;
  padding:6px 10px !important;
  gap:8px;
}
body.hkt-game .bBox{margin:8px 0 0 !important;}
body.hkt-game .promptYomi,
body.hkt-game .promptKanji{font-weight:600;}
body.hkt-game .panelActions{
  order:2;
  display:flex;
  justify-content:flex-end;
  margin:12px 0 8px;
  flex:0 0 auto;
  pointer-events:auto;
}
body.sgq-left-aligned .panelActions{padding-left:0;padding-right:0;}
body.hkt-game .panelRestart{
  display:flex;align-items:center;justify-content:center;gap:3px;
  min-height:32px;padding:3px 5px;
  border:1px solid rgba(20,102,255,.25);border-radius:8px;
  background:rgba(245,252,255,.94);color:#1466ff;
  font-family:inherit;font-size:11px;font-weight:600;line-height:1.2;
  white-space:nowrap;cursor:pointer;touch-action:manipulation;
}
body.hkt-game .panelRestart svg{width:14px;height:14px;flex:0 0 14px;}
body.hkt-game .panelRestart:focus-visible{outline:2px solid #ffd400;outline-offset:2px;}
body.hkt-game .panelRestart:active{transform:translateY(1px);}
/* Keep the name game's first paint identical to its final navigation position. */
body.hkt-game .panelNav{
  position:fixed;left:calc(14px + var(--safeL, 0px));
  top:calc(10px + var(--safeT, 0px));z-index:90;
  width:188px;display:flex;justify-content:flex-start;gap:12px;
}
body.hkt-game .panelNav a{flex:0 0 88px;width:88px;height:40px;}
body.hkt-game .panelNav img{width:88px;height:40px;object-fit:contain;}

/* Reserve the question's place before the first question and during retries. */
body.hkt-game .promptBox.is-waiting > *{visibility:hidden;}
body.hkt-game .choice.is-placeholder{pointer-events:none;}

/* Compact restart control shared by the three local games. */
body.hkt-game #resetBtn{
  display:inline-flex;flex-direction:row;align-items:center;justify-content:center;
  gap:7px;min-height:36px;width:auto;margin:0;padding:7px 12px;
  border:1px solid rgba(170,220,255,.42);border-radius:999px;
  background:linear-gradient(180deg,rgba(48,89,145,.94),rgba(24,55,105,.96));
  color:#edf8ff;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 4px 12px rgba(0,0,0,.16);
  cursor:pointer;touch-action:manipulation;
  transition:background .15s,border-color .15s,transform .15s;
}
body.hkt-game #resetBtn .homeCircle{
  display:flex;align-items:center;justify-content:center;
  width:18px;height:18px;margin:0;padding:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;backdrop-filter:none;
}
body.hkt-game #resetBtn .homeIcon{width:18px;height:18px;filter:none;}
body.hkt-game #resetBtn .resetReload{fill:none;stroke:currentColor;stroke-width:1.8;}
body.hkt-game #resetBtn .homeLabel{
  margin:0;padding:0;min-width:0;border:0;border-radius:0;background:transparent;
  box-shadow:none;text-shadow:none;color:inherit;font-size:12px;font-weight:600;line-height:1.2;
}
body.hkt-game #resetBtn:hover{background:#315d98;border-color:#aadeff;}
body.hkt-game #resetBtn:active{transform:translateY(1px);}
body.hkt-game #resetBtn:focus-visible{outline:2px solid #8ee8ff;outline-offset:3px;}
body.hkt-game.hkt-page-2 #resetBtn{
  position:fixed;left:calc(14px + var(--safeL,0px));
  bottom:calc(14px + var(--safeB,0px));top:auto;right:auto;z-index:80;
}

/* Reserve the larger bilingual layout, independently of the active language. */
body.hkt-game .questTitle,
body.hkt-game .floatTitleBar{
  height:48px !important;min-height:48px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  white-space:normal;text-align:center;
}
body.hkt-game .questStatus,
body.hkt-game .floatStatus{
  height:36px !important;min-height:36px;flex-shrink:0;
  display:flex;align-items:center;
}
body.hkt-game{--hkt-prompt-row:clamp(22px,4vw,44px);}
body.hkt-game .promptYomi,
body.hkt-game .promptKanji{
  height:calc(var(--hkt-prompt-row) * 1.06) !important;
  line-height:calc(var(--hkt-prompt-row) * 1.06) !important;
}
body.hkt-game .promptYomi{margin-bottom:4px !important;}
@media (orientation:portrait) and (min-width:700px){
  body.hkt-game{--hkt-prompt-row:44px;}
}
@media (max-width:520px), (orientation:landscape) and (max-height:520px){
  body.hkt-game{--hkt-prompt-row:clamp(20px,8vw,34px);}
}
