.solo-overlay {
  z-index: 300;
  background: rgb(0 0 0 / 0.65);
  backdrop-filter: blur(2px);
}

.solo-dialog {
  width: 360px;
  max-width: 90vw;
  padding: 28px 24px 20px;
  box-shadow: var(--shadow-modal);
  animation: dialog-in 0.15s ease-out;
}

.solo-dialog-wide {
  display: flex;
  flex-direction: column;
  width: 680px;
  max-height: 80vh;
}

.solo-dialog-title { margin-bottom: 20px; font-size: 1.1rem; font-weight: 700; }
.solo-dialog-desc  { color: var(--text-mid); }

.solo-dialog-btns {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 10px;
  margin-top: 20px;
}
.solo-dialog-btns-spacer { flex: 1; }

/* ---- Card preview overlay ---- */
.solo-preview-overlay { background: var(--overlay-bg-deep); cursor: pointer; }

.solo-preview-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.8);
  animation: dialog-in 0.15s ease-out;
}

/* ---- Toast stack ---- */
.solo-toast-stack {
  position: fixed;
  bottom: 60px;
  left: 50%;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: min(560px, 90vw);
  transform: translateX(-50%);
  pointer-events: none;
}

.solo-toast-item {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 16px;
  background: rgb(20 22 38 / 0.82);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.4);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(10px) scale(0.97);
  pointer-events: auto;
  will-change: opacity, transform;
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.3s ease;
}
.solo-toast-item.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* Dim older entries so the newest reads as primary. */
.solo-toast-item:not(:last-child)          { filter: brightness(0.78) saturate(0.85); }
.solo-toast-item:nth-last-child(n + 3)     { filter: brightness(0.6)  saturate(0.7); }
.solo-toast-item:nth-last-child(n + 5)     { filter: brightness(0.45) saturate(0.55); }
.solo-toast-stack:hover .solo-toast-item   { filter: none; }

.solo-toast-item.is-leaving { opacity: 0; transform: translateY(-4px) scale(0.98); }

.solo-toast-item[data-type="effect"] {
  background: rgb(28 32 54 / 0.88);
  border-color: rgb(200 168 75 / 0.55);
  box-shadow: 0 0 18px rgb(200 168 75 / 0.18), 0 6px 24px rgb(0 0 0 / 0.45);
}
.solo-toast-item[data-type="warn"] {
  border-color: rgb(255 120 80 / 0.5);
  color: var(--text-mid);
}

/* ---- Go-first choice ---- */
.solo-choice-items { display: flex; flex-direction: column; gap: 10px; }

.solo-choice-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.solo-choice-item:hover { border-color: var(--text-mid); background: var(--border); }

.solo-choice-label { font-size: 1rem; font-weight: 700; }
.solo-choice-desc  { color: var(--text-dim); font-size: 0.78rem; }

/* ---- Mulligan ---- */
.solo-mulligan-side {
  margin-left: 8px;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: normal;
  vertical-align: middle;
}

.solo-mulligan-hand {
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.solo-mulligan-hint {
  min-height: 1.2em;
  color: var(--text-mid);
  font-size: 0.85rem;
  text-align: center;
}

/* ---- Shared card grid (mulligan hand + zone list modals) ---- */
.modal-card-grid {
  display: flex;
  flex-wrap: wrap;
  overflow-y: auto;
}
.solo-mulligan-hand   .solo-card img { width: auto; height: 110px; }
.solo-modal-card-list .solo-card img { width: auto; height: 88px; }

/* ---- Card selection / draw states ---- */
.solo-card.selected       { opacity: 0.35; filter: grayscale(0.8); }
.solo-card.selected:hover { opacity: 0.55; }

.solo-card.mulligan-new {
  box-shadow: 0 0 0 2px var(--blue), 0 2px 10px color-mix(in srgb, var(--blue) 25%, transparent);
}
.solo-card.mulligan-new:hover,
.solo-card.newly-drawn:hover {
  box-shadow: 0 0 0 2px var(--blue), 0 4px 14px rgb(0 0 0 / 0.5);
}

@keyframes drawn-glow {
  0%   { box-shadow: 0 0 0 3px rgb(64 200 255 / 0.9),  0 0 18px rgb(64 200 255 / 0.7); }
  70%  { box-shadow: 0 0 0 2px rgb(64 200 255 / 0.5),  0 0 8px  rgb(64 200 255 / 0.3); }
  100% { box-shadow: 0 0 0 2px rgb(64 200 255 / 0.35), 0 0 4px  rgb(64 200 255 / 0.15); }
}
.solo-card.newly-drawn {
  box-shadow: 0 0 0 2px rgb(64 200 255 / 0.35), 0 0 4px rgb(64 200 255 / 0.15);
  animation: drawn-glow 0.7s ease-out;
}

/* ---- Zone list modals ---- */
.solo-modal-card-list { flex: 1; gap: 4px; }

/* ---- Game end ---- */
.solo-game-end-msg {
  margin-top: -12px;
  color: var(--text-mid);
  font-size: 0.9rem;
}

.solo-end-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 16px 0 4px;
  padding: 12px;
  background: var(--border);
  border-radius: var(--radius-md);
}
.solo-end-stat       { display: flex; flex-direction: column; gap: 2px; }
.solo-end-stat-label { color: var(--text-dim); font-size: 0.72rem; }
.solo-end-stat-value { font-size: 1rem; font-weight: 700; }
