다른 사람 자리 줄: PC·태블릿에서 옆 스크롤 대신 여러 줄로 고르게 쌓기 (구십구·원카드·도블)

- lib/seat-rows.ts: 게임 칸 실제 폭으로 한 줄 칸 수를 정하고 줄마다 고르게 나눔(9 → 5 + 4)
- 720px 이상에서만 적용, 휴대폰은 한 줄 옆 밀기 그대로
- docs/07 3.5에 규칙 추가

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-11 01:13:07 +09:00
parent 0d43d9f9aa
commit c97fb4583e
6 changed files with 76 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import { Avatar, Sheet } from '../../components/ui';
import { TurnTimer } from '../../components/TurnTimer';
import { PlayingCard } from '../../components/cards/PlayingCard';
import { haptic, sounds } from '../../lib/feedback';
import { useSeatRows } from '../../lib/seat-rows';
import type { BoardProps, GameUI, OptionsProps } from '../types';
import { helpNow } from './help';
import { quickStart } from './quick';
@@ -114,6 +115,11 @@ const CSS = `
@keyframes oc-fly { from { transform: translate(-40px, 30px) scale(.8); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes oc-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes oc-shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
/* PC/tablet: many players stack into even rows (9 → 5 + 4) instead of scrolling sideways. Phones keep one swipeable row. */
@media (min-width: 720px) {
.oc-opps { flex-wrap: wrap; justify-content: center; overflow: visible; width: 100%; max-width: calc(var(--cols) * 184px - 4px); margin: 0 auto; }
.oc-seat { flex: 0 1 calc((100% - (var(--cols) - 1) * 8px) / var(--cols)); min-width: 0; max-width: 176px; }
}
@media (max-width: 719px) {
.oc-table { grid-template-columns: auto auto; padding: 10px; gap: 10px; border-width: 6px; justify-content: center; }
.oc-info { grid-column: 1 / -1; align-items: center; }
@@ -664,12 +670,13 @@ function OneCardBoard({ view: v, me, players, act, pending, deadline }: BoardPro
// Opponents in turn order after me (spectators: seat order).
const myIdx = v.seats.findIndex((s) => s.id === me);
const others = myIdx < 0 ? v.seats : [...v.seats.slice(myIdx + 1), ...v.seats.slice(0, myIdx)];
const opps = useSeatRows<HTMLUListElement>(others.length);
const canDraw = !!v.my?.canDraw && !pending;
const meSeat = v.seats.find((s) => s.id === me);
return (
<div className="oc">
<style>{CSS}</style>
<ul className="oc-opps" aria-label="다른 사람">
<ul className="oc-opps" aria-label="다른 사람" ref={opps.ref} style={opps.style}>
{others.map((s) => (
<SeatChip key={s.id} s={s} v={v} players={players} me={me} deadline={deadline} />
))}