/* Tong-its table: Sari-Sari Table at Fiesta, plum-night default with
   a capiz-day light variant. Every class is prefixed, so nothing here
   leaks into the rest of the app. Card faces use large ranks and
   Puso-coloured suits; no image, no font, no outside request. */
.tg-table {
  background: linear-gradient(180deg, #6b3a4f 0%, #3d2238 100%);
  border: 2px solid #efa93b;
  border-radius: 12px;
  padding: 12px;
  color: #fff8ef;
  max-width: 900px;
  margin: 0 auto;
}
html[data-theme="light"] .tg-table {
  background: linear-gradient(180deg, #fff7ea 0%, #f6ead2 100%);
  color: #3d2238;
  border-color: #b57f2e;
}
.tg-banderitas {
  height: 12px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, #efa93b 0 18px, #c75b7a 18px 36px, #fff3d6 36px 54px, #7a9e7e 54px 72px);
  margin-bottom: 10px;
}
.tg-variant { margin: 0 0 10px; font-size: 14px; opacity: .95; }
.tg-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tg-controls label { font-size: 14px; }
.tg-controls select { padding: 6px; border-radius: 8px; }
.tg-opponents { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.tg-opp {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  flex: 1 1 180px;
}
html[data-theme="light"] .tg-opp { background: rgba(61, 34, 56, .06); border-color: rgba(61, 34, 56, .25); }
.tg-opp.tg-current { border-color: #efa93b; box-shadow: 0 0 0 2px #efa93b inset; }
.tg-backs { letter-spacing: 2px; }
.tg-centre { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.tg-pile { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; }
.tg-card-back {
  width: 56px; height: 76px;
  background: repeating-linear-gradient(45deg, #46204a 0 8px, #efa93b 8px 10px);
  color: #fff; font-weight: bold; font-size: 15px;
  border: 2px solid #efa93b; border-radius: 8px; cursor: pointer;
}
.tg-card-back:disabled { opacity: .45; cursor: default; }
.tg-melds { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.tg-meld-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.tg-meld-group { display: inline-flex; gap: 4px; padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, .15); }
html[data-theme="light"] .tg-meld-group { background: rgba(61, 34, 56, .08); }
.tg-meld-group.set { outline: 2px solid #efa93b; outline-offset: 1px; }
.tg-meld-group.run { outline: 2px dashed #7a9e7e; outline-offset: 1px; }
.tg-mini-card {
  display: inline-block; min-width: 24px; text-align: center;
  background: #fff; color: #222; border-radius: 4px; padding: 2px 4px; font-weight: bold;
}
.tg-mini-card.hearts, .tg-mini-card.diamonds { color: #c0392b; }
.tg-mini-card.clubs, .tg-mini-card.spades { color: #2b2b4a; }
.tg-hand-title { font-weight: bold; margin: 8px 0 6px; }
.tg-hand { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tg-card {
  min-width: 44px; min-height: 56px;
  background: #fff; color: #222; border: 2px solid #ccc; border-radius: 8px;
  font-weight: bold; font-size: 15px; cursor: pointer; padding: 4px 6px;
}
.tg-card.hearts, .tg-card.diamonds { color: #c0392b; }
.tg-card.clubs, .tg-card.spades { color: #2b2b4a; }
.tg-card:disabled { opacity: .45; cursor: default; }
.tg-card.tg-selected { border-color: #efa93b; box-shadow: 0 0 0 3px #efa93b; transform: translateY(-4px); }
.tg-unmatched, .tg-guide, .tg-drawnote, .tg-session, .tg-msg { font-size: 14px; margin: 6px 0; }
.tg-status { font-weight: bold; margin: 8px 0; }
.tg-actions, .tg-toggles, .tg-reactions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tg-actions .btn, .tg-toggles .btn, .tg-reactions .btn, .tg-meld-row .btn, .tg-chooser .btn { min-height: 44px; }
.tg-chooser { background: rgba(255, 255, 255, .12); border-radius: 8px; padding: 10px; margin: 10px 0; }
html[data-theme="light"] .tg-chooser { background: rgba(61, 34, 56, .06); }
.tg-draw-response { background: rgba(239, 169, 59, .18); border: 2px solid #efa93b; border-radius: 8px; padding: 10px; margin: 10px 0; }
.tg-win {
  background: radial-gradient(circle at center, rgba(239, 169, 59, .35), transparent 70%);
  border: 2px solid #efa93b; border-radius: 12px; padding: 12px; margin: 12px 0; text-align: center;
}
.tg-hearts { font-size: 28px; }
.tg-wait, .tg-wait-note { background: rgba(255, 255, 255, .10); border-radius: 8px; padding: 10px; margin: 10px 0; font-size: 14px; }
html[data-theme="light"] .tg-wait, html[data-theme="light"] .tg-wait-note { background: rgba(61, 34, 56, .06); }
.tg-how { background: rgba(0, 0, 0, .25); border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 14px; line-height: 1.5; }
html[data-theme="light"] .tg-how { background: rgba(255, 255, 255, .6); }
.tg-how h4 { margin: 0 0 6px; }
.tg-high-contrast .tg-table { background: #000; color: #fff; border-color: #fff; }
.tg-high-contrast .tg-card { background: #fff; color: #000; border-color: #fff; }
.tg-high-contrast .tg-mini-card { background: #fff; color: #000; }
.tg-large-cards .tg-card { min-width: 60px; min-height: 76px; font-size: 19px; }
.tg-large-cards .tg-mini-card { min-width: 30px; font-size: 16px; }
@media (max-width: 420px) {
  .tg-table { padding: 10px; }
  .tg-card { min-width: 44px; min-height: 56px; font-size: 14px; }
  .tg-actions { flex-wrap: wrap; }
  .tg-actions .btn { flex: 1 1 45%; }
  .tg-meld-row .btn { flex: 1 1 100%; }
}
@media (min-width: 768px) {
  .tg-table { padding: 18px; }
  .tg-card { min-width: 60px; min-height: 76px; font-size: 17px; }
}
@media (min-width: 1024px) {
  .tg-table { padding: 20px; }
}
