/* 「削らず残せ」固有の盤面。共通UIは ../css/game-common.css。 */

.game-area { width: 100%; }

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

.ks-prompt {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
}

/* 論理盤面 380 × 340。位置は % で置くので、端末幅が変わっても判定は変わらない。 */
.ks-board {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 380 / 340;
  border: 3px solid #b9c7ad;
  border-radius: 16px;
  background:
    linear-gradient(rgba(52, 75, 64, 0.06) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(90deg, rgba(52, 75, 64, 0.06) 1px, transparent 1px) 0 0 / 10% 10%,
    #f3f5ee;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 物理判定は装飾を除いた矩形（この要素の外形）。立体感は内側の上面と影だけで付ける。 */
.ks-block {
  position: absolute;
  box-sizing: border-box;
  border-radius: 3px;
  pointer-events: none;
}
.ks-block-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18%;
  max-height: 14px;
  border-radius: 3px 3px 0 0;
  background: rgba(255, 255, 255, 0.35);
}
.ks-kept {
  background: #2f9b57;
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.18);
}
.ks-moving {
  background: rgba(43, 109, 204, 0.82);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.18);
}
.ks-cut-layer { position: absolute; inset: 0; pointer-events: none; }
.ks-cut {
  position: absolute;
  box-sizing: border-box;
  background: rgba(216, 64, 47, 0.75);
  border: 2px solid #8f1f14;
}

.ks-stop {
  width: 100%;
  max-width: 480px;
  min-height: 56px;
  font-size: 20px;
  touch-action: manipulation;
}

@media (max-width: 430px) {
  .ks-prompt { font-size: 15px; }
  .ks-board { border-width: 2px; border-radius: 12px; }
  .ks-stop { min-height: 52px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .ks-board { max-width: 300px; }
  .ks-stop { min-height: 44px; max-width: 300px; }
}
