/* Deck builder screen (Phase 2, builder-settings-string). The biggest UI in
   the app — its own file per the meta-plan's precedent (style.css stays the
   room/round stylesheet). Reuses the shared tokens/vars from style.css
   (:root, .card, .primary/.secondary buttons, input/select/textarea, .hint,
   .error) — only builder-specific layout lives here. */

#screen-decks { text-align: center; }
#screen-decks .card { text-align: left; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

button.danger { color: var(--danger); border-color: var(--danger); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

/* --- deck list ------------------------------------------------------- */

.deck-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid #3a3e6b;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.deck-row-info { flex: 1; min-width: 0; }
.deck-row-name { font-weight: 700; margin: 0 0 2px; }
.deck-row-info .hint { text-align: left; margin: 0; }
.deck-row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
  width: 96px;
}
.deck-row-actions button { min-height: 36px; margin: 0; font-size: 0.8rem; padding: 0 6px; }

/* --- card list (accordion) -------------------------------------------- */

.deck-card-row {
  border: 1px solid #3a3e6b;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.deck-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
}
.deck-card-row.open .deck-card-head { border-bottom: 1px solid #3a3e6b; }
.deck-card-num { color: var(--muted); flex: none; }
.deck-card-prompt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.deck-card-row-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
}
.deck-card-row-actions button { margin: 0; min-height: 40px; font-size: 0.85rem; }

.card-editor { padding: 4px 14px 14px; text-align: left; }
.card-editor-actions { margin-top: 12px; }
.card-editor-actions button { margin: 0; }

/* --- answer tap-to-set preview ----------------------------------------- */

.answer-preview {
  position: relative;
  background: var(--card);
  border: 1px solid #3a3e6b;
  border-radius: 10px;
  overflow: hidden;
  margin: 6px 0 10px;
  touch-action: none;
  cursor: crosshair;
}
.answer-preview.kind-scale { aspect-ratio: 5 / 2; }
.answer-preview.kind-plane { aspect-ratio: 1 / 1; }
.answer-preview.kind-image { aspect-ratio: 1.9 / 1; }
.answer-preview.kind-image.asset-mo-map { aspect-ratio: 1.2 / 1; }
.answer-preview.kind-bullseye { aspect-ratio: 1 / 1; }
.answer-marker {
  position: absolute;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: transparent;
  border: 3px dashed var(--danger);
  pointer-events: none;
}

.card-image-preview {
  max-width: 100%;
  max-height: 160px;
  display: block;
  margin: 8px 0;
  border-radius: 8px;
}
.card-image-preview.fill {
  max-height: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.deck-editor-footer { margin-top: 16px; }

/* The answer preview's backdrop layer: filled by the game screen's renderer
   (built-in map SVGs, plane axes, scale line, bullseye rings, custom image).
   Absolute + inset so the tap-to-place marker above it keeps its geometry. */
.preview-backdrop { position: absolute; inset: 0; pointer-events: none; }
.preview-backdrop svg { width: 100%; height: 100%; display: block; }
