/* Android table parity. Presentation timing lives in presentation.mjs, not CSS clocks. */
.play-card { opacity:1; }
.play-card:disabled { opacity:1; }
.trick-cards { position:absolute; inset:0; transform-origin:50% 50%; }
.table-status { display:flex; align-items:center; justify-content:center; gap:8px; min-height:32px; margin-bottom:18px; }
.announcement-bubble {
  position:absolute; z-index:8; max-width:180px; padding:8px 13px; border:1px solid #fff5df;
  border-radius:10px; background:linear-gradient(#ffefd0,#ecd9af); color:#202119;
  font:700 14px/1.35 Arial,sans-serif; text-align:center; pointer-events:none;
}
.announcement-bubble::after { content:""; position:absolute; left:var(--tail-left,calc(50% - 9px)); width:18px; height:9px; transform:skewX(var(--tail-skew,0deg)); transform-origin:50% 0; background:#ecd9af; clip-path:polygon(0 0,100% 0,50% 100%); bottom:-9px; }
.announcement-bubble[data-pointer=left]::after { left:-9px; bottom:auto; top:var(--tail-top,calc(50% - 9px)); width:9px; height:18px; clip-path:polygon(100% 0,100% 100%,0 50%); transform:skewY(var(--tail-skew,0deg)); transform-origin:100% 50%; }
.announcement-bubble[data-pointer=up]::after { top:-9px; bottom:auto; clip-path:polygon(0 100%,100% 100%,50% 0); transform-origin:50% 100%; background:#ffefd0; }
.table-status { width:max-content; max-width:60%; left:50%; right:auto; transform:translateX(-50%); margin:0; }
@media(max-width:740px),(orientation:landscape) and (max-height:600px) { .announcement-bubble { max-width:125px; font-size:12px; padding:7px 10px; } }
.opponent-hand { --fan-spread:.52; position:relative; display:block; padding:0; max-width:none; }
.opponent-card { position:absolute; margin:0!important; max-width:none; transform-origin:center; }
.opponent-hand .opponent-card { width:clamp(43px,5.9vw,88px); }
@media(max-width:740px) and (orientation:portrait) {
  .opponent-hand .opponent-card { width:43px; }
  .seat.north .opponent-card { width:49px; }
}
.seat.west .opponent-hand,.seat.east .opponent-hand { order:-1; }
@media(orientation:landscape) and (max-height:600px) {
  .opponent-hand .opponent-card { width:40px; }
  .seat.north .opponent-card { width:42px; }
  .seat.west .opponent-hand,.seat.east .opponent-hand { --fan-spread:.4; }
  .seat.west,.seat.east { top:27%; }
  .seat.north .player-tag { position:absolute; right:calc(100% + 12px); top:0; }
}
.table-countdown {
  --progress:1; --clock-background:#1b211e;
  display:inline-grid; place-items:center; position:relative; flex:0 0 32px;
  width:32px; height:32px; border-radius:50%; vertical-align:middle;
  background:conic-gradient(var(--gold) calc(var(--progress)*1turn),#77736544 0);
  font:600 12px Arial,sans-serif; font-variant-numeric:tabular-nums; color:var(--ivory);
}
.table-countdown::before { content:""; position:absolute; inset:3px; border-radius:50%; background:var(--clock-background); }
.table-countdown [data-seconds] { position:relative; z-index:1; color:var(--ivory); font-size:12px; }
.bid-panel {
  --clock-background:#222426;
  top:8px; left:50%; width:min(380px,calc(100% - 28px)); max-width:none;
  transform:translateX(-50%) scale(var(--bid-scale,1)); transform-origin:50% 0;
  padding:20px; border-radius:20px; background:#222426; text-align:center;
  display:flex; flex-direction:column; align-items:stretch; gap:12px;
}
.bid-heading { display:flex; align-items:center; justify-content:center; gap:8px; min-height:32px; }
.bid-panel h2 { font:600 20px Arial,sans-serif; margin:0; }
.bid-panel .table-countdown::before { background:#222426; }
.bid-panel .bid-current,.bid-panel .bid-wait { font-size:14px; line-height:1.4; color:#f2ead9b8; margin:0; }
.bid-row { display:flex; gap:8px; }
.bid-row .button { flex:1; min-width:0; min-height:48px; padding:6px 4px; font-size:14px; border-radius:16px; }
.bid-row .bid-suit,.bid-row .bid-trump { color:#171819; background:#d5c9b5; border-color:#d5c9b5; }
.bid-row .bid-suit { display:flex; flex-direction:column; gap:0; font-size:12px; min-height:64px; }
.bid-symbol { font-family:Georgia,serif; font-size:32px; line-height:38px; color:#000; }
.bid-symbol.red-suit { color:#c62828; }
.bid-row .button:disabled { opacity:1; color:#17181961; }
.bid-row .button:disabled .bid-symbol { opacity:.38; }
.bid-row .primary:disabled,.bid-row .outline:disabled { opacity:.45; }
.declarations { max-height:none; overflow:visible; }
.declaration-history { margin:0; max-height:none; overflow:visible; line-height:1.5; }
.announcement-row { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.next-deal,.rematch-votes { display:flex; align-items:center; justify-content:center; gap:10px; }
.settlement-panel {
  top:50%; left:50%; transform:translate(-50%,-50%);
  display:flex; flex-direction:column; max-height:calc(100% - 24px); overflow:auto; scrollbar-gutter:stable both-edges;
}
.settlement-content {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  flex:none; gap:12px; margin:auto 0; text-align:center; min-width:0;
}
.settlement-content h2,.settlement-content p,.settlement-content .large-score,.settlement-content .button { margin:0; }
.settlement-content > .button,.settlement-content > .text-button { min-width:180px; max-width:100%; }
.settlement-content .next-deal,.settlement-content .rematch-votes { flex-direction:column; gap:8px; }
.settlement-panel .table-countdown::before { background:#191d1b; }
#declarations-dialog { max-height:calc(100svh - 24px); overflow:auto; padding:24px; }
#declarations-dialog h2 { font:600 26px Arial,sans-serif; margin-bottom:18px; }
.declaration-option { display:flex; gap:12px; align-items:center; min-height:56px; margin:0; padding:10px 0; }
.declaration-option input { flex:0 0 20px; width:20px; height:20px; min-height:0; margin:0; accent-color:var(--gold); }
.declaration-option strong { display:block; font-weight:400; font-size:18px; }
.declaration-option small { display:block; font-size:14px; margin-top:5px; }
.declaration-option input:disabled+span { color:var(--muted); }
.declaration-option .restriction { line-height:1.45; }
#declarations-dialog .dialog-actions { margin-top:18px; }
.belot-card { display:block; width:88px; height:auto; margin:0 auto 24px; }
#reopen-declarations { margin-bottom:20px; }
@media (max-width:740px) {
  .bid-panel { width:min(340px,calc(100% - 24px)); padding:16px; }
}
@media (orientation:landscape) and (max-height:600px) {
  .bid-panel { width:360px; padding:16px 20px; }
  .trick-area { top:15%; }
}
@media (prefers-reduced-motion:reduce) {
  .play-card { transition:none; }
}
