.stage { max-width: 760px; }
.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.hud > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; text-align: center; font-size: .72rem; color: var(--faint); line-height: 1.5; }
.hud b { display: block; font-family: var(--mono); font-weight: 400; font-size: 1rem; color: var(--gold-l); }
.hud b.red { color: #e0705c; }
.hud .us { border-color: var(--line2); }
.ttable { position: relative; display: grid; grid-template-columns: 90px 1fr 90px; grid-template-rows: auto 1fr; grid-template-areas: ". top ." "left mid right"; min-height: 330px; padding: 10px; gap: 6px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: .78rem; color: var(--muted); position: relative; }
.seat .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #13110d; border: 1.5px solid var(--line2); font-family: var(--display); font-size: 1.15rem; color: var(--gold-l); transition: box-shadow .2s; }
.seat.partner .av { border-color: var(--green); color: var(--green); }
.seat.turn .av { box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(201,168,106,.6); }
.seat small { font-family: var(--mono); color: var(--faint); font-size: .68rem; }
.s2 { grid-area: top; } .s3 { grid-area: left; align-self: center; } .s1 { grid-area: right; align-self: center; }
.bubble { position: absolute; top: -6px; inset-inline-start: calc(50% + 18px); background: var(--text); color: var(--ink); border-radius: 10px; padding: 1px 9px; font-size: .78rem; font-weight: 600; opacity: 0; transform: scale(.6); transition: .2s; white-space: nowrap; pointer-events: none; }
.bubble.show { opacity: 1; transform: none; }
.bubble.pass { background: #3a3122; color: var(--muted); }
.bubble.bid { background: var(--gold); }
.me-tag { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; font-size: .8rem; color: var(--muted); position: relative; }
.me-tag .bubble { position: static; }
.trick { grid-area: mid; position: relative; --cw: 54px; min-height: 230px; }
.trick .pc { position: absolute; animation: tin .25s ease-out; }
.trick .p0 { bottom: 0; left: calc(50% - var(--cw) / 2); }
.trick .p2 { top: 0; left: calc(50% - var(--cw) / 2); }
.trick .p1 { right: 6%; top: calc(50% - var(--cw) * .7); }
.trick .p3 { left: 6%; top: calc(50% - var(--cw) * .7); }
.trick .pc.trump::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; border: 2px solid #e0705c; }
.trick .pc.won { box-shadow: 0 0 0 3px var(--gold-l), 0 0 22px rgba(243,226,179,.8); z-index: 2; }
@keyframes tin { from { opacity: 0; transform: scale(1.25); } }
.panel { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); z-index: 3; background: rgba(12,11,9,.94); border: 1px solid var(--line2); border-radius: 18px; padding: 14px 16px; text-align: center; box-shadow: var(--shadow); width: min(92%, 380px); }
.panel p { margin: 0 0 10px; color: var(--text); font-size: .9rem; }
.panel p b { color: var(--gold-l); font-family: var(--mono); }
.panel .bids { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.panel .bids .cbtn { min-width: 40px; padding: 7px 0; font-family: var(--mono); }
.panel .pass { min-width: 120px; }
.panel .suits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.panel .suit { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.panel .suit span { font-size: 1.4rem; line-height: 1; }
.panel .suit.red span { color: #e0705c; }
.hand.mine { --cw: 66px; direction: ltr; display: flex; justify-content: center; margin-top: 12px; min-height: calc(var(--cw) * 1.4 + 14px); padding-top: 14px; }
.hand.mine .pc.can { cursor: pointer; transform: translateY(-12px); box-shadow: 0 0 0 2px var(--gold), 0 6px 14px rgba(0,0,0,.5); }
.hand.mine .pc.can:hover { transform: translateY(-18px); }
.hand.mine .pc.dim { filter: brightness(.55); }
.msg { text-align: center; color: var(--gold-l); min-height: 1.6em; margin: 6px 0 0; }
.overlay .sum { margin: 10px auto 18px; border-collapse: collapse; font-size: .9rem; min-width: 260px; }
.overlay .sum th, .overlay .sum td { padding: 6px 12px; border-bottom: 1px solid var(--line); }
.overlay .sum th { color: var(--gold); font-weight: 400; }
.overlay .sum td:first-child { text-align: start; color: var(--muted); }
@media (max-width: 640px) {
  .ttable { grid-template-columns: 58px 1fr 58px; min-height: 280px; padding: 8px 4px; }
  .seat .av { width: 34px; height: 34px; font-size: .95rem; }
  .seat { font-size: .7rem; }
  .trick { --cw: 42px; min-height: 190px; }
  .hand.mine { --cw: 50px; }
  .hud > div { font-size: .62rem; padding: 3px 4px; } .hud b { font-size: .85rem; }
}
.me-tag { flex-direction: row; } .me-tag.turn > span:first-child { color: var(--gold-l); }
.ttable { direction: ltr; }
.ttable .seat, .ttable .panel { direction: rtl; }
.seat small { font-family: var(--font); }
.ttable .bubble { position: static; display: none; transform: none; margin-top: 2px; }
.ttable .bubble.show { display: inline-block; animation: bpop .2s ease-out; }
@keyframes bpop { from { transform: scale(.6); opacity: 0; } }
@media (max-width: 640px) { .ttable .bubble { font-size: .66rem; padding: 0 6px; } }
