.table-surface { position: relative; width: 100%; aspect-ratio: 1.55; min-height: 380px; overflow: hidden; border: 1px solid rgba(220,198,146,.24); border-radius: 42% / 16%; background: radial-gradient(ellipse at 50% 42%,#4a5d47 0%,#354735 52%,#253329 100%); box-shadow: inset 0 0 90px rgba(0,0,0,.32),0 20px 35px rgba(0,0,0,.2); transform: perspective(1200px) rotateX(2deg); }
.table-surface::before { content: ""; position: absolute; inset: 12px; pointer-events: none; border: 1px solid rgba(239,215,159,.12); border-radius: inherit; }
.public-zone { position: absolute; left: 22%; right: 22%; top: 27%; bottom: 25%; display: flex; flex-direction: column; min-height: 0; padding: 12px; border: 1px dashed rgba(239,215,159,.23); border-radius: 12px; background: rgba(12,22,15,.16); }
.public-zone-title { display: flex; justify-content: space-between; gap: 10px; color: #e5d7b8; font-family: var(--serif); font-size: 11px; }
.public-zone-title small { color: rgba(229,215,184,.5); font-family: var(--sans); font-size: 8px; }
.public-cards { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-height: 0; overflow-x: auto; }
.public-cards .empty-state { padding: 12px; }
.public-cards .empty-state strong { color: rgba(238,231,216,.72); font-size: 11px; }
.public-cards .empty-state p { color: rgba(238,231,216,.4); font-size: 9px; }
.seat { position: absolute; z-index: 4; display: grid; grid-template-columns: 38px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; gap: 2px 8px; width: 128px; min-height: 58px; padding: 7px 9px; border: 1px solid rgba(238,231,216,.12); border-radius: 30px; color: var(--text); background: rgba(17,24,18,.88); box-shadow: 0 8px 16px rgba(0,0,0,.24); transform: translate(-50%,-50%); text-align: left; }
button.seat { cursor: pointer; }
button.seat:hover { border-color: var(--gold); }
.seat.is-empty { opacity: .55; }
.seat.is-me { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(209,173,104,.12),0 8px 16px rgba(0,0,0,.24); }
.seat.is-target { border-color: var(--gold-light); background: #4a4933; }
.seat-avatar { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #263025; background: #b9b09a; font-family: var(--serif); font-size: 16px; }
.seat-details { display: flex; flex-direction: column; min-width: 0; }
.seat-role, .seat-nickname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-role { font-family: var(--serif); font-size: 11px; }
.seat-nickname { color: var(--muted); font-size: 8px; }
.seat-meta { grid-column: 2; color: var(--gold); font-size: 8px; }
.dm-table .table-surface { min-height: 300px; aspect-ratio: 1.75; }
.dm-table .seat { width: 102px; min-height: 45px; grid-template-columns: 29px minmax(0,1fr); padding: 5px 7px; }
.dm-table .seat-avatar { width: 28px; height: 28px; font-size: 12px; }
.dm-table .public-zone { left: 24%; right: 24%; }
.dm-table .public-cards .game-card { display: none; }
.dm-table .public-cards .game-card:first-child { display: block; }

.game-card { position: relative; flex: 0 0 auto; width: 112px; height: 158px; padding: 0; border: 0; border-radius: 8px; color: var(--ink); background: transparent; cursor: pointer; perspective: 900px; transition: filter .2s,translate .2s; }
.card-inner { position: absolute; inset: 0; display: block; border-radius: inherit; box-shadow: 0 9px 18px rgba(0,0,0,.27); transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.card-face { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: inherit; backface-visibility: hidden; }
.card-back { align-items: center; justify-content: center; gap: 20px; border: 1px solid #bfa465; color: #d8c28b; background: radial-gradient(circle at 50% 30%,#344638,#17241b 70%); }
.card-back::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(216,194,139,.35); border-radius: 4px; }
.card-back-mark { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: .15em; }
.card-back-line { font-size: 5px; letter-spacing: .2em; }
.card-front { padding: 12px 10px 10px; border: 1px solid #d9d0b9; background: #eae2d1; transform: rotateY(180deg); text-align: left; }
.card-front::after { content: ""; position: absolute; inset: 5px; pointer-events: none; border: 1px solid rgba(68,64,52,.18); border-radius: 4px; }
.card-kind { align-self: flex-start; padding: 2px 5px; border: 1px solid #8b7652; border-radius: 3px; color: #6e5b3c; font-size: 7px; }
.card-type-item { background: #e2e5d8; }
.card-name { margin-top: 12px; color: #302d25; font-family: var(--serif); font-size: 13px; line-height: 1.4; }
.card-description { display: -webkit-box; margin-top: 7px; overflow: hidden; color: #6d675b; font-size: 8px; line-height: 1.55; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.card-deck { margin-top: auto; color: #8e8675; font-size: 6px; letter-spacing: .08em; }
.game-card.is-face-up .card-inner { transform: rotateY(180deg); }
.game-card.is-face-up.is-flipped .card-inner { transform: rotateY(0); }
.game-card.is-face-down.is-flipped .card-inner { transform: rotateY(180deg); }
.game-card.is-selected { filter: drop-shadow(0 0 7px rgba(240,211,151,.7)); translate: 0 -12px; }
.card-compact { width: 76px; height: 108px; }
.card-compact .card-front { padding: 9px 8px; }
.card-compact .card-name { margin-top: 6px; font-size: 9px; }
.card-compact .card-description { font-size: 6px; -webkit-line-clamp: 3; }
.card-compact .card-deck { display: none; }
.card-compact .card-back-mark { font-size: 18px; }
.player-hand { min-height: 180px; overflow-x: auto; padding: 15px 0 4px; }
.hand-fan { display: flex; align-items: center; justify-content: center; min-width: max-content; min-height: 170px; padding: 10px 50px; }
.hand-fan .game-card { margin-left: -18px; transform: rotate(calc(var(--i) * 2.5deg)) translateY(calc(var(--i) * var(--i) * 1px)); transform-origin: 50% 120%; }
.hand-fan .game-card:first-child { margin-left: 0; }
.hand-fan .game-card:hover { z-index: 5; translate: 0 -8px; }
.hand-overflow { color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 720px) {
  .table-surface { min-height: 400px; aspect-ratio: .95; border-radius: 34% / 12%; }
  .public-zone { left: 19%; right: 19%; top: 33%; bottom: 31%; padding: 7px; }
  .public-cards { justify-content: flex-start; }
  .seat { width: 82px; min-height: 41px; grid-template-columns: 24px minmax(0,1fr); gap: 1px 4px; padding: 4px 6px; border-radius: 22px; }
  .seat-avatar { width: 24px; height: 24px; font-size: 11px; }
  .seat-role { font-size: 8.5px; }
  .seat-nickname, .seat-meta { font-size: 6.5px; }
  .card-compact { width: 62px; height: 88px; }
  .game-card { width: 100px; height: 142px; }
  .hand-fan { justify-content: flex-start; padding-inline: 24px; }
  .dm-table .table-surface { min-height: 320px; aspect-ratio: 1.05; }
  .dm-table .seat { width: 74px; grid-template-columns: 20px minmax(0,1fr); }
  .dm-table .seat-avatar { width: 20px; height: 20px; font-size: 9px; }
  .dm-table .seat-meta { display: none; }
  .dm-table .public-zone { left: 22%; right: 22%; }
}
