/* ============================================================
 * 13. Hand Bar + End Turn
 * ============================================================ */

/* hand-bar（v7.7 重新组织，用户反馈调整）：
 * 位置：cards 上方（上移）
 * 内容：deck-row 左 + 结束回合 button 右
 * 隐藏：hand-tip 描述（"战术链 X张 / 牌名 / 剩余N / 资源..." 信息卡牌已有）
 */
#hand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: 0;
  margin-bottom: var(--gap-module);
}

/* hand-tip 作为手牌区的文字提示层，内容由 hover/默认态实时更新 */
#hand-tip {
  display: none;
  min-width: 0;
}

/* deck-row 在 hand-bar 内部：左侧单行小字 "抽 X · 手 Y · 弃 Z · 消耗 W" */
#hand-bar #deck-row {
  display: flex;
  gap: 0;
  padding: 0;
  background: none;
  border: none;
  margin: 0;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  flex: 1;
}

#hand-bar #deck-row .pile {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: var(--text-dim);
  display: inline;
}

#hand-bar #deck-row .pile:not(:last-child)::after {
  content: " · ";
  color: var(--border-default);
  margin: 0 8px;
}

#hand-bar #deck-row .pile strong {
  color: var(--text-main);
  margin-left: 4px;
  font-weight: bold;
}

/* 默认（出牌阶段：结束回合 / 结算本回合 = 弃权语义）
 * outline 风格，金色边框 + 透明背景，存在感低 —— 避免抢镜手牌
 */
#end-turn-btn {
  padding: 8px 28px;
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-dim);
  border-radius: 0;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}

#end-turn-btn:hover {
  background: rgba(229, 181, 103, 0.08);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

#end-turn-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
 * 14. Reward Box
 * ============================================================ */

#reward-box {
  display: none;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--gold-primary);
  border-radius: 0;
  margin-bottom: var(--gap-module);
}

#reward-box.show,
#reward-box.active {
  display: block;
}

#reward-box .verdict {
  font-size: 14px;
  font-weight: bold;
  color: var(--gold-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#reward-box .stats {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.6;
}

#reward-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.reward {
  flex: 1;
  min-width: 180px;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border-default);
  border-radius: 0;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.reward:hover {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-card), var(--shadow-gold-glow);
}

.modal-overlay.trait-reward-modal .modal-content {
  width: min(780px, 86vw);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.reward-shell-minimal .reward-head {
  margin-bottom: 18px;
}

.reward-head-minimal {
  align-items: flex-start;
}

#reward-box .reward-head-minimal .verdict.gold {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 1px;
}

.reward-trait-clean {
  min-width: 190px;
  min-height: 250px;
  padding: 22px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  animation: v79-post-match-card-in 260ms ease both;
  animation-delay: var(--reward-delay, 0ms);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.reward-trait-clean:hover,
.reward-trait-clean:focus-visible {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-card), var(--shadow-gold-glow);
  outline: none;
  transform: translateY(-2px);
}

.trait-reward-icon {
  min-height: 52px;
  margin-bottom: 12px;
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .5));
}

.trait-reward-name {
  margin-bottom: 8px;
  color: var(--text-main, #e9edf2);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.trait-reward-chip {
  margin-bottom: 14px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  color: var(--trait-chip-color, #f0d99b);
  background: var(--trait-chip-bg, rgba(240, 217, 155, .08));
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.trait-tone-attack {
  --trait-chip-color: #ff9b72;
  --trait-chip-bg: rgba(255, 138, 99, .14);
}

.trait-tone-defense {
  --trait-chip-color: #76c7ff;
  --trait-chip-bg: rgba(91, 182, 255, .14);
}

.trait-tone-camp {
  --trait-chip-color: #d3a6ff;
  --trait-chip-bg: rgba(199, 155, 240, .14);
}

.trait-tone-tempo {
  --trait-chip-color: #8fe3c0;
  --trait-chip-bg: rgba(143, 227, 192, .14);
}

.trait-reward-effect {
  min-height: 42px;
  margin-bottom: 18px;
  color: var(--text-primary, #e8e8e8);
  font-size: 14px;
  line-height: 1.5;
}

.trait-reward-effect strong {
  color: var(--gold-primary, #f0d99b);
  font-weight: 800;
}

.reward-trait-clean .trait-reward-action {
  width: 100%;
  margin-top: auto;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--gold-primary, #f0d99b);
  border-color: var(--gold-primary, #f0d99b);
  color: #0c0e0d;
  font-size: 14px;
  box-shadow: none;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.reward-trait-clean:hover .trait-reward-action,
.reward-trait-clean:focus-visible .trait-reward-action {
  background: #fff0b8;
  box-shadow: var(--shadow-gold-glow);
  transform: translateY(-1px);
}

.reward-trait-clean.picked .trait-reward-action {
  background: rgba(95, 184, 120, .9);
  border-color: rgba(95, 184, 120, .9);
  color: #06120b;
}

.reward-trait-clean.locked {
  opacity: .48;
  cursor: default;
  transform: none;
}

.reward-kicker,
.reward-action {
  font-size: 11px;
  color: var(--text-dim);
}

/* ============================================================
 * 15. Gameover
 * ============================================================ */

#gameover {
  display: none;
  padding: 20px;
  background: var(--bg-panel);
  border: 2px solid var(--gold-primary);
  border-radius: 0;
  text-align: center;
  margin-bottom: var(--gap-module);
}

#gameover.show,
#gameover.active {
  display: block;
}

#gameover .final {
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 8px;
  margin: 10px 0;
  color: var(--text-main);
}

#gameover .verdict {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--gold-primary);
}

#gameover .stats {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
}

button.again,
.start-btn {
  margin-top: 12px;
  padding: 10px 32px;
  background: var(--gold-primary);
  color: #1a1a1a;
  border: none;
  border-radius: 0;
  font-weight: bold;
  font-size: 14px;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s;
}

button.again:hover,
.start-btn:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-gold-glow);
}

/* ============================================================
