.cinzel { font-family: 'Cinzel', serif; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ─── Target section ────────────────────────────────────── */

#target-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.35), rgba(15, 23, 42, 0.55));
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.5s ease, box-shadow 0.6s ease, background 0.6s ease;
}

#target-section.outcome-win {
  border-color: rgba(74, 222, 128, 0.65);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.35), rgba(6, 78, 59, 0.45));
  animation: outcome-pulse-win 2.2s ease-in-out infinite alternate;
}

#target-section.outcome-lose {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(180deg, rgba(91, 16, 16, 0.4), rgba(15, 23, 42, 0.55));
  animation: outcome-pulse-lose 2.6s ease-in-out infinite alternate;
}

@keyframes outcome-pulse-win {
  from {
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.3),
      0 0 28px rgba(74, 222, 128, 0.22),
      inset 0 0 40px rgba(74, 222, 128, 0.05);
  }
  to {
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.3),
      0 0 70px rgba(74, 222, 128, 0.55),
      inset 0 0 90px rgba(74, 222, 128, 0.12);
  }
}

@keyframes outcome-pulse-lose {
  from {
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.3),
      0 0 26px rgba(239, 68, 68, 0.2),
      inset 0 0 40px rgba(239, 68, 68, 0.04);
  }
  to {
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.3),
      0 0 65px rgba(239, 68, 68, 0.5),
      inset 0 0 80px rgba(239, 68, 68, 0.1);
  }
}

.target-top {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.target-card-wrapper {
  width: 220px;
  height: 308px;
  position: relative;
  flex-shrink: 0;
}

.rules-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  width: 240px;
  font-size: 11.5px;
  color: rgb(203, 213, 225);
  font-family: 'JetBrains Mono', monospace;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rules-title {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgb(251, 191, 36);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.22);
}

.rules-group { margin-bottom: 14px; }
.rules-group:last-child { margin-bottom: 0; }

.rules-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rules-group li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
  line-height: 1.4;
  font-size: 11px;
}

.rules-group li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: rgba(168, 85, 247, 0.7);
  font-size: 7px;
  top: 4px;
}

.rules-group code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10px;
  color: rgb(251, 191, 36);
}

.rules-row {
  margin: 5px 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rules-row .value {
  color: rgb(251, 191, 36);
  font-weight: 700;
}

#rules-colors {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

#rules-colors .mana-dot { width: 11px; height: 11px; }
#rules-colors .mana-dot.disabled { opacity: 0.18; filter: grayscale(1); }

@media (max-width: 600px) {
  .rules-box { width: 100%; max-width: 320px; align-self: center; }
}

.silhouette {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  background:
    radial-gradient(ellipse at center, rgba(168, 85, 247, 0.18) 0%, transparent 55%),
    linear-gradient(135deg, #1a0f3a 0%, #0a0a1a 50%, #1a0a2e 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.75),
    inset 0 0 60px rgba(168, 85, 247, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.silhouette::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 7px;
  pointer-events: none;
}

.silhouette::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.06), transparent 50%);
  pointer-events: none;
}

.silhouette-mark {
  font-family: 'Cinzel', serif;
  font-size: 130px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.65), rgba(124, 58, 237, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 50px rgba(251, 191, 36, 0.35);
  z-index: 1;
  line-height: 1;
  margin-bottom: 10px;
}

.silhouette.drawing {
  animation: silhouette-pulse 0.85s ease-in-out infinite alternate;
}
.silhouette.drawing .silhouette-mark {
  animation: mark-pulse 0.85s ease-in-out infinite alternate;
}

@keyframes silhouette-pulse {
  from {
    box-shadow:
      0 12px 36px rgba(0, 0, 0, 0.75),
      inset 0 0 60px rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.35);
    transform: scale(1);
  }
  to {
    box-shadow:
      0 16px 50px rgba(251, 191, 36, 0.45),
      inset 0 0 90px rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.65);
    transform: scale(1.015);
  }
}

@keyframes mark-pulse {
  from { opacity: 0.55; transform: scale(0.94); }
  to   { opacity: 1;    transform: scale(1.08); }
}

.target-status.drawing {
  background: linear-gradient(
    90deg,
    rgb(148, 163, 184) 0%,
    rgb(251, 191, 36) 50%,
    rgb(148, 163, 184) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: status-shimmer 1.4s linear infinite;
}

@keyframes status-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.target-revealed {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(251, 191, 36, 0.3);
  animation: reveal-fade 0.6s ease-out;
}

@keyframes reveal-fade {
  0%   { opacity: 0; transform: scale(0.92) rotateY(-15deg); }
  100% { opacity: 1; transform: scale(1) rotateY(0); }
}

.target-status {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgb(148, 163, 184);
  margin: 0;
}
.target-status.win  { color: rgb(110, 231, 183); text-shadow: 0 0 12px rgba(110, 231, 183, 0.35); }
.target-status.lose { color: rgb(253, 164, 175); text-shadow: 0 0 12px rgba(253, 164, 175, 0.35); }

.target-name {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 700;
  color: rgb(251, 191, 36);
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
  margin: -6px 0 0;
  text-align: center;
}

.target-artist {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: rgb(148, 163, 184);
  font-style: italic;
  letter-spacing: 0.02em;
  margin: 2px 0 0;
}
.target-artist svg { opacity: 0.7; flex-shrink: 0; }

.target-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#new-game-btn, #daily-game-btn, #create-game-btn, #leave-challenge-btn {
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.2s ease;
  border: 1px solid rgba(168, 85, 247, 0.4);
  cursor: pointer;
}

#leave-challenge-btn {
  background: linear-gradient(140deg, rgba(71, 85, 105, 0.85), rgba(51, 65, 85, 0.85));
  color: rgb(226, 232, 240);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
#leave-challenge-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(253, 164, 175, 0.5);
  color: rgb(253, 164, 175);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.25);
}
#leave-challenge-btn.hidden { display: none; }

.mode-banner {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 20px;
  margin: -4px 0 2px;
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mode-banner.hidden { display: none; }

/* Challenge mode — teal */
.mode-banner.mode-challenge {
  background: linear-gradient(140deg, rgba(13, 148, 136, 0.32), rgba(17, 94, 89, 0.42));
  border-color: rgba(45, 212, 191, 0.55);
  color: rgb(94, 234, 212);
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.5);
  box-shadow: 0 0 18px rgba(13, 148, 136, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mode-banner.mode-challenge .mode-banner-dot {
  background: rgb(94, 234, 212);
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.9);
}

/* Daily mode — emerald (matches Daily button) */
.mode-banner.mode-daily {
  background: linear-gradient(140deg, rgba(16, 185, 129, 0.32), rgba(4, 120, 87, 0.42));
  border-color: rgba(110, 231, 183, 0.55);
  color: rgb(110, 231, 183);
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mode-banner.mode-daily .mode-banner-dot {
  background: rgb(110, 231, 183);
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.9);
}

/* Solo mode — violet (matches Solo button) */
.mode-banner.mode-solo {
  background: linear-gradient(140deg, rgba(124, 58, 237, 0.32), rgba(91, 33, 182, 0.42));
  border-color: rgba(196, 181, 253, 0.55);
  color: rgb(196, 181, 253);
  text-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mode-banner.mode-solo .mode-banner-dot {
  background: rgb(196, 181, 253);
  box-shadow: 0 0 8px rgba(196, 181, 253, 0.9);
}

.mode-banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: mode-banner-blink 1.6s ease-in-out infinite;
}

@keyframes mode-banner-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.85); }
}

#create-game-btn {
  background: linear-gradient(140deg, #d97706, #b45309);
  color: white;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.3);
}
#create-game-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(251, 191, 36, 0.45);
}
#create-game-btn:disabled { opacity: 0.5; cursor: not-allowed; }

#new-game-btn {
  background: linear-gradient(140deg, #7c3aed, #5b21b6);
  color: white;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}
#new-game-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.5);
}
#new-game-btn:disabled { opacity: 0.5; cursor: not-allowed; }

#daily-game-btn {
  background: linear-gradient(140deg, #10b981, #047857);
  color: white;
  border-color: rgba(110, 231, 183, 0.5);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}
#daily-game-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.55);
}
#daily-game-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#daily-game-btn.daily-done {
  background: linear-gradient(140deg, rgba(16, 185, 129, 0.45), rgba(4, 120, 87, 0.55));
  color: rgb(187, 247, 208);
  border-color: rgba(110, 231, 183, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
  opacity: 1;
  cursor: default;
}
#daily-game-btn.daily-done:hover {
  transform: none;
}

/* ─── Options modal ─────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
  animation: fade-in 0.2s ease-out;
}
.modal-backdrop.hidden { display: none; }

.modal-panel {
  background: linear-gradient(180deg, #1a1530, #0d0b1d);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 14px;
  padding: 22px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(168, 85, 247, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: pop-in 0.25s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.18);
}
.modal-header h3 {
  font-size: 20px;
  color: rgb(251, 191, 36);
  letter-spacing: 0.1em;
  margin: 0;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
.modal-close {
  background: transparent;
  border: none;
  color: rgb(148, 163, 184);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}
.modal-close:hover { color: rgb(251, 191, 36); }

.option-group { margin-bottom: 18px; }
.option-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgb(196, 181, 253);
  margin-bottom: 10px;
  font-weight: 700;
}
.option-hint {
  font-size: 11px;
  color: rgb(148, 163, 184);
  margin: 6px 0 0;
  font-style: italic;
}

.color-toggles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.color-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: all 0.15s;
  cursor: pointer;
  color: rgb(148, 163, 184);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}
.color-toggle:hover { border-color: rgba(168, 85, 247, 0.35); }
.color-toggle.active {
  background: linear-gradient(140deg, rgba(124, 58, 237, 0.32), rgba(91, 33, 182, 0.28));
  border-color: rgba(251, 191, 36, 0.5);
  color: rgb(251, 191, 36);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.color-toggle:not(.active) .mana-dot { opacity: 0.35; }

.color-toggle.shake {
  animation: color-shake 0.32s ease;
  border-color: rgba(239, 68, 68, 0.7) !important;
}

@keyframes color-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.cmc-controls {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.cmc-op-toggles {
  display: flex;
  gap: 2px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 3px;
}

.cmc-op {
  padding: 7px 12px;
  border-radius: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgb(148, 163, 184);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s;
  min-width: 32px;
}
.cmc-op:hover:not(.active) { color: rgb(203, 213, 225); }
.cmc-op.active {
  background: linear-gradient(140deg, rgba(124, 58, 237, 0.45), rgba(91, 33, 182, 0.4));
  color: rgb(251, 191, 36);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

#max-cmc-input {
  flex: 1;
  min-width: 70px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  transition: border-color 0.15s, opacity 0.15s;
}
#max-cmc-input:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}
#max-cmc-input:disabled { opacity: 0.4; cursor: not-allowed; }

#create-cmc-input,
#create-card-input,
#challenger-name {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  transition: border-color 0.15s;
}
#create-cmc-input { flex: 1; min-width: 70px; }
#create-cmc-input:focus,
#create-card-input:focus,
#challenger-name:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}
#create-cmc-input:disabled { opacity: 0.4; cursor: not-allowed; }

.card-picker-list {
  list-style: none;
  padding: 4px;
  margin: 6px 0 0;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
}
.card-picker-list li {
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 5px;
  color: rgb(203, 213, 225);
  font-size: 13px;
  transition: background 0.1s;
  line-height: 1.3;
}
.card-picker-list li:hover {
  background: rgba(168, 85, 247, 0.18);
}
.card-picker-list li.selected {
  background: linear-gradient(140deg, rgba(251, 191, 36, 0.28), rgba(217, 119, 6, 0.22));
  color: rgb(251, 191, 36);
  font-weight: 700;
}
.card-picker-list .empty {
  text-align: center;
  color: rgb(148, 163, 184);
  font-style: italic;
  padding: 14px;
  font-size: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(168, 85, 247, 0.18);
}
.btn-primary, .btn-secondary {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 9px 18px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: linear-gradient(140deg, #fbbf24, #d97706);
  border-color: rgba(251, 191, 36, 0.5);
  color: #1f1500;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.45);
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.15);
}
.btn-primary.copied {
  background: linear-gradient(140deg, #4ade80, #16a34a);
  border-color: rgba(74, 222, 128, 0.6);
  color: #052e1e;
  box-shadow: 0 4px 14px rgba(74, 222, 128, 0.4);
}

.modal-intro {
  color: rgb(196, 181, 253);
  font-size: 12.5px;
  line-height: 1.5;
  margin: -6px 0 16px;
  font-style: italic;
  text-align: center;
}
.btn-secondary {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(148, 163, 184, 0.25);
  color: rgb(203, 213, 225);
}
.btn-secondary:hover { background: rgba(51, 65, 85, 0.8); }

.challenger-name {
  font-style: normal;
  font-family: 'Cinzel', serif;
  color: rgb(251, 191, 36);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

/* ─── Challenge Awaits modal layout ─────────────────────── */

.challenger-spotlight {
  text-align: center;
  margin: 6px 0 4px;
  padding: 8px 0 14px;
}

.challenger-name-big {
  font-family: 'Cinzel', serif;
  font-size: 36px;
  font-weight: 700;
  color: rgb(251, 191, 36);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0;
  word-break: break-word;
  animation: challenger-glow 2.6s ease-in-out infinite alternate;
}

@keyframes challenger-glow {
  from {
    text-shadow:
      0 0 14px rgba(251, 191, 36, 0.35),
      0 0 30px rgba(251, 191, 36, 0.15);
  }
  to {
    text-shadow:
      0 0 24px rgba(251, 191, 36, 0.7),
      0 0 50px rgba(251, 191, 36, 0.35);
  }
}

.challenger-suffix {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: rgb(196, 181, 253);
  letter-spacing: 0.12em;
  margin: 6px 0 0;
}

.challenge-divider {
  margin: 6px 0 14px;
}

.challenge-rules-section {
  margin: 0 4px 6px;
}

.challenge-rules-group-title {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgb(251, 191, 36);
  font-weight: 700;
  margin: 12px 0 6px;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}
.challenge-rules-group-title:first-child { margin-top: 0; }

.challenge-rules-list {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgb(203, 213, 225);
}
.challenge-rules-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.challenge-rules-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: rgba(168, 85, 247, 0.7);
  font-size: 7px;
  top: 6px;
}
.challenge-rules-list code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 10.5px;
  color: rgb(251, 191, 36);
}
.challenge-rules-list .value {
  color: rgb(251, 191, 36);
  font-weight: 700;
}
.challenge-rules-list #challenge-colors {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  vertical-align: middle;
}
.challenge-rules-list #challenge-colors .mana-dot { width: 11px; height: 11px; }

.rules-row-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(196, 181, 253);
  font-weight: 700;
  margin-right: 4px;
}

.challenge-error-text {
  color: rgb(253, 164, 175);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 8px;
  text-align: center;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.guess-row {
  display: flex;
  gap: 20px;
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.45), rgba(15, 23, 42, 0.6));
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.22);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: pop 0.35s ease-out;
}

.guess-row::before {
  content: '';
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.45), transparent);
}

@media (max-width: 640px) {
  .guess-row { flex-direction: column; align-items: center; gap: 12px; }
}

/* ─── Card display ──────────────────────────────────────── */

.card-display {
  flex-shrink: 0;
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.card-img {
  width: 180px;
  height: 252px;
  border-radius: 11px;
  object-fit: cover;
  background: #1a1a1a;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-img:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 16px 36px rgba(251, 191, 36, 0.22),
    0 10px 30px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-artist {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10.5px;
  color: rgb(148, 163, 184);
  text-align: center;
  line-height: 1.25;
  font-style: italic;
  letter-spacing: 0.02em;
  max-width: 180px;
}
.card-artist svg { flex-shrink: 0; opacity: 0.7; }

/* ─── Sections ──────────────────────────────────────────── */

.sections {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.section { display: flex; flex-direction: column; gap: 6px; }

.section-divider {
  display: flex;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgb(251, 191, 36);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  padding: 0 4px;
  white-space: nowrap;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
}

.section-divider::before {
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.55) 60%, rgba(251, 191, 36, 0.55));
  margin-right: 12px;
}

.section-divider::after {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.55), rgba(168, 85, 247, 0.55) 40%, transparent);
  margin-left: 12px;
}

.section-divider span::before,
.section-divider span::after {
  content: '◆';
  color: rgba(168, 85, 247, 0.7);
  font-size: 6px;
  margin: 0 8px;
  vertical-align: 2px;
  text-shadow: none;
}

/* ─── Tile groups ───────────────────────────────────────── */

.tiles { display: grid; gap: 5px; }
.tiles-mana       { grid-template-columns: 1fr auto repeat(6, 1fr); }
.tiles-type       { grid-template-columns: 1fr; }
.tiles-type-split { grid-template-columns: 1fr auto 1fr auto 1fr; }
.tiles-name {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  padding: 4px 6px;
}

.name-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 26px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 3px rgba(0, 0, 0, 0.2);
  animation: tile-pop 0.25s ease-out both;
}
.name-tile.green   { background: linear-gradient(140deg, #4ade80, #16a34a); color: #052e1e; }
.name-tile.red     { background: linear-gradient(140deg, #ef4444, #b91c1c); color: #fef2f2; }
.name-tile.space   { background: transparent; width: 8px; box-shadow: none; animation: none; }
.name-tile.neutral {
  background: rgba(15, 23, 42, 0.5);
  color: rgb(203, 213, 225);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

.mana-divider {
  width: 2px;
  margin: 4px 4px;
  align-self: stretch;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(168, 85, 247, 0.55) 25%,
    rgba(251, 191, 36, 0.45) 50%,
    rgba(168, 85, 247, 0.55) 75%,
    transparent
  );
  border-radius: 1px;
  box-shadow: 0 0 5px rgba(168, 85, 247, 0.3);
}
.tiles-stats {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.tiles-stats .attr-tile { width: 78px; }

/* ─── Tiles ─────────────────────────────────────────────── */

.attr-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 58px;
  border-radius: 8px;
  padding: 4px 4px;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  gap: 3px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: tile-pop 0.3s ease-out both;
}

.tiles .attr-tile:nth-child(1) { animation-delay: 40ms; }
.tiles .attr-tile:nth-child(2) { animation-delay: 80ms; }
.tiles .attr-tile:nth-child(3) { animation-delay: 120ms; }
.tiles .attr-tile:nth-child(4) { animation-delay: 160ms; }
.tiles .attr-tile:nth-child(5) { animation-delay: 200ms; }
.tiles .attr-tile:nth-child(6) { animation-delay: 240ms; }
.tiles .attr-tile:nth-child(7) { animation-delay: 280ms; }

.attr-label {
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1;
}

.attr-value {
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.attr-value .arrow {
  font-size: 14px;
  font-weight: 900;
  text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.25);
}
.attr-value .arrow-up   { color: #059669; }
.attr-value .arrow-down { color: #dc2626; }

.type-tile { height: auto; min-height: 54px; padding: 6px 8px; }
.type-tile .attr-value {
  font-size: 11.5px;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stat-tile { height: 64px; }
.stat-tile .attr-value { font-size: 20px; }

/* ─── Status colors ─────────────────────────────────────── */

.tile-green  { background: linear-gradient(140deg, #4ade80, #16a34a); color: #052e1e; }
.tile-yellow { background: linear-gradient(140deg, #fbbf24, #d97706); color: #3a2400; }
.tile-red    { background: linear-gradient(140deg, #ef4444, #b91c1c); color: #fef2f2; }

/* ─── Mana dots ─────────────────────────────────────────── */

.mana-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 -1px 1px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.3);
  vertical-align: middle;
}
.mana-W { background: radial-gradient(circle at 35% 30%, #fffbe6, #f3e9c4); }
.mana-U { background: radial-gradient(circle at 35% 30%, #2a93dc, #0e68ab); }
.mana-B { background: radial-gradient(circle at 35% 30%, #2a2522, #0a0606); border-color: rgba(255,255,255,0.18); }
.mana-R { background: radial-gradient(circle at 35% 30%, #ee4651, #c01620); }
.mana-G { background: radial-gradient(circle at 35% 30%, #239f5e, #006837); }
.mana-C { background: radial-gradient(circle at 35% 30%, #ded6d3, #b8aea9); }

/* ─── Error toast ───────────────────────────────────────── */

.error-toast {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.5);
  color: rgb(253, 164, 175);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 10px;
}

/* ─── Footer ────────────────────────────────────────────── */

.site-footer {
  margin-top: 36px;
  padding: 20px 12px 8px;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  text-align: center;
  font-size: 11px;
  color: rgb(100, 116, 139);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.site-footer p { margin: 2px 0; }

.site-footer a {
  color: rgb(196, 181, 253);
  text-decoration: none;
  transition: color 0.15s;
  border-bottom: 1px dotted rgba(196, 181, 253, 0.4);
}

.site-footer a:hover {
  color: rgb(251, 191, 36);
  border-bottom-color: rgba(251, 191, 36, 0.7);
}

/* ─── Animations ────────────────────────────────────────── */

@keyframes pop {
  0%   { transform: translateY(6px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes tile-pop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}
