/* Tournament tab: async 1:1 duel (GAME_SPEC §4.16). Same cream, gold and
   blue surface as World and Collection (css/contentScreens.css tokens).
   Real elements with ids (web-ui-style.md §6): no pseudo-elements, no forced
   priority on visual properties. */

/* The 1:1 tab pane (#contest-pane-duel) sits inside the tournament scroll: cards stack with the pane's own gap. */
#contest-pane-duel { gap: 12px; }

.duel-card,
.duel-rules,
.duel-recent {
  border: 3px solid var(--cs-gold);
  border-radius: var(--cs-radius);
  background: linear-gradient(180deg, #fffdf5, var(--cs-cream));
  box-shadow: var(--cs-shadow);
  color: var(--cs-brown);
}

.duel-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  text-align: center;
}

.duel-card[data-state="result-win"] {
  border-color: #ffd34e;
  background: linear-gradient(180deg, #fffbe0, #ffe9a6);
}

.duel-card[data-state="result-lose"],
.duel-card[data-state="result-void"] {
  background: linear-gradient(180deg, #fbf8f1, #ece3cf);
}

.duel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.duel-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cs-blue-top), var(--cs-blue-bottom));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.duel-name {
  min-width: 0;
  color: var(--cs-brown-soft);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.duel-status-title {
  margin: 0;
  color: #4a2a10;
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.2;
}

.duel-status-body {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.duel-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
}

.duel-side {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 10px 8px;
  border: 2px solid var(--cs-cream-deep);
  border-radius: 14px;
  background: #fff;
}

.duel-side-name {
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.duel-side-score {
  white-space: pre-line;
  color: var(--cs-brown-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.duel-vs-mark {
  align-self: center;
  color: #4a2a10;
  font-size: 22px;
  font-weight: 900;
}

.duel-deadline {
  margin: 0;
  color: var(--cs-brown-soft);
  font-size: 13px;
  font-weight: 800;
}

.duel-actions {
  display: grid;
  gap: 8px;
}

.duel-btn {
  min-height: 48px;
  padding: 6px 14px;
  border-radius: 16px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.duel-btn--main {
  min-height: 54px;
  border: 2px solid #ffe07a;
  background: linear-gradient(180deg, #5fdc2a, #1f9a0c);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 3px 0 #15700a;
  font-size: 19px;
}

.duel-btn--sub {
  border: 2px solid #ffd34e;
  background: linear-gradient(180deg, var(--cs-blue-top), var(--cs-blue-bottom));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 3px 0 var(--cs-blue-edge);
  font-size: 15px;
}

.duel-btn:disabled {
  background: linear-gradient(180deg, #a9b4c4, #7c899b);
  box-shadow: 0 2px 0 #5d6878;
  cursor: default;
}

.duel-rules,
.duel-recent {
  padding: 12px 16px;
  text-align: left;
}

.duel-panel-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
}

.duel-rules-list,
.duel-recent-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.duel-recent-item[data-outcome="win"] { color: #1f7a0c; }
.duel-recent-item[data-outcome="lose"] { color: #8a3b12; }
.duel-recent-empty { list-style: none; margin-left: -20px; color: var(--cs-brown-soft); }

/* Game board during a duel: time left instead of hearts and hints. */
.hud-duel-timer {
  min-width: 64px;
  padding: 2px 12px;
  border: 2px solid #ffd34e;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cs-blue-top), var(--cs-blue-bottom));
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.hud-duel-timer[data-state="low"] {
  background: linear-gradient(180deg, #ff6b4a, #d8321a);
}

body.in-duel #hud-hearts,
body.in-duel #hud-hints,
body.in-duel #btn-hint {
  visibility: hidden;
}

/* Today's roulette spins left (server: winTicketsToday). */
.duel-tickets {
  margin: 0;
  color: #4a2a10;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.duel-tickets:empty {
  display: none;
}
