.view-tcg-game { max-width: 56rem; }
.tg-err {
  margin: 0 0 0.7rem;
  color: #ff8a8a;
  font-size: 0.85rem;
}
.tg-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
.tg-list { display: flex; flex-direction: column; gap: 0.4rem; margin: 0 0 1rem; }
.tg-seat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--skin-line);
  border-radius: 0.5rem;
}
.tg-seat b { font-size: 0.95rem; }
.tg-seat em {
  font-style: normal;
  color: var(--skin-muted);
  font-size: 0.78rem;
}
.tg-code {
  margin: 0 0 0.8rem;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: 0.18em;
}
.tg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0 0;
}
.tg-go, .tg-quiet {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.tg-go {
  background: var(--skin-accent, #6d8cff);
  color: #0b0d12;
}
.tg-go:disabled { opacity: 0.4; cursor: default; }
.tg-quiet.is-on {
  border-color: var(--skin-accent, #6d8cff);
  color: var(--skin-accent, #6d8cff);
}
.tg-open {
  width: 100%;
  cursor: pointer;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.tg-quiet {
  background: transparent;
  color: inherit;
  border: 1px solid var(--skin-line);
}
.tg-join {
  display: flex;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
}
.tg-join input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font: inherit;
  font-weight: 700;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--skin-line);
  background: var(--skin-bg);
  color: inherit;
}
.tg-pts { color: var(--skin-muted); margin: 0 0 0.8rem; }
.tg-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.tg-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid var(--skin-line);
  display: block;
}
.tg-card .tg-lines {
  font-size: 0.68rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.tg-card .tg-name {
  font-size: 0.72rem;
  font-weight: 650;
}
.tg-card .is-hot { font-weight: 750; }
.tg-hi { color: #3ecf7a; }
.tg-lo { color: #ff6b6b; }
.tg-card.is-on img { outline: 2px solid var(--skin-accent, #6d8cff); }
.tg-card.is-used { opacity: 0.36; }
.tg-card.is-used { pointer-events: none; }
.tg-blank {
  aspect-ratio: 2 / 3;
  border: 1px dashed var(--skin-line);
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  color: var(--skin-muted);
  background: rgb(0 0 0 / 0.12);
}
.tg-cat { display: flex; flex-direction: column; gap: 0.35rem; }
.tg-cat-h {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 750;
}
.tg-cat-h i { width: 0.9rem; text-align: center; }
.tg-cat.is-pick img, .tg-blank.is-pick {
  outline: 2px solid var(--skin-accent, #6d8cff);
}
.tg-note { color: var(--skin-muted); font-size: 0.85rem; margin: 0 0 0.7rem; }
.tg-clock {
  font-size: 1.05rem;
  font-weight: 750;
  margin: 0 0 0.7rem;
}
.tg-big {
  min-height: 40dvh;
  display: grid;
  place-items: center;
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 800;
}
.tg-who { font-size: 0.72rem; font-weight: 650; margin: 0 0 0.15rem; }
.tg-fighter.is-you .tg-who { margin: 0.15rem 0 0; }
.tg-win { color: #3ecf7a; font-weight: 750; }
.tg-arena { max-width: 16.5rem; margin: 0 auto; overflow: visible; }
.tg-brawl {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  overflow: visible;
}
.tg-fighter {
  position: relative;
  text-align: center;
  --hurt: 0;
  --boom: 0;
  overflow: visible;
  transition: transform 0.32s ease-out, opacity 0.7s ease;
}
.tg-body {
  display: grid;
  grid-template-columns: 3.15rem minmax(0, 7.2rem) 3.15rem;
  justify-content: center;
  align-items: start;
  gap: 0.18rem;
}
.tg-fighter .tg-card,
.tg-fighter .tg-blank { width: 100%; }
.tg-fighter .tg-card .tg-name,
.tg-fighter .tg-card .tg-lines { display: none; }
.tg-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding-top: 0.12rem;
}
.tg-stat.is-l { align-items: flex-end; }
.tg-stat.is-r { align-items: flex-start; }
.tg-stat-n {
  font-size: 0.58rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--skin-muted);
  line-height: 1.2;
  text-align: inherit;
}
.tg-mark {
  position: static;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
  padding: 0.12rem 0.26rem;
  border-radius: 999px;
  pointer-events: none;
  color: #f4edd4;
  background: radial-gradient(circle at 32% 28%, #3a4634, #141812 72%);
  border: 2px solid #c9b36a;
  box-shadow: 0 0 0 2px rgb(0 0 0 / 0.45), 0 4px 10px rgb(0 0 0 / 0.35);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}
.tg-mark[hidden] { display: none !important; }
.tg-mark i {
  font-style: normal;
  font-weight: 650;
  color: #c9b36a;
  opacity: 0.75;
}
.tg-mark b { font-size: 0.72rem; }
.tg-hp .fa-heart {
  color: #ff6b8a;
  opacity: 1;
  font-size: 0.62rem;
}
.tg-fighter.is-foe .tg-card { transform: rotate(180deg); }
.tg-swing em {
  font-size: 0.68rem;
  font-style: normal;
  color: #f0d36a;
}
.tg-swing em.is-tick { animation: tg-swing-tick 0.28s ease; }
.tg-swing-blade {
  width: 0.38rem;
  height: 1.05rem;
  flex: none;
  color: #efe6c8;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.45));
}
@keyframes tg-swing-tick {
  50% { transform: scale(1.28); }
}
.tg-fighter .tg-card {
  position: relative;
  pointer-events: none;
  cursor: default;
}
.tg-fighter .tg-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  aspect-ratio: 2 / 3;
  border-radius: 0.4rem;
  pointer-events: none;
  background: rgb(150 6 18 / calc(var(--hurt, 0) * 0.78));
  mix-blend-mode: multiply;
}
.tg-fighter.is-lunge { z-index: 3; }
.tg-fighter.is-you.is-lunge { transform: translateY(-14%); }
.tg-fighter.is-foe.is-lunge { transform: translateY(14%); }
.tg-fighter.is-hit .tg-card img { animation: tg-shake 0.42s ease; }
.tg-fighter.is-boom .tg-card img { animation: tg-impact 0.55s ease; }
.tg-fighter.is-down { opacity: 0; }
.tg-fighter.is-win .tg-who { color: #3ecf7a; }
.tg-clash-line {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: center;
}
.tg-float {
  position: absolute;
  left: 50%;
  top: 20%;
  z-index: 2;
  font-size: calc(1rem + var(--boom, 0.2) * 1.35rem);
  font-weight: 800;
  color: #ff8a8a;
  pointer-events: none;
  animation: tg-pop 0.85s ease-out forwards;
}
@keyframes tg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(calc(-5px - var(--boom, 0.2) * 12px)); }
  55% { transform: translateX(calc(5px + var(--boom, 0.2) * 12px)); }
}
@keyframes tg-impact {
  0% { transform: scale(1); }
  28% {
    transform: scale(calc(1 + var(--boom, 0.2) * 0.24));
    filter: brightness(calc(1.1 + var(--boom, 0.2) * 0.55));
  }
  100% { transform: scale(1); }
}
@keyframes tg-pop {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, calc(-1.2rem - var(--boom, 0.2) * 1.1rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .tg-fighter.is-you.is-lunge,
  .tg-fighter.is-foe.is-lunge { transform: none; }
  .tg-fighter.is-hit .tg-card img,
  .tg-fighter.is-boom .tg-card,
  .tg-float,
  .tg-swing em.is-tick { animation: none; }
}
.tg-board { margin: 0 0 1rem; }
.tg-pick {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  align-items: start;
  gap: 0.45rem 0.7rem;
}
.tg-pick-tools {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
}
.tg-pick-tools-gap {
  width: 0.28rem;
  height: 1rem;
  border-left: 1px solid var(--skin-line, rgb(255 255 255 / 0.12));
}
.tg-ico {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--skin-muted);
  cursor: pointer;
}
.tg-ico i { font-size: 0.78rem; }
.tg-ico.is-on {
  color: var(--skin-accent);
  background: color-mix(in srgb, var(--skin-accent) 16%, transparent);
}
.tg-rare-slide {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 7.5rem;
}
.tg-rare-lab {
  flex: 0 0 4.4rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--skin-muted);
  white-space: nowrap;
}
.tg-rare-slide input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 1.45rem;
  margin: 0;
  accent-color: var(--skin-accent, #6d8cff);
}
.tg-pick-rail {
  position: sticky;
  top: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: calc(100dvh - var(--topbar-h, 3rem) - var(--stats-h, 2rem) - 3.2rem);
  overflow: auto;
  z-index: 6;
}
.tg-pick-rail .tg-note { margin: 0; font-size: 0.75rem; }
.tg-pick-rail .tg-actions {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 0.25rem 0 0;
  background: var(--skin-bg, #101214);
}
.tg-pick-rail .tg-go {
  width: 100%;
  padding: 0.42rem 0.28rem;
  font-size: 0.72rem;
}
.tg-pick .tg-tray {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.tg-pick-main { min-width: 0; }
.tg-tray {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}
.tg-tray-slot {
  aspect-ratio: 2 / 3;
  border-radius: 0.35rem;
  border: 1px dashed var(--skin-line);
  padding: 0;
  overflow: hidden;
  background: rgb(0 0 0 / 0.12);
}
.tg-tray-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tg-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.4rem, 1fr));
  gap: 0.55rem;
}
.tg-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgb(8 10 12 / 0.62);
  padding: 0;
}
.tg-sheet-in {
  max-height: min(78dvh, 36rem);
  overflow: auto;
  padding: 0.85rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-radius: 0.75rem 0.75rem 0 0;
  background: var(--skin-bg, #101214);
  color: inherit;
}
@media (max-width: 720px) {
  .tg-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tg-pick { grid-template-columns: 4.6rem minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .tg-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-pick { grid-template-columns: 4.15rem minmax(0, 1fr); }
  .tg-ico { width: 1.55rem; height: 1.55rem; }
  .tg-pick-grid { grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); }
}
