/* Signal Tap Duel (w040) */
.td { display: grid; gap: 1rem; }
.td > *, .td .kit-card > * { min-width: 0; }
.td-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; border: 1px solid var(--border); border-radius: .8rem; background: #0c1220; }
.td-modes button { border: 0; background: transparent; }
.td-modes button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.td-seat { color: var(--muted); font-weight: 500; }
.td-names .kit-fields { padding-top: 0; }
.td-go { min-height: 56px; padding-inline: 2rem; font-size: 1.15rem; }
.td-how { border: 1px solid var(--border); border-radius: .85rem; background: #0c1220; }
.td-how summary { display: flex; align-items: center; min-height: 48px; padding: .5rem 1rem; cursor: pointer; font-weight: 700; }
.td-how-body { display: grid; gap: .5rem; padding: 0 1rem 1rem; }
.td-how-body p { margin: 0; }
.td-records { display: grid; gap: .5rem; padding: 1rem; border: 1px solid var(--border); border-radius: .85rem; }
.td-records h2 { margin: 0; }

/* Arena: two big touch halves that fill the screen while playing. */
body.td-playing .kit-top, body.td-playing .kit-lead, body.td-playing .kit-local, body.td-playing #tool-title { display: none; }
body.td-playing .kit-tool { padding: .5rem; }
.td-arena { display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); gap: .5rem; height: calc(100svh - 2.5rem); min-height: 420px; max-height: 900px; }
.td-arena[data-mode="solo"] { grid-template-rows: auto minmax(0, 1fr); }
.td-arena[data-mode="solo"] .td-center { order: -1; }
.td-pad { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 150px; padding: 1rem; border: 3px solid transparent; border-radius: 1.1rem; background: #1a2233; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.td-pad-inner { display: grid; gap: .4rem; justify-items: center; text-align: center; pointer-events: none; }
.td-pad-name { font-size: 1.05rem; font-weight: 700; opacity: .9; }
.td-pad-msg { font-size: clamp(1.6rem, 8vw, 3rem); font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.td-pad-score { font-size: 1rem; font-weight: 700; opacity: .85; font-variant-numeric: tabular-nums; }
.td-pad[data-won="true"] { border-color: #ffd36e; }
.td-arena[data-state="waiting"] .td-pad { background: #b42318; }
.td-arena[data-state="go"] .td-pad { background: #14833b; }
.td-arena[data-state="false"] .td-pad { background: #5b3a0a; }
.td-arena[data-state="over"] .td-pad { background: #1f2a40; }
.td-center { display: grid; gap: .4rem; justify-items: center; text-align: center; }
.td-round { margin: 0; font-weight: 700; min-height: 1.5em; overflow-wrap: anywhere; }
.td-center-actions { justify-content: center; }
.td-center-actions button { min-height: 48px; }
/* Phones and tablets lie flat between the players: the top half faces the person opposite. */
@media (pointer: coarse) {
  .td-pad.top .td-pad-inner { transform: rotate(180deg); }
}
@media (pointer: fine) and (min-width: 900px) {
  .td-arena[data-mode="duel"] { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: min(70vh, 640px); }
  .td-arena[data-mode="duel"] #pad-bottom { order: -1; }
  .td-arena[data-mode="duel"] .td-center { align-content: center; max-width: 16rem; }
}

.td-result { display: grid; gap: .75rem; padding: 1.25rem; border: 2px solid var(--accent); border-radius: 1rem; background: #13231f; text-align: center; }
.td-result h2 { margin: 0; font-size: clamp(1.4rem, 6vw, 2rem); }
.td-result-detail { margin: 0; font-size: 1.15rem; font-weight: 700; }
.td-rounds { display: grid; gap: .2rem; margin: 0 auto; padding-inline-start: 1.25rem; text-align: start; color: var(--muted); }
.td-result-actions { justify-content: center; }
.td-result .kit-status:empty { display: none; }
