/* 対局区の asopiko 皮（2026-11-10）。設計稿 GameA / GameAM。
   並びと寸法の土台は game-play.css、ここは箱・錠剤・札の見た目と GameA の 3 列だけを上書きする。色は --ap-*。 */

.play-stage { background: var(--ap-page); color: var(--ap-sub); font-family: var(--ap-font); }

/* 電脳版：一枚の箱に 3 列（対局者 190 / 盤 / 操作 240）。
   箱はヘッダーと余白を除いた画面の高さいっぱい。盤の寸法は game-render が中央列の空きから決める */
.gp {
  max-width: 1120px;
  height: calc(100svh - 142px); /* ヘッダー 78 ＋ 上の余白 46 ＋ 下 18 */
  min-height: 560px;
  margin: 18px auto;
  padding: 22px;
  box-sizing: border-box;
  background: var(--ap-surface);
  border: 2px solid var(--ap-ink);
  border-radius: 18px;
  box-shadow: var(--ap-card-shadow);
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 240px;
  grid-template-rows: minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}
.gp-players { width: auto; gap: 10px; align-self: start; }
.gp-seat { padding: 12px; border: 2px solid var(--ap-line); border-radius: 14px; background: var(--ap-surface); gap: 10px; }
.gp-seat.is-active { border-color: var(--ap-ink); background: var(--ap-now-bg); box-shadow: var(--ap-solid-shadow); }
.gp-seat .gp-stone { width: 28px; height: 28px; }
.gp-seat__text strong { font-size: 15px; font-weight: 900; color: var(--ap-ink); }
.gp-seat__text span { font-size: 11.5px; color: var(--ap-muted); }
.gp-seat__turn { padding: 1px 8px; border-radius: 999px; background: var(--ap-brand-red); color: var(--ap-on-fill); font-size: 11px; font-weight: 900; }
.gp-facts { margin-top: 6px; padding: 10px 12px; border-radius: 14px; background: var(--ap-soft); font-size: 12.5px; gap: 4px 10px; }
.gp-facts dt { color: var(--ap-muted); }
.gp-facts dd { color: var(--ap-ink); font-weight: 900; }

.gp-center { gap: 10px; min-width: 0; min-height: 0; justify-content: flex-start; }
/* 状態帯は高さ 40 で固定。確認の釦が出ても盤が下へずれない */
.gp-status {
  flex: none;
  height: 40px;
  box-sizing: border-box;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding: 0 4px 0 16px;
  border: 2px solid var(--ap-ink);
  border-radius: 999px;
  background: var(--ap-tag-yellow);
  box-shadow: 0 2px 0 var(--ap-ink);
  font-size: 14px;
  gap: 8px;
}
.gp-status strong { font-family: var(--ap-font); font-weight: 900; font-size: 14px; color: var(--ap-ink); }
.gp-status .gp-btn { height: 30px; padding: 0 14px; font-size: 12.5px; box-shadow: none; }
.gp-status:not(:has(.gp-btn:not([hidden]))) { padding-right: 16px; }
.gp-hint { padding: 2px 10px; border-radius: 999px; background: var(--ap-ng-bg); color: var(--ap-ng-ink); font-size: 12px; font-weight: 900; }

.gp-ops { width: auto; gap: 12px; align-self: stretch; }
.gp-btn {
  height: 44px;
  border: 2px solid var(--ap-ink);
  border-radius: 999px;
  background: var(--ap-surface);
  box-shadow: 0 2px 0 var(--ap-ink);
  font-family: var(--ap-font);
  font-size: 13px;
  font-weight: 900;
  color: var(--ap-ink);
}
.gp-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.gp-btn--sumi {
  height: 50px;
  background: var(--ap-cta);
  border-color: var(--ap-ink);
  box-shadow: 0 4px 0 var(--ap-ink);
  color: var(--ap-on-fill);
  font-size: 15px;
}
.gp-ops > .gp-btn--sumi { margin-top: auto; }
.gp-switch {
  padding: 9px 12px;
  border: 0;
  border-bottom: 2px dashed var(--ap-line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-ink);
}
.gp-ops .gp-switch:first-of-type { border-radius: 14px 14px 0 0; }
.gp-ops .gp-switch { background: var(--ap-page); }
.gp-switch__ui { width: 46px; height: 26px; box-sizing: border-box; border: 2px solid var(--ap-ink); background: var(--ap-line); }
.gp-switch__ui::after { left: 2px; top: 2px; width: 18px; height: 18px; box-shadow: 0 1px 0 rgba(74,56,38,.35); }
.gp-switch input:checked + .gp-switch__ui::after { left: 22px; }
.gp-switch input:checked + .gp-switch__ui { background: var(--ap-switch-on); }
.gp-kifu { padding: 10px 12px; border-radius: 14px; background: var(--ap-page); border: 1px solid var(--ap-line); font-size: 12.5px; }
.gp-kifu > span { font-weight: 900; color: var(--ap-ink); }
.gp-kifu li { border-bottom: 1px dashed var(--ap-line); }

.gp-result__card { background: var(--ap-surface); border: 2px solid var(--ap-ink); border-radius: 18px; box-shadow: var(--ap-solid-shadow); }
.gp-result__title { font-family: var(--ap-font); font-weight: 900; color: var(--ap-ink); }

/* 手機版（GameAM）*/
@media (max-width: 767px) {
  .gp {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    margin: 12px;
    padding: 12px 12px 12px;
    gap: 10px;
  }
  .gp-players { margin: 0; gap: 8px; align-self: stretch; }
  .gp-seat { padding: 8px 10px; border-radius: 12px; }
  .gp-seat.is-active { box-shadow: 0 2px 0 var(--ap-ink); }
  .gp-seat__text strong { font-size: 13.5px; }
  .gp-seat__text span { font-size: 11px; }
  .gp-center { margin-top: 0; }
  /* 手機版の確認帯は下端の操作帯の上に浮かせる。出ても盤や棋譜を押し下げない */
  .gp-status:has([data-confirm]:not([hidden])) {
    position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translateX(-50%);
    margin: 0; height: 48px; padding: 0 6px 0 14px; box-shadow: 0 3px 0 var(--ap-ink);
  }
  .gp-status .gp-btn { height: 36px; }
  .gp-forbid { margin: 0; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--ap-ng-bg); color: var(--ap-ng-ink); font-size: 11.5px; font-weight: 900; }
  .gp-forbid::before { display: none; }
  .gp-strip { margin: 0; padding: 8px 2px 2px; border-top: 2px dashed var(--ap-line); font-size: 12px; color: var(--ap-muted); }
  .gp-strip .is-last { color: var(--ap-ink); }
  .play-stage { padding-bottom: 96px; }
  .gp-bar { background: var(--ap-cream); border-top: 2px solid var(--ap-ink); padding: 10px 12px 26px; }
  .gp-bar button {
    height: 48px;
    flex-direction: row;
    gap: 6px;
    border: 2px solid var(--ap-ink);
    border-radius: 999px;
    background: var(--ap-surface);
    box-shadow: 0 2px 0 var(--ap-ink);
    font-family: var(--ap-font);
    font-size: 13px;
    font-weight: 900;
    color: var(--ap-ink);
  }
  .gp-bar button svg { width: 18px; height: 18px; }
  .gp-bar button[aria-pressed="true"] { background: var(--ap-tag-yellow); }
  .gp-sheet { background: var(--ap-surface); border-top: 2px solid var(--ap-ink); border-radius: 22px 22px 0 0; }
  .gp-sheet .gp-switch { background: transparent; }
  .gp-scrim { background: var(--ap-scrim); }
}
