/* Instructions sit within the approved layout; the scenery and Draw placement stay fixed. */
.game-guidance[hidden],
.game-guidance-actions[hidden],
.game-guidance-backdrop[hidden],
.game-guidance-help[hidden] { display: none !important; }
.draw-screen .card-stage .card-back,
.draw-screen .card-stage.is-waiting-for-draw { visibility: hidden; pointer-events: none; }
.draw-screen.has-game-guidance .deck-status { display: none; }
.game-guidance {
  position: absolute;
  z-index: 4;
  top: calc(var(--card-top) + var(--photo-card-height, var(--card-height)) * .5);
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 48px));
  padding: 18px 20px;
  border: 2px solid #e8b45b;
  color: #fff3d8;
  background: rgba(6, 62, 83, .94);
  box-shadow: 4px 4px 0 #062b4b;
  text-align: center;
}
.game-guidance h3 {
  margin: 0 0 12px;
  color: #f2c56a;
  font: .63rem/1.6 var(--pixel);
}
.game-guidance p {
  margin: 0;
  font: 1.25rem/1.2 var(--display);
}
.game-guidance-actions {
  position: static;
  width: auto;
  margin: 0;
  color: #fff3d8;
  text-align: center;
  text-shadow: none;
}
.level-header-actions {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-width: 0;
}
.game-guidance-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font: 1rem/1 var(--display);
}
.game-guidance-line p { margin: 0; }
.game-guidance-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  border: 2px solid #fff3d8;
  padding: 8px 10px;
  color: #062b4b;
  background: #f2c56a;
  box-shadow: inset -3px -3px #c68a3e, 3px 3px #062b4b;
  font: 1.1rem/1 var(--display);
  white-space: nowrap;
  cursor: pointer;
}
.game-guidance-toggle:hover { background: #fff3d8; }
.game-guidance-toggle:active { transform: translate(2px,2px); }
.game-guidance-toggle:focus-visible { outline: 2px solid #f2c56a; outline-offset: 4px; }
.game-guidance-backdrop {
  position: fixed;
  z-index: 110;
  inset: 0;
  background: rgba(3,20,34,.68);
}
.game-guidance-help {
  position: fixed;
  z-index: 111;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: min(460px, calc(100vw - 36px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  margin: 0;
  padding: 22px;
  border: 2px solid #e8b45b;
  color: #fff3d8;
  background: #063e53;
  box-shadow: 4px 4px #062b4b;
  font: 1.35rem/1.25 var(--display);
  text-align: center;
  text-shadow: none;
}
.game-guidance-help h3 { margin: 0 0 18px; color: #f2c56a; font: .7rem/1.6 var(--pixel); }
.game-guidance-help p { margin: 0; }
.game-guidance-help p + p { margin-top: 12px; }
.game-guidance-close {
  min-width: 100px;
  min-height: 44px;
  margin-top: 22px;
  border: 2px solid #fff3d8;
  padding: 10px 14px;
  color: #062b4b;
  background: #f2c56a;
  box-shadow: inset -3px -3px #c68a3e,3px 3px #062b4b;
  font: .65rem/1.3 var(--pixel);
  cursor: pointer;
}
.game-guidance-close:focus-visible { outline: 2px solid #fff3d8; outline-offset: 4px; }
@media (max-width: 720px) {
  .game-guidance { padding: 13px 15px; }
  .game-guidance h3 { margin-bottom: 9px; font-size: .48rem; }
  .game-guidance p { font-size: 1.05rem; }
  .has-game-guidance .level-bar { grid-template-columns: auto minmax(0,1fr) auto; gap: 5px; }
  .level-header-actions { gap: 5px; }
  .level-header-actions .back-button { width: 64px; padding: 8px 3px; font-size: .49rem; }
  .game-guidance-toggle { width: 65px; padding: 5px 4px; white-space: normal; font-size: 1rem; line-height: .95; }
  .has-game-guidance .level-title h2 { font-size: clamp(1.2rem,5.2vw,1.65rem); }
  body[data-kata="naihanchi-3"] .has-game-guidance .level-title h2 { font-size: clamp(1.05rem,4.5vw,1.4rem); }
  .has-game-guidance .level-title .eyebrow { font-size: .38rem; }
  .has-game-guidance .level-title .playing-player { font-size: 1rem; }
  .has-game-guidance .level-progress { font-size: .33rem; }
  .has-game-guidance .level-progress strong { font-size: 1.4rem; }
  .has-game-guidance .level-progress strong.long-count { font-size: 1.05rem; }
  .game-guidance-help { padding: 18px; font-size: 1.25rem; }
}
