/* ── OBJECTIVES ── */
.objective-detail { grid-column: 1 / -1; flex-direction: column; align-items: stretch; min-width: 0; }
.objective-heading { display: flex; gap: 12px; align-items: center; width: 100%; margin-bottom: 24px; }
.objective-heading .franchise-title { min-width: 0; }
.objective-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 16px; margin-bottom: 12px; }
.objective-search { position: relative; flex: 1 1 280px; max-width: 500px; min-width: 0; }
#objective-search-results { position: absolute; top: 100%; right: 0; width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); margin-top: 8px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.5); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px; max-height: min(400px, 48dvh); overflow-y: auto; overscroll-behavior: contain; }
#objective-search-results > * { min-width: 0; }
.objective-game-row { display: flex; gap: 24px; align-items: stretch; margin-bottom: 12px; background: var(--bg); padding: 16px; border-radius: var(--r2); border: 1px solid var(--border); min-width: 0; }
.objective-game-cover { flex: 0 0 220px; min-width: 0; }
.objective-game-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.objective-game-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
@media (max-width: 900px) {
  .objective-heading { flex-wrap: wrap; }
  .objective-heading .franchise-title { flex-basis: 100%; }
  .objective-tools { flex-direction: column; align-items: stretch; }
  .objective-search { flex: auto; max-width: none; width: 100%; }
  #objective-search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .objective-game-row { flex-direction: column; gap: 16px; }
  .objective-game-cover { flex: auto; width: 100%; }
  .objective-detail .btn, .objective-detail .franchise-back-btn { min-height: 44px; }
  .objective-detail input[type="text"], .objective-detail textarea { font-size: 16px; }
  .objective-game-actions label { min-height: 44px; }
}

.objective-seal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #28a745;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(40,167,69,0.5);
}

.objective-folder .card-header {
  margin-top: auto;
  text-align: center;
  align-items: center;
  height: auto;
  margin-bottom: 0;
}
.objective-folder .objective-name {
  font-weight: 700;
  color: var(--accent2);
}
.objective-desc-textarea {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r);
  padding: 10px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.objective-desc-textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* Checkbox inside game card for objective view */
.objective-game-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  appearance: none;
  background: rgba(0,0,0,0.5);
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.objective-game-checkbox:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.objective-game-checkbox:checked::after {
  content: '✓';
  color: #fff;
  font-weight: bold;
  font-size: 16px;
}
.objective-game-checkbox:hover {
  transform: scale(1.1);
  border-color: var(--accent);
}
