/* 「どこに置いた？」固有の盤面。共通UIは ../css/game-common.css。 */

.game-area { width: 100%; }

/* 開始前の3段階の説明（置く → 覚える → 答える）。スマホでも折り返して読める短さ。 */
.wp-intro {
  margin: 0;
  padding: 8px 10px 8px 2em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #3c4a40;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.wp-intro li + li { margin-top: 2px; }
.howto-block .wp-intro { font-size: 14px; }

.wp-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.wp-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  width: 100%;
  max-width: 560px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
}
.wp-prompt-img { width: 44px; height: 44px; flex: 0 0 auto; }

/* 論理 scene 360 × 270。背景は伸縮だけ（切り抜きなし）。slot は % で置くので PC / mobile で同じ配置。 */
.wp-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 360 / 270;
  border: 3px solid #b9c7ad;
  border-radius: 14px;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}
.wp-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.wp-slot {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  padding: 0 0 4%;
  border: 2px solid rgba(60, 74, 64, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
  font: inherit;
  cursor: default;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  touch-action: manipulation;
}
.wp-slot:not(:disabled) { cursor: pointer; }
.wp-slot:not(:disabled):hover { background: rgba(255, 255, 255, 0.6); }
.wp-item { width: 78%; height: 78%; object-fit: contain; display: block; pointer-events: none; }
.wp-tag {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}
/* 既置き: 赤丸 + 「最初から」。自分で置いた: 青 + 「あなた」。空き: 点線 + 「空き」。色だけで示さない。 */
.wp-slot.is-pre { border: 3px solid #d8402f; border-radius: 50%; background: rgba(255, 236, 232, 0.6); }
.wp-slot.is-pre .wp-tag { background: #d8402f; color: #fff; }
.wp-slot.is-self { border: 3px solid #2b6dcc; background: rgba(230, 240, 252, 0.7); }
.wp-slot.is-self .wp-tag { background: #2b6dcc; color: #fff; }
.wp-slot.is-empty { border: 2px dashed #3c4a40; background: rgba(255, 255, 255, 0.55); }
.wp-slot.is-empty .wp-tag { top: auto; bottom: 34%; background: transparent; color: #3c4a40; font-size: 13px; }
.wp-slot.is-correct { border: 3px solid var(--green); background: rgba(230, 244, 234, 0.85); box-shadow: 0 0 0 3px #fff; }
.wp-slot.is-wrong { border: 3px dashed #b42318; background: rgba(253, 236, 234, 0.85); }
.wp-slot.is-wrong::after { content: "×"; color: #b42318; font-size: 26px; font-weight: 800; position: absolute; top: 18%; }
html.is-keyboard-nav .wp-slot:focus-visible { outline: 3px solid #d88635; outline-offset: 2px; }

.wp-actions { display: flex; justify-content: center; width: 100%; min-height: 0; }
.wp-memorized { min-width: 180px; }
.wp-memorized[hidden] { display: none; }

.wp-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 460px;
  touch-action: manipulation;
}
.wp-choices[hidden] { display: none; }
.wp-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 56px;
  margin: 0;
  padding: 4px 6px;
  border: 3px solid #b9c7ad;
  border-radius: 14px;
  background: #fff;
  color: #2b3a30;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(52, 75, 64, 0.18);
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.wp-choices.is-yesno .wp-choice { font-size: 22px; }
.wp-choice:disabled { cursor: default; }
.wp-choice-img { width: 40px; height: 40px; flex: 0 0 auto; }
.wp-choice-name { overflow-wrap: anywhere; text-align: left; line-height: 1.2; }
.wp-choice.is-chosen { border-color: #3c4a40; background: #eef1ea; }
.wp-choice.is-correct { border-color: var(--green); background: #e6f4ea; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--green); }
.wp-choice.is-wrong { border-style: dashed; border-color: #b42318; background: #fdecea; }
.wp-choice.is-dim { opacity: 0.55; }
html.is-keyboard-nav .wp-choice:focus-visible { outline: 3px solid #d88635; outline-offset: 2px; }

@media (max-width: 430px) {
  .wp-prompt { font-size: 15px; min-height: 44px; }
  .wp-prompt-img { width: 38px; height: 38px; }
  .wp-stage { border-width: 2px; border-radius: 10px; }
  .wp-tag { font-size: 10px; }
  .wp-choice { min-height: 52px; font-size: 14px; }
  .wp-choice-img { width: 34px; height: 34px; }
  .wp-intro { font-size: 12px; padding: 6px 8px 6px 1.8em; }
}
