/* 「仲間外れを探せ」固有の盤面。共通UIは ../css/game-common.css。 */

.game-area { width: 100%; }

.oo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.oo-rule {
  margin: 0;
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* 2×2。カードの位置は問題データで固定。 */
.oo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 400px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.oo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 132px;
  margin: 0;
  padding: 8px 4px 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fffef8;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  box-sizing: border-box;
  box-shadow: 0 2px 0 rgba(52, 75, 64, 0.12);
}
.oo-card:disabled { cursor: default; }
.oo-img { display: block; width: 84px; height: 84px; }
.oo-img img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.oo-name {
  display: block;
  max-width: 100%;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .oo-card:not(:disabled):hover { border-color: rgba(50, 102, 77, 0.55); background: #f4f8ec; }
}
.oo-card:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
html.is-keyboard-nav .oo-card:focus-visible { outline: 3px solid #d88635; outline-offset: 2px; }

.oo-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(52, 75, 64, 0.3);
}
.oo-card.is-correct { border-color: var(--green); background: #e3f0e3; box-shadow: 0 0 0 1px var(--green); }
.oo-card.is-correct .oo-badge { display: flex; background: var(--green); }
.oo-card.is-correct .oo-badge::before { content: "○"; }
.oo-card.is-wrong { border: 2px dashed #b42318; background: #fbe9e6; }
.oo-card.is-wrong .oo-badge { display: flex; background: #b42318; }
.oo-card.is-wrong .oo-badge::before { content: "×"; }
.oo-card.is-dim { opacity: 0.55; }

@media (max-width: 430px) {
  .oo-rule { font-size: 18px; }
  .oo-grid { gap: 8px; }
  .oo-card { min-height: 122px; }
  .oo-img { width: 76px; height: 76px; }
  .oo-name { font-size: 15px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .oo-wrap { gap: 4px; }
  .oo-rule { min-height: 1.6em; font-size: 16px; }
  .oo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; gap: 6px; }
  .oo-card { min-height: 84px; padding: 4px 2px; }
  .oo-img { width: 48px; height: 48px; }
  .oo-name { font-size: 12px; }
}
