/* Game 18 « Choisir une destination » */
.ds-app {
  display: flex; flex-direction: column; height: 100%; width: 100%;
  font-family: system-ui, -apple-system, sans-serif; box-sizing: border-box;
}
.ds-header {
  background: var(--title-bg, #ffffff); border-radius: 8px;
  padding: 6px 14px; margin-bottom: 4px; text-align: center; flex-shrink: 0;
}
.ds-header h1 { font-size: 1.05rem; font-weight: 700; color: var(--title-color, #1e293b); margin: 0; }
.ds-header p { font-size: 0.74rem; color: var(--hint-color, #64748b); margin: 2px 0 0; }

.ds-controls {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  background: var(--ctrl-bg, #f8fafc); border: 1.5px solid var(--ctrl-border, #cbd5e1);
  border-radius: 6px; padding: 4px 8px; margin-bottom: 3px; flex-shrink: 0;
}
.ds-ctrl-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ds-btn {
  background: var(--btn-bg, #ffffff); color: var(--btn-color, #1e293b);
  border: 1.5px solid var(--btn-border, #94a3b8); border-radius: 4px;
  padding: 3px 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s, transform 0.05s; font-family: inherit; line-height: 1.2;
}
.ds-btn:hover { background: var(--btn-hover, #f1f5f9); }
.ds-btn:active { transform: translateY(1px); }
.ds-btn-play {
  background: var(--play-bg, #2563eb); color: #ffffff; border-color: var(--play-border, #1d4ed8);
}
.ds-btn-play:hover { background: var(--play-hover-bg, #1d4ed8); }
.ds-step-num { font-weight: 700; font-size: 0.82rem; color: var(--title-color, #1e293b); }

.ds-sub-bar {
  background: var(--sub-bg, #eff6ff); color: var(--sub-color, #1e3a8a);
  border: 1px dashed var(--ctrl-border, #93c5fd); border-radius: 4px;
  padding: 4px 8px; font-size: 0.8rem; text-align: center; margin-bottom: 2px;
  flex-shrink: 0; font-weight: 500; min-height: 24px;
}
.ds-sub-speaker { font-weight: 700; color: #1d4ed8; }
.ds-sub-fr { margin-top: 1px; }
.ds-sub-yue { font-size: 0.72rem; color: #64748b; margin-top: 2px; }

.ds-feedback {
  border-radius: 4px; padding: 4px 8px; font-size: 0.8rem; font-weight: 600;
  text-align: center; margin-bottom: 3px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 26px;
}
.ds-fb-correct { background: var(--banner-correct-bg, #dcfce7); color: var(--banner-correct-color, #166534); border: 1px solid #86efac; }
.ds-fb-wrong { background: var(--banner-wrong-bg, #fee2e2); color: var(--banner-wrong-color, #991b1b); border: 1px solid #fca5a5; }
.ds-fb-neutral { background: #f1f5f9; color: #475569; }
.ds-btn-hint {
  background: #fef08a; border: 1px solid #eab308; color: #854d0e;
  border-radius: 4px; padding: 1px 6px; font-size: 0.72rem; font-weight: bold; cursor: pointer;
}

.ds-hint-area { margin-bottom: 3px; flex-shrink: 0; }
.ds-hint-card {
  background: #fefce8; border: 1px solid #fef08a; border-radius: 6px;
  padding: 4px 8px; font-size: 0.74rem; color: #713f12;
}

.ds-main { display: flex; flex: 1; min-height: 0; gap: 6px; }

.ds-tray {
  width: 250px; min-width: 250px; background: var(--tray-bg, #f1f5f9);
  border: 1px solid var(--ctrl-border, #cbd5e1); border-radius: 8px;
  overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px;
}
.ds-tray-head { font-size: 0.72rem; font-weight: 700; color: #475569; text-align: center; }
.ds-tray-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ds-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card-bg, #ffffff); border: 2px solid var(--card-border, #cbd5e1);
  border-radius: 6px; padding: 6px 4px; cursor: pointer; transition: transform 0.1s, border-color 0.15s;
  text-align: center; user-select: none; touch-action: none; min-height: 72px;
}
.ds-card:hover { border-color: #60a5fa; transform: translateY(-1px); }
.ds-card.selected { border-color: #2563eb; background: #eff6ff; outline: 2px solid #2563eb; }
.ds-card.placed { opacity: 0.45; }
.ds-card-label { font-size: 0.68rem; font-weight: 700; color: var(--title-color, #1e293b); margin-top: 4px; line-height: 1.1; display: none; }
.ds-show-text .ds-card-label { display: block; }
.ds-card-sub { font-size: 0.6rem; color: var(--hint-color, #64748b); margin-top: 2px; }
.ds-tray-done { font-size: 0.85rem; font-weight: 700; color: #15803d; padding: 12px 6px; text-align: center; }

.ds-scene-wrap {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: var(--card-bg, #ffffff); border: 1px solid var(--card-border, #c0d2e0);
  border-radius: 8px; overflow-y: auto; padding: 8px;
}
.ds-scene { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ds-scene-desk { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.ds-board-paper {
  width: 100%; max-width: 680px; background: #ffffff; border: 2px solid #cbd5e1;
  border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); padding: 12px;
  display: flex; flex-direction: column; gap: 8px; box-sizing: border-box;
}
.ds-doc-header {
  display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px;
}
.ds-doc-seal { flex-shrink: 0; }
.ds-doc-titles { flex: 1; }
.ds-doc-title { font-size: 0.95rem; font-weight: 800; color: #0284c7; }
.ds-doc-subtitle { font-size: 0.72rem; color: #64748b; }
.ds-doc-step-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700; color: #0369a1;
  background: #e0f2fe; border: 1px solid #bae6fd; border-radius: 4px; padding: 1px 6px; margin-top: 3px;
}
.ds-scene-hero {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; padding: 6px 12px;
}
.ds-scene-hero-icon { width: 44px; height: 44px; flex-shrink: 0; }
.ds-scene-hero-caption { font-size: 0.82rem; font-weight: 750; color: #334155; }

.ds-slots-container { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ds-slot-card {
  background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 6px; padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.ds-slot-label { font-size: 0.75rem; font-weight: 750; color: #334155; }
.ds-slot-target {
  min-height: 54px; border: 2px dashed #94a3b8; border-radius: 6px; background: #ffffff;
  display: flex; align-items: center; padding: 4px 8px; gap: 8px; cursor: pointer; transition: all 0.15s;
}
.ds-slot-target.empty { justify-content: center; }
.ds-slot-target.filled { border-style: solid; border-color: #10b981; background: #f0fdf4; }
.ds-slot-target.ds-drop-active { border-color: #0284c7; background: #e0f2fe; }
.ds-slot-placeholder { font-size: 0.72rem; color: #94a3b8; font-style: italic; text-align: center; }
.ds-slot-info { display: flex; flex-direction: column; flex: 1; }
.ds-slot-val { font-size: 0.78rem; font-weight: 750; color: #166534; }
.ds-slot-sub { font-size: 0.65rem; color: #15803d; }
.ds-slot-check { font-size: 1.1rem; font-weight: bold; color: #10b981; margin-left: auto; }

.ds-progress-pills {
  display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid #e2e8f0; padding-top: 6px; margin-top: 4px;
}
.ds-pill {
  font-size: 0.64rem; font-weight: 650; color: #0369a1; background: #e0f2fe;
  border-radius: 4px; padding: 2px 6px;
}

.ds-picto { width: 36px; height: 36px; flex-shrink: 0; }

/* End card */
.ds-end-card {
  width: 100%; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px;
  background: #ffffff; border: 2px solid #bae6fd; border-radius: 10px; padding: 14px; box-sizing: border-box;
}
.ds-end-header { text-align: center; }
.ds-end-badge {
  display: inline-block; font-size: 0.78rem; font-weight: 800; color: #0284c7;
  background: #e0f2fe; border-radius: 20px; padding: 2px 10px; margin-bottom: 4px;
}
.ds-end-header h2 { font-size: 1.05rem; margin: 2px 0 4px; color: #0369a1; }
.ds-end-header p { font-size: 0.78rem; color: #64748b; margin: 0; }
.ds-end-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ds-summary-box {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.ds-sum-title { font-size: 0.82rem; font-weight: 800; color: #0284c7; margin-bottom: 4px; border-bottom: 1px solid #cbd5e1; padding-bottom: 2px; }
.ds-sum-row { display: flex; justify-content: space-between; font-size: 0.72rem; color: #334155; }
.ds-sum-row.highlight { color: #0369a1; font-weight: bold; background: #e0f2fe; padding: 2px 4px; border-radius: 4px; }
.ds-sum-divider { height: 1px; background: #cbd5e1; margin: 6px 0; }
.ds-end-actions { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }

.ds-drag-ghost {
  position: fixed; z-index: 10000; pointer-events: none; transform: translate(-50%, -50%);
  background: #ffffff; border: 2px solid #0284c7; border-radius: 6px; padding: 6px 8px;
  display: flex; align-items: center; gap: 6px; box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  font-size: 0.72rem; font-weight: bold; color: #1e293b;
}
body.ds-dragging { cursor: grabbing !important; user-select: none !important; }

@media (max-width: 700px) {
  .ds-main { flex-direction: column; }
  .ds-tray { width: 100%; min-width: 0; }
  .ds-tray-grid { grid-template-columns: repeat(4, 1fr); }
  .ds-end-grid { grid-template-columns: 1fr; }
}
